SQL - Subqueries
What will be the output of this query?
Assuming the departments table has one row with name 'Sales' and id 3, and employees table has:
SELECT name FROM employees WHERE department_id = (SELECT id FROM departments WHERE name = 'Sales');
Assuming the departments table has one row with name 'Sales' and id 3, and employees table has:
id | name | department_id
1 | Alice | 3
2 | Bob | 2
3 | Carol | 3