718 views
1 votes
1 votes

Found randomly somewhere:

i think multiple answers possible? 

1 Answer

1 votes
1 votes

The answer could be B or C.

the twist is in the COUNT function, if count function is applied on whole table, COUNT(*), then the answer will be C.

and if the COUNT function is applied on rating attribute, COUNT(rating), then the result will be equal to that of AVERAGE function B.

Related questions

0 votes
0 votes
1 answer
3
rayhanrjt asked Jan 6, 2023
717 views
Write SQL command to find DepartmentID, EmployeeName from Employee table whose average salary is above 20000.
2 votes
2 votes
1 answer
4
Subhrangsu asked Jun 18, 2022
431 views
Write SQL query to show all employees hired on June 4,1984 (non-default format)emp(empno,ename,job,mgr,hiredate,sal,comm,deptno)