The employee information of an Organization is stored in the relation:

Employee (name, sex, salary, deptname)

Consider the following SQL query

Select deptname from Employee Where sex = ‘M’ group by deptname having

avg (salary) > {select avg (salary) from Employee}

Output of the given query corresponds to

(A) Average salary of employee more than average salary of the organization.

(B) Average salary less than average salary of the organization.

(C) Average salary of employee equal to average salary of the organization.

(D) Average salary of male employees in a department is more than average salary of the organization.

1 Answer

Answer :

(D) Average salary of male employees in a department is more than average salary of the organization.

Related questions

Description : Suppose ORACLE relation R(A, B) currently has tuples {(1, 2), (1, 3), (3, 4)} and relation S(B, C) currently has {(2, 5), (4, 6), (7, 8)}. Consider the following two SQL queries SQ1 and SQ2 ... (A) 2 and 6 respectively (B) 6 and 2 respectively (C) 2 and 4 respectively (D) 4 and 2 respectively

Last Answer : (D) 4 and 2 respectively

Description : Which of the following is a legal expression in SQL? (A) SELECT NULL FROM EMPLOYEE; (B) SELECT NAME FROM EMPLOYEE; (C) SELECT NAME FROM EMPLOYEE WHERE SALARY = NULL; (D) None of the above

Last Answer : B) SELECT NAME FROM EMPLOYEE;

Description : Consider the following three SQL queries (Assume the data in the people table) : (a) Select Name from people where Age>21; (b) Select Name from people where Height>180; (c) Select Name from people where (Age>21) or (Height ... number of rows returned by the SQL query (c) ? (A) 3 (B) 7 (C) 10 (D) 21

Last Answer : (C) 10

Description : Consider a database table R with attributes A and B. Which of the following SQL queries is illegal ? (A) SELECT A FROM R; (B) SELECT A, COUNT(*) FROM R; (C) SELECT A, COUNT(*) FROM R GROUP BY A; (D) SELECT A, B, COUNT(*) FROM R GROUP BY A, B;

Last Answer : (B) SELECT A, COUNT(*) FROM R;

Description : Consider a CUSTOMERS database table having a column CITY filled with all the names of Indian cities (in capital letters). The SQL statement that finds all cities that have GAR somewhere in its name, ... *from customers where city like %GAR%'; (D) Select *from customers where city as '%GAR';

Last Answer : Answer: C

Description : Consider the following two commands C1 and C2 on the relation R from an SQL database:  C1: drop table R; C2: delete from R; Which of the following statements is TRUE? I. Both C1 and C2 delete the schema for R. II. C2 ... R. (A) I only (B) I and II only (C) II and III only (D) I, II and III

Last Answer : (C) II and III only

Description : For execution of DELETE SQL query in JDBC, ............. method must be used. A) executeQuery() B) executeDeleteQuery() C) executeUpdate() D) executeDelete()

Last Answer : C) executeUpdate()

Description : ………………… is a full form of SQL. A) Standard query language B) Sequential query language C) Structured query language D) Server side query language

Last Answer : A) Standard query language

Description : In distributed databases, location transparency allows for database users, programmers and administrators to treat the data as if it is at one location. A SQL query with location transparency needs to specify: (A) Inheritances (B) Fragments (C) Locations (D) Local formats 

Last Answer : (B) Fragments

Description : Relational database schema normalization is NOT for: (A) reducing the number of joins required to satisfy a query. (B) eliminating uncontrolled redundancy of data stored in the database. (C) ... could otherwise occur with inserts and deletes. (D) ensuring that functional dependencies are enforced. 

Last Answer : reducing the number of joins required to satisfy a query.

Description : Manager's salary details are to be hidden from Employee Table. This Technique is called as (A) Conceptual level Datahiding (B) Physical level Datahiding (C) External level Datahiding (D) Logical level Datahiding

Last Answer : (C) External level Datahiding

Description : The average monthly salary of directors & office boys of an organization Rs. 3750. Then the average salary of all directors is Rs. 6000 while that of all office boys is Rs. 3000 per month. If there are 120 employees in the ... find the ratio of manager and office boy. A) 2:5 B) 3:1 C) 1:3 D) 5:2 

