SQL Tutorial

42 / 68

Write and execute a query to list out managers names and count of employees reporting to them.

How many managers have more than 2 reportees?

Note: the data is stored in emp table and deptt table in retail_db in MySQL as described earlier.

INSTRUCTIONS

Do self join on emp to get employee and their manager names, then use 'group by' on manager and 'having count'.

See Answer

Note - Having trouble with the assessment engine? Follow the steps listed here


No hints are availble for this assesment

Loading comments...