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.
5 lines
269 B
MySQL
5 lines
269 B
MySQL
5 years ago
|
/*29. Write a query in SQL to display the average salary of employees for each department who gets a commission percentage.*/
|
||
|
SELECT department_id, AVG(salary)
|
||
|
FROM employees
|
||
|
WHERE commission_pct IS NOT NULL
|
||
|
GROUP BY department_id;
|