Last Answer :  C)  let the number of director be X and office boy be 120-x total salary of director and office boy = 120*3750 = Rs.450000 total salary of director = 6000x total salary of office boy = 3000* (120 - ... director number of office boy = 120-30 = 90 ratio of director to office boy = 30:90 = 1:3

Description : Consider the following schemas: Branch = (Branch-name, Assets, Branch-city) Customer = (Customer-name, Bank-name, Customer-city) Borrow = (Branch-name, loan-number, customer account-number) Deposit = ... )) (C) πcustomer-name(σbalance> 10000(Borrow)) (D) σcustomer-name(σbalance> 10000(Borrow))

Last Answer : (A) πcustomer-name(σbalance> 10000(Deposit)) 

Description : Transparency A . The large set of candidate solutions possible for a problem B. The information stored in a database that can be retrieved with a single query C. Worth of the output of a machine learning program that makes it understandable for humans D . None of these

Last Answer : C. Worth of the output of a machine learning program that makes it understandable for humans

Description : Shallow knowledge A . The large set of candidate solutions possible for a problem B. The information stored in a database that can be, retrieved with a single query C. Worth of the output of a machine learning program that makes it understandable for humans D . None of these

Last Answer : B. The information stored in a database that can be, retrieved with a single query

Description : Search space A . The large set of candidate solutions possible for a problem B. The information stored in a database that can be, retrieved with a single query. C. Worth of the output of a machine learning program that makes it understandable for humans D . None of these

Last Answer : A . The large set of candidate solutions possible for a problem

Description : As a new employee, John is most likely to look to which one of the following to learn the ethical culture of his new organisation? A)Coworkers B)Customer contact employees C)Other new employees D)The legal department E)Top management

Last Answer : E)Top management

Description : Ms. Shalini has just created a table named “Employee” containing columns Ename, Department, Salary. -Technology

Last Answer : SQL command to add a primary key column:Alter table employee add empid int primary key;Importance of Primary key in a table:Primary key column is used to uniquely identify each record of the table. A column defined as primary key cannot have a duplicate entry and can't be left blank.

Description : Consider the relations R(A,B) and S(B,C) and the following four relational algebra queries over R and S: I. πA,B(R⋈S) II. R⋈πB(S) III. R∩(πA(R) Χ πB(S)) IV. πA,R.B(R Χ S) where R.B refers to ... IV are the same query. (C) I, II and IV are the same query. (D) I, III and III are the same query.

Last Answer : (D) I, III and III are the same query.

Description : Let L be the language generated by regular expression 0*10* and accepted by the deterministic finite automata M. Consider the relation RM defined by M. As all states are reachable from the start state, RM has ................ equivalence classes. (A) 2 (B) 4 (C) 5 (D) 6

Last Answer : (D) 6

Description : Consider the formula in image processing RD = 1 - (1/CR) Where CR = n1/n2 CR is called as compression ratio n1 and n2 denotes the number of information carrying units in two datasets that represent ... . (A) Data Compression (B) Data Redundancy (C) Data Relation (D) Data Representation

Last Answer : (B) Data Redundancy

Description : The statement in SQL which allows to change the definition of a table is (A) Alter. (B) Update. (C) Create. (D) select

Last Answer : (A) Alter.

Description : In comparing management fraud with employee fraud, the auditor's risk of failing to discover the fraud is a. Greater for employee fraud because of the larger number of employees in ... existing internal controls. d. Greater for management fraud because managers are inherently smarter than employees.

Last Answer : Greater for management fraud because of management's ability to override existing internal controls

Description : In comparing management fraud with employee fraud, the auditor's risk of failing to discover the fraud is a. Greater for employee fraud because of the larger number of employees in the ... blue collar workers. d. Greater for management fraud because managers are inherently smarter than employees

Last Answer : Greater for management fraud because of management's ability to override existing internal controls

Description : What is the fraction of employees getting salary less than the average salary of all the employees? (A) 47% (B) 45% (C) 50% (D) 55%

