Find the names and average salaries of all departments whose average salary is greater than 42000.
CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER)
SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name HAVING AVG(salary) > 42000
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER) Question: Find the names and average salaries of all departments whose average salary is greater than 42000. [/INST] SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name HAVING AVG(salary) > 42000 </s>