adplus-dvertising
frame-decoration

Question

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.

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

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. The employee information of an Organization is stored in the relation: Employee (name, sex, salary, deptname) Consider the following SQL query Select deptname from...

Similar Questions

Discover Related MCQs

Q. For a database relation R(a, b, c, d) where the domains of a, b, c, d include only the atomic values. The functional dependency a → c, b → d holds in the following relation

Q. Match the following:

a. Foreign keys                                  i. Domain constraint
b. Private key                                     ii. Referential integrity
c. Event control action model         iii. Encryption
d. Data security                                 iv. Trigger

Codes:
      a   b   c   d

Q. In multiuser database if two users wish to update the same record at the same time, they are prevented from doing so by

Q. What deletes the entire file except the file structure ?

Q. Which command is the fastest among the following ?

Q. B+ tree are preferred to binary tree in Database because

Q. A Transaction Manager is which of the following ?

Q. A B+ tree index is to be built on the name attribute of the relation STUDENT. Assume that all students names are of length 8 bytes, disk block are of size 512 bytes and index pointers are of size 4 bytes. Given this scenario what would be the best choice of the degree (i.e. the number of pointers per node) of the B+ tree ?

Q. What is Granularity ?

Q. Which level of Abstraction describes what data are stored in the Database ?

Q. The problem that occurs when one transaction updates a database item and then the transaction fails for some reason is …………….

Q. Consider a schema R(A, B, C, D) and functional dependencies A->B and C->D. Then the decomposition R1(A, B) and R2(C, D) is

Q. A hash table has space for 75 records, then the probability of collision before the table is 6% full.

Q. Which command classes text file, which has been created using “SET ALTERNATIVE” < FILE NAME > “Command” ?

Q. Which of the following statements is true, when structure of database file with 20 records is modified?

Q. The SQL Expression

Select distinct T. branch name from branch T, branch S where T. assets > S. assets and S. branch-city = DELHI,

finds the name of

Q. Which of the following is the recovery management technique in DDBMS ?

Q. Which of the following is the process by which a user’s privileges ascertained ?

Q. The basic variants of time-stampbased method of concurrency control are

Q. A transaction can include following basic database access operations :