Untitled

mail@pastecode.io avatar
unknown
plain_text
4 months ago
272 B
1
Indexable
SELECT employee_id, first_name, last_name FROM employees WHERE salary > (SELECT AVG(salary) FROM employees);
SELECT d.department_id, d.department_name FROM departments d WHERE EXISTS (SELECT * FROM employees e WHERE e.department_id = d.department_id AND e.salary > 10000);
Leave a Comment