SQL practice: A Table Joined to Itself
Chapter 14B · 10 questions · included in full access
Question 1 · easy
Solve it in your browserList every employee with their manager's name, showing NULL where there is none.
Question 2 · easy
Solve it in your browserList every employee with their manager's name and their manager's salary.
Question 3 · medium
Solve it in your browserFind the employees who earn more than their own manager.
Question 4 · medium
Solve it in your browserList only the employees who have a manager. (Which join should you use now?)
Question 5 · medium
Solve it in your browserList the employees who have no manager.
Question 6 · medium
Solve it in your browserShow every stock transfer with the from-branch and to-branch names.
Question 7 · medium
Solve it in your browserShow every stock transfer with the from-branch city and to-branch city.
Question 8 · medium
Solve it in your browserShow each employee, their manager's name, and their manager's branch name. (Three aliases now.)
Question 9 · hard
Solve it in your browserExplain why SELECT employees.employee_name FROM employees e JOIN employees m ... would fail.
Question 10 · hard
Solve it in your browserList each pair of employees who work in the same branch, once per pair, with the lower employee_id first. Every pair shows up twice. Fix it.
These questions are part of full access.
The first chapters of every track are free. Full access is a one-time payment.
See pricing