1) Find the manager who manages most employees but also being managed by someone else .
2) Find the artist name who is the most profitable commercially ? (his/her tracks have been sold the most)
ER-Diagram for this questions
https://i.stack.imgur.com/CX01i.png
SELECT ReportsTo
FROM Employees
WHERE Employees.ReportsTo = Employees.ReportsTo.max() AND COUNT(Employees.ReportsTo.max()) > 0
Comments
Leave a comment