gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
SELECT * FROM employees WHERE grade IN ( (SELECT grade FROM employees WHERE empname =…
- User
SELECT * FROM employees WHERE grade IN ( (SELECT grade FROM employees WHERE emp_name = 'TUCKER') ,(SELECT experience FROM employees WHERE emp_name = 'SANDRINE') + 1 ) AND dep_id IN ( (SELECT dep_id FROM departments WHERE dep_location = 'SYDNEY') ,(SELECT dep_id FROM departments WHERE dep_location = 'PERTH') ) ORDER BY emp_name;
- Assistant
This query selects all columns from the "employees" table for employees who meet the following conditions:
- The employee's grade is either the same as the grade of the employee with the name "TUCKER" or one more than the experience of the employee with the name "SANDRINE".
- The employee's department ID is either the same as the department ID of the department located in "SYDNEY" or the department ID of the department located in "PERTH".
The result set is ordered by the employee's name.