display the average salary of employees for each department who gets a commission percentage.
CREATE TABLE employees (department_id VARCHAR, salary INTEGER, commission_pct VARCHAR)
SELECT department_id, AVG(salary) FROM employees WHERE commission_pct <> "null" GROUP BY department_id
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE employees (department_id VARCHAR, salary INTEGER, commission_pct VARCHAR) Question: display the average salary of employees for each department who gets a commission percentage. [/INST] SELECT department_id, AVG(salary) FROM employees WHERE commission_pct <> "null" GROUP BY department_id </s>