Last Answer : Answer: D

Description : To select tuples with some salary, Siddharth has written the following erroneous SQL statement : -Technology

Last Answer : The correct code is :SELECT ID, Salary FROM empsalaryWHERE Salary = 56000 ;

Description : .................. allows selection of the relevant information necessary for the data warehouse. (A) The Top-Down View (B) Data Warehouse View (C) Data source View (D) Business Query View 

Last Answer : Answer: A

Description : Creative marketing can be defined as __________. a. A marketing department entailing several employees. b. The brand value of an organization. c. A set of schemes undertaken by the organization for distributing the marketing material. d. The marketing content and its inventive aspect.

Last Answer : d. The marketing content and its inventive aspect.

Description : Select the ‘False’ statement from the following statements about Normal Forms: (A) Lossless preserving decomposition into 3NF is always possible (B) Lossless preserving decomposition into BCNF is always possible (C) Any relation with two attributes is in BCNF (D) BCNF is stronger than 3NF

Last Answer : (B) Lossless preserving decomposition into BCNF is always possible

Description : Consider a discrete memoryless channel and assume that H(x) is the amount of information per symbol at the input of the channel; H(y) is the amount of information per symbol at the output of the channel; H(x|y) is the amount of uncertainty ... (H(x) - H(x|y))]  p(x) (D) max H(x|y)  p(x)

Last Answer : (D) max H(x|y)   p(x)

Description : SQL server stores index information in the ………… system table A) systindexes B) systemindexes C) sysind D) sysindexes

Last Answer : D) sysindexes

Description : …………… table store information about database or about the system. A) SQL B) Nested C) System D) None of these

Last Answer : C) System

Description : TCP/IP ................. layer corresponds to the OSI models to three layers. A) Application B) Presentation C) Session D) Transport

Last Answer : A) Application

Description : Select operator is not a unary operator. ii) Project operator chooses subset of attributes or columns of a relation. A) i-True, ii-False B) i-True, ii-True C) i-False, ii-True D) i-False, ii-False

Last Answer : C) i-False, ii-True

Description : Consider a disk with 16384 bytes per track having a rotation time of 16 msec and average seek time of 40 msec. What is the time in msec to read a block of 1024 bytes from this disk? (A) 57 msec (B) 49 msec (C) 48 msec (D) 17 msec

Last Answer : Answer: B

Description : ……………… clause is an additional filter that is applied to the result. A) Select B) Group-by C) Having D) Order by

Last Answer : C) Having

Description : What is better: One big SQL query or several?

Last Answer : It’s difficult without examples. But what you describe seems like a simple join.

Description : Help him in writing SQL query for the following purpose: (i) To count how many female candidates will be attending the training. -Technology

Last Answer : (i)Select count(name) from training where name like ‘Ms.%’;(ii) Select * from training where fee is NULL;(iii) Select city, fee from training where topic = ‘Cyber Security’;(iv) Alter table training add feedback varchar(20);

Description : Write SQL query to create a table “BOOKS” with the following structure: Table: BOOKS -Technology

Last Answer : Create table Books(BOOK_ID Integer (2) Primary Key,BOOK_NAME Varchar (20),CATEGORY Varchar (20),ISSUE_DATE Date);

Description : Write SQL query to create a table “Registration” with the following structure: -Technology

Last Answer : Create table Registration(Reg_Id Integer(2) Primary Key,Name varchar(20),Course varchar(10),Join_Dt date);

Description : Write SQL query to create a table Inventory with the following structure : -Technology

Last Answer : CREATE TABLE Inventory(Material Id Integer Primary Key,Material Varchar (50) NOT NULL,Category Char,DatePurchase Date) :

Description : Write SQL query to create a table Player with the following structure : -Technology

Last Answer : CREATE TABLE Player(};

Description : Write SQL Query commands based on the following table: -Technology

Last Answer : This answer was deleted by our moderators...

Description : What is SQL Query ?

Last Answer : SQL Query is a query that uses SQL 's DDL and DML languages to find , display , print , and perform certain conditions in one or more tables in a database .