i have an error which i dont understand. can you help me? [closed]
Sub queries used for the IN clause can’t return multiple columns, so you can’t have SELECT reportsTo, COUNT( * ) AS count inside it. You probably want to join the subquery instead, something like this: SELECT firstName,lastName,temp.count FROM employees INNER JOIN ( SELECT reportsTo, COUNT( * ) AS count FROM employees GROUP BY reportsTo ) … Read more