Enter text


Translate natural language to SQL queries.

Example :

### Postgres SQL tables, with their properties:
#
# Employee(id, name, department_id)
# Department(id, name, address)
# Salary_Payments(id, employee_id, amount, date)
#
### A query to list the names of the departments which employed more than 10 employees in the last 3 months
SELECT DISTINCT department.name
FROM department
JOIN employee ON department.id = employee.department_id
JOIN salary_payments ON employee.id = salary_payments.employee_id
WHERE salary_payments.date > (CURRENT_DATE - INTERVAL '3 months')
GROUP BY department.name
HAVING COUNT(employee.id) > 10;