Multiple choice

Which of the following queries corresponds to finding the name and number of employees in each department?

  1. select dname,count(*) from emp group by dname

  2. select dname,count(*) from emp group by eid

  3. select dname,count(*) from emp group by dname,eid

  4. options 2 and 3

  5. none of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

We can get the corresponding result as required by grouping with dname.