Advertisement
This is comment for paste
Операторы LEFT OUTER JOIN и RIGHT OUTER JOIN, задача 3
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- в конце надо добавить сортировку по employee_last_name
- SELECT s.last_name AS employee_last_name,
- COUNT(c.customer_id) AS all_customers
- FROM staff AS s
- LEFT OUTER JOIN client AS c ON s.employee_id = c.support_rep_id
- GROUP BY s.employee_id
- ORDER BY all_customers DESC, employee_last_name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement