Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* 23 Write a SQL query that outputs the town with most employees.*/
- SELECT t.name AS town_name, COUNT(e.employee_id) AS num_employees
- FROM employees e
- JOIN addresses a ON e.address_id = a.address_id
- JOIN towns t ON a.town_id = t.town_id
- GROUP BY t.name
- ORDER BY num_employees DESC
- LIMIT 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement