You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
306 B
MySQL
6 lines
306 B
MySQL
5 years ago
|
/*31. Write a query in SQL to display those departments where more than ten employees work who got a commission percentage.*/
|
||
|
SELECT department_id
|
||
|
FROM employees
|
||
|
WHERE commission_pct IS NOT NULL
|
||
|
GROUP BY department_id
|
||
|
HAVING COUNT(commission_pct)>10;
|