question string | answer string | context string | dialect string | spider_hardness string | extended_hardness string | classification_status string | syntax_status string | ddl_syntax_status string | schema_status string | syntax_errors list | ddl_syntax_errors list | schema_errors list | classification_errors list | status_history list | correction_status string | component1 int64 | component2 int64 | others int64 | validation_source dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
List all manufacturer names and ids ordered by their opening year. | SELECT name, manufacturer_id FROM manufacturer ORDER BY open_year | CREATE TABLE manufacturer (name VARCHAR(255), manufacturer_id VARCHAR(255), open_year VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2016
} |
Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops. | SELECT name, open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10 | CREATE TABLE manufacturer (name VARCHAR(255), open_year VARCHAR(255), num_of_shops VARCHAR(255), Num_of_Factories VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 2 | {
"split": "train",
"row_index": 2017
} |
Find the id and number of shops for the company that produces the most expensive furniture. | SELECT t1.manufacturer_id, t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1 | CREATE TABLE manufacturer (manufacturer_id VARCHAR(255), num_of_shops VARCHAR(255)); CREATE TABLE furniture_manufacte (manufacturer_id VARCHAR(255), Price_in_Dollar VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2019
} |
Find the number of funiture types produced by each manufacturer as well as the company names. | SELECT COUNT(*), t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id GROUP BY t1.manufacturer_id | CREATE TABLE furniture_manufacte (manufacturer_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE manufacturer (name VARCHAR(255), manufacturer_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2020
} |
Give me the names and prices of furnitures which some companies are manufacturing. | SELECT t1.name, t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID | CREATE TABLE furniture_manufacte (price_in_dollar VARCHAR(255), Furniture_ID VARCHAR(255)); CREATE TABLE furniture (name VARCHAR(255), Furniture_ID VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2021
} |
Find the market shares and names of furnitures which no any company is producing in our records. | SELECT Market_Rate, name FROM furniture WHERE NOT Furniture_ID IN (SELECT Furniture_ID FROM furniture_manufacte) | CREATE TABLE furniture (Market_Rate VARCHAR(255), name VARCHAR(255), Furniture_ID VARCHAR(255)); CREATE TABLE furniture_manufacte (Market_Rate VARCHAR(255), name VARCHAR(255), Furniture_ID VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 2022
} |
Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components. | SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component < 6 INTERSECT SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN ... | CREATE TABLE furniture_manufacte (Furniture_ID VARCHAR(255), manufacturer_id VARCHAR(255)); CREATE TABLE manufacturer (name VARCHAR(255), manufacturer_id VARCHAR(255)); CREATE TABLE furniture (Furniture_ID VARCHAR(255), num_of_component INTEGER) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 1 | 0 | {
"split": "train",
"row_index": 2023
} |
Display the first name and department name for each employee. | SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id | CREATE TABLE departments (department_name VARCHAR(255), department_id VARCHAR(255)); CREATE TABLE employees (first_name VARCHAR(255), department_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2024
} |
List the full name (first and last name), and salary for those employees who earn below 6000. | SELECT first_name, last_name, salary FROM employees WHERE salary < 6000 | CREATE TABLE employees (first_name VARCHAR(255), last_name VARCHAR(255), salary INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2025
} |
Display the first name, and department number for all employees whose last name is "McEwen". | SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen' | CREATE TABLE employees (first_name VARCHAR(255), department_id VARCHAR(255), last_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2026
} |
when is the hire date for those employees whose first name does not containing the letter M? | SELECT hire_date FROM employees WHERE NOT first_name LIKE '%M%' | CREATE TABLE employees (hire_date VARCHAR(255), first_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2029
} |
display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M. | SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' | CREATE TABLE employees (first_name VARCHAR(255), last_name VARCHAR(255), hire_date VARCHAR(255), salary VARCHAR(255), department_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2030
} |
display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M and make the result set in ascending order by department number. | SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' ORDER BY department_id | CREATE TABLE employees (first_name VARCHAR(255), last_name VARCHAR(255), hire_date VARCHAR(255), salary VARCHAR(255), department_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2031
} |
what is the phone number of employees whose salary is in the range of 8000 and 12000? | SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000 | CREATE TABLE employees (phone_number VARCHAR(255), salary INTEGER) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2032
} |
What are the full name (first and last name) and salary for all employees who does not have any value for commission? | SELECT first_name, last_name, salary FROM employees WHERE commission_pct = 'null' | CREATE TABLE employees (first_name VARCHAR(255), last_name VARCHAR(255), salary VARCHAR(255), commission_pct VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2034
} |
Display the first and last name, and salary for those employees whose first name is ending with the letter m. | SELECT first_name, last_name, salary FROM employees WHERE first_name LIKE '%m' | CREATE TABLE employees (first_name VARCHAR(255), last_name VARCHAR(255), salary VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2035
} |
Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009. | SELECT job_id, hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05' | CREATE TABLE employees (job_id VARCHAR(255), hire_date INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2036
} |
What are the first and last name for those employees who works either in department 70 or 90? | SELECT first_name, last_name FROM employees WHERE department_id = 70 OR department_id = 90 | CREATE TABLE employees (first_name VARCHAR(255), last_name VARCHAR(255), department_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 2 | {
"split": "train",
"row_index": 2037
} |
Find the salary and manager number for those employees who is working under a manager. | SELECT salary, manager_id FROM employees WHERE manager_id <> 'null' | CREATE TABLE employees (salary VARCHAR(255), manager_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2038
} |
display the job title of jobs which minimum salary is greater than 9000. | SELECT job_title FROM jobs WHERE min_salary > 9000 | CREATE TABLE jobs (job_title VARCHAR(255), min_salary INTEGER) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2042
} |
display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000. | SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000 | CREATE TABLE jobs (job_title VARCHAR(255), max_salary INTEGER, min_salary VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2043
} |
display the emails of the employees who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50. | SELECT email FROM employees WHERE commission_pct = 'null' AND salary BETWEEN 7000 AND 12000 AND department_id = 50 | CREATE TABLE employees (email VARCHAR(255), department_id VARCHAR(255), commission_pct VARCHAR(255), salary VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2044
} |
display the employee ID for each employee and the date on which he ended his previous job. | SELECT employee_id, MAX(end_date) FROM job_history GROUP BY employee_id | CREATE TABLE job_history (employee_id VARCHAR(255), end_date INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2045
} |
display those departments where more than ten employees work who got a commission percentage. | SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10 | CREATE TABLE employees (department_id VARCHAR(255), commission_pct VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2046
} |
Find the ids of the departments where any manager is managing 4 or more employees. | SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4 | CREATE TABLE employees (department_id VARCHAR(255), manager_id VARCHAR(255), employee_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2047
} |
display the average salary of employees for each department who gets a commission percentage. | SELECT department_id, AVG(salary) FROM employees WHERE commission_pct <> 'null' GROUP BY department_id | CREATE TABLE employees (department_id VARCHAR(255), salary INTEGER, commission_pct VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2048
} |
display the country ID and number of cities for each country. | SELECT country_id, COUNT(*) FROM locations GROUP BY country_id | CREATE TABLE locations (country_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT, location_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2049
} |
display job ID for those jobs that were done by two or more for more than 300 days. | SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2 | CREATE TABLE job_history (job_id VARCHAR(255), end_date VARCHAR(255), start_date VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2050
} |
display the ID for those employees who did two or more jobs in the past. | SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2 | CREATE TABLE job_history (employee_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT, job_id VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2051
} |
Find employee with ID and name of the country presently where (s)he is working. | SELECT T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id | CREATE TABLE countries (country_name VARCHAR(255), country_id VARCHAR(255)); CREATE TABLE departments (department_id VARCHAR(255), location_id VARCHAR(255)); CREATE TABLE locations (location_id VARCHAR(255), country_id VARCHAR(255)); CREATE TABLE employees (employee_id VARCHAR(255), department_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2052
} |
display the department name and number of employees in each of the department. | SELECT T2.department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name | CREATE TABLE departments (department_name VARCHAR(255), department_id VARCHAR(255)); CREATE TABLE employees (department_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2053
} |
What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163? | SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163) | CREATE TABLE employees (first_name VARCHAR(255), last_name VARCHAR(255), salary INTEGER, employee_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 2056
} |
return the smallest salary for every departments. | SELECT MIN(salary), department_id FROM employees GROUP BY department_id | CREATE TABLE employees (department_id VARCHAR(255), salary INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2057
} |
Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments. | SELECT first_name, last_name, department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id) | CREATE TABLE employees (first_name VARCHAR(255), last_name VARCHAR(255), department_id VARCHAR(255), salary INTEGER) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 2058
} |
Find the employee id for all employees who earn more than the average salary. | SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) | CREATE TABLE employees (employee_id VARCHAR(255), salary INTEGER) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2059
} |
display the employee id and salary of all employees who report to Payam (first name). | SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam') | CREATE TABLE employees (employee_id VARCHAR(255), salary VARCHAR(255), manager_id VARCHAR(255), first_name VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 2060
} |
find the name of all departments that do actually have one or more employees assigned to them. | SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id | CREATE TABLE departments (department_name VARCHAR(255), department_id VARCHAR(255)); CREATE TABLE employees (department_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2061
} |
Find the job ID for those jobs which average salary is above 8000. | SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000 | CREATE TABLE employees (job_id VARCHAR(255), salary INTEGER) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2063
} |
display the employee ID and job name for all those jobs in department 80. | SELECT T1.employee_id, T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80 | CREATE TABLE jobs (job_title VARCHAR(255), job_id VARCHAR(255)); CREATE TABLE employees (employee_id VARCHAR(255), job_id VARCHAR(255), department_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2064
} |
What is the first name and job id for all employees in the Finance department? | SELECT T1.first_name, T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance' | CREATE TABLE departments (department_id VARCHAR(255), department_name VARCHAR(255)); CREATE TABLE employees (first_name VARCHAR(255), job_id VARCHAR(255), department_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2065
} |
Find the ids of the employees who does not work in those departments where some employees works whose manager id within the range 100 and 200. | SELECT * FROM employees WHERE NOT department_id IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200) | CREATE TABLE departments (department_id VARCHAR(255), manager_id INTEGER); CREATE TABLE employees (department_id VARCHAR(255), manager_id INTEGER) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2067
} |
display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara. | SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara') | CREATE TABLE employees (first_name VARCHAR(255), last_name VARCHAR(255), hire_date VARCHAR(255), department_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 2068
} |
display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara. | SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara') AND first_name <> 'Clara' | CREATE TABLE employees (first_name VARCHAR(255), last_name VARCHAR(255), hire_date VARCHAR(255), department_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 2 | {
"split": "train",
"row_index": 2069
} |
display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a ’T’. | SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%') | CREATE TABLE employees (employee_id VARCHAR(255), first_name VARCHAR(255), last_name VARCHAR(255), department_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 2070
} |
display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name. | SELECT employee_id, first_name, last_name, salary FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) AND department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%J%') | CREATE TABLE employees (employee_id VARCHAR(255), first_name VARCHAR(255), last_name VARCHAR(255), salary INTEGER, department_id VARCHAR(255)) | generic | extra | extreme | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 2 | 2 | {
"split": "train",
"row_index": 2071
} |
display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN. | SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN') | CREATE TABLE employees (employee_id VARCHAR(255), job_id VARCHAR(255), salary INTEGER) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 2072
} |
display the employee number, name( first name and last name ) and job title for all employees whose salary is more than any salary of those employees whose job title is PU_MAN. | SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN') | CREATE TABLE employees (employee_id VARCHAR(255), first_name VARCHAR(255), last_name VARCHAR(255), job_id VARCHAR(255), salary INTEGER) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 2073
} |
display the department id and the total salary for those departments which contains at least two employees. | SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2 | CREATE TABLE employees (department_id VARCHAR(255), salary INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2074
} |
display the department ID, full name (first and last name), salary for those employees who is highest salary in every department. | SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id | CREATE TABLE employees (first_name VARCHAR(255), last_name VARCHAR(255), salary INTEGER, department_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2076
} |
display the first and last name, department, city, and state province for each employee. | SELECT T1.first_name, T1.last_name, T2.department_name, T3.city, T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id | CREATE TABLE departments (department_name VARCHAR(255), department_id VARCHAR(255), location_id VARCHAR(255)); CREATE TABLE employees (first_name VARCHAR(255), last_name VARCHAR(255), department_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE locations (city VARCHAR(255), state_province VARCHAR(25... | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2077
} |
display those employees who contain a letter z to their first name and also display their last name, city. | SELECT T1.first_name, T1.last_name, T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name LIKE '%z%' | CREATE TABLE locations (city VARCHAR(255), location_id VARCHAR(255)); CREATE TABLE employees (first_name VARCHAR(255), last_name VARCHAR(255), department_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE departments (department_id VARCHAR(255), location_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_I... | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 2078
} |
display the department name, city, and state province for each department. | SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id | CREATE TABLE locations (city VARCHAR(255), state_province VARCHAR(255), location_id VARCHAR(255)); CREATE TABLE departments (department_name VARCHAR(255), location_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2079
} |
display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working. | SELECT T1.first_name, T1.last_name, T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id | CREATE TABLE countries (country_name VARCHAR(255), country_id VARCHAR(255)); CREATE TABLE departments (department_id VARCHAR(255), location_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE locations (location_id VARCHAR(255), country_id VARCHAR(255)); CREATE TABLE employees (first_name VARCHAR(255)... | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2080
} |
What is the name of the song that was released in the most recent year? | SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1 | CREATE TABLE song (song_name VARCHAR(255), releasedate VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2083
} |
What is the id of the longest song? | SELECT f_id FROM files ORDER BY duration DESC LIMIT 1 | CREATE TABLE files (f_id VARCHAR(255), duration VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2084
} |
Find the names of all English songs. | SELECT song_name FROM song WHERE languages = 'english' | CREATE TABLE song (song_name VARCHAR(255), languages VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2085
} |
What are the id of songs whose format is mp3. | SELECT f_id FROM files WHERE formats = 'mp3' | CREATE TABLE files (f_id VARCHAR(255), formats VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2086
} |
List the name and country of origin for all singers who have produced songs with rating above 9. | SELECT DISTINCT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9 | CREATE TABLE song (artist_name VARCHAR(255), rating INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE artist (artist_name VARCHAR(255), country VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2087
} |
How many songs have 4 minute duration? | SELECT COUNT(*) FROM files WHERE duration LIKE '4:%' | CREATE TABLE files (duration VARCHAR, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2091
} |
How many artists are from Bangladesh? | SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh' | CREATE TABLE artist (country VARCHAR, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2092
} |
What is the most popular file format? | SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE files (formats VARCHAR, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 2094
} |
What is the number of artists for each gender? | SELECT COUNT(*), gender FROM artist GROUP BY gender | CREATE TABLE artist (gender VARCHAR, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2099
} |
For each file format, return the number of artists who released songs in that format. | SELECT COUNT(*), formats FROM files GROUP BY formats | CREATE TABLE files (formats VARCHAR, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2102
} |
What are the names of all songs that have a lower rating than some song of blues genre? | SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = 'blues') | CREATE TABLE song (song_name VARCHAR(255), rating INTEGER, genre_is VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2104
} |
What is the name and country of origin of the artist who released a song that has "love" in its title? | SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE '%love%' | CREATE TABLE song (artist_name VARCHAR(255), song_name VARCHAR(255)); CREATE TABLE artist (artist_name VARCHAR(255), country VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2105
} |
List the name and gender for all artists who released songs in March. | SELECT T1.artist_name, T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE '%Mar%' | CREATE TABLE song (artist_name VARCHAR(255), releasedate VARCHAR(255)); CREATE TABLE artist (artist_name VARCHAR(255), gender VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2106
} |
List the names of all genres in alphabetical oder, together with its ratings. | SELECT g_name, rating FROM genre ORDER BY g_name | CREATE TABLE genre (g_name VARCHAR(255), rating VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2107
} |
Give me a list of the names of all songs ordered by their resolution. | SELECT song_name FROM song ORDER BY resolution | CREATE TABLE song (song_name VARCHAR(255), resolution VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2108
} |
What are the ids of songs that are available in either mp4 format or have resolution above 720? | SELECT f_id FROM files WHERE formats = 'mp4' UNION SELECT f_id FROM song WHERE resolution > 720 | CREATE TABLE song (f_id VARCHAR(255), formats VARCHAR(255), resolution INTEGER); CREATE TABLE files (f_id VARCHAR(255), formats VARCHAR(255), resolution INTEGER) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2109
} |
What is the language used most often in the songs? | SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE song (languages VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 2111
} |
What is the language that was used most often in songs with resolution above 500? | SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE song (artist_name VARCHAR(255), languages VARCHAR(255), resolution INTEGER) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 2112
} |
What are the names of artists who are Male and are from UK? | SELECT artist_name FROM artist WHERE country = 'UK' AND gender = 'Male' | CREATE TABLE artist (artist_name VARCHAR(255), country VARCHAR(255), gender VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2113
} |
Find the names of songs whose genre is modern or language is English. | SELECT song_name FROM song WHERE genre_is = 'modern' OR languages = 'english' | CREATE TABLE song (song_name VARCHAR(255), genre_is VARCHAR(255), languages VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2114
} |
What are the average rating and resolution of songs that are in Bangla? | SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = 'bangla' | CREATE TABLE song (rating INTEGER, resolution INTEGER, languages VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 2 | {
"split": "train",
"row_index": 2117
} |
What are the maximum and minimum resolution of songs whose duration is 3 minutes? | SELECT MAX(T2.resolution), MIN(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE '3:%' | CREATE TABLE files (f_id VARCHAR(255), duration VARCHAR(255)); CREATE TABLE song (resolution INTEGER, f_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 2118
} |
What are the maximum duration and resolution of songs grouped and ordered by languages? | SELECT MAX(T1.duration), MAX(T2.resolution), T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages | CREATE TABLE song (languages VARCHAR(255), resolution INTEGER, f_id VARCHAR(255)); CREATE TABLE files (duration INTEGER, f_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 2119
} |
What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre? | SELECT MIN(T1.duration), MIN(T2.rating), T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is | CREATE TABLE song (genre_is VARCHAR(255), rating INTEGER, f_id VARCHAR(255)); CREATE TABLE files (duration INTEGER, f_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 2 | {
"split": "train",
"row_index": 2120
} |
Find the names and number of works of all artists who have at least one English songs. | SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english' GROUP BY T2.artist_name HAVING COUNT(*) >= 1 | CREATE TABLE song (artist_name VARCHAR(255), languages VARCHAR(255)); CREATE TABLE artist (artist_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2121
} |
Find the name and country of origin for all artists who have release at least one song of resolution above 900. | SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING COUNT(*) >= 1 | CREATE TABLE song (artist_name VARCHAR(255), resolution INTEGER); CREATE TABLE artist (artist_name VARCHAR(255), country VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2122
} |
Find the names and number of works of the three artists who have produced the most songs. | SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3 | CREATE TABLE song (artist_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE artist (artist_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 2 | {
"split": "train",
"row_index": 2123
} |
Find the country of origin for the artist who made the least number of songs? | SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) LIMIT 1 | CREATE TABLE song (artist_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE artist (country VARCHAR(255), artist_name VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 2124
} |
What are the names of the songs whose rating is below the rating of all songs in English? | SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english') | CREATE TABLE song (song_name VARCHAR(255), rating INTEGER, languages VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2125
} |
What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8? | SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8) | CREATE TABLE song (f_id VARCHAR(255), resolution INTEGER, rating INTEGER) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2126
} |
What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre? | SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = 'modern') | CREATE TABLE song (f_id VARCHAR(255), resolution INTEGER, genre_is VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2127
} |
Find the top 3 artists who have the largest number of songs works whose language is Bangla. | SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'bangla' GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3 | CREATE TABLE song (artist_name VARCHAR(255), languages VARCHAR(255)); CREATE TABLE artist (artist_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 5 | 0 | 0 | {
"split": "train",
"row_index": 2128
} |
List the id, genre and artist name of English songs ordered by rating. | SELECT f_id, genre_is, artist_name FROM song WHERE languages = 'english' ORDER BY rating | CREATE TABLE song (f_id VARCHAR(255), genre_is VARCHAR(255), artist_name VARCHAR(255), languages VARCHAR(255), rating VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 2129
} |
List the duration, file size and format of songs whose genre is pop, ordered by title? | SELECT T1.duration, T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = 'pop' ORDER BY T2.song_name | CREATE TABLE song (f_id VARCHAR(255), genre_is VARCHAR(255), song_name VARCHAR(255)); CREATE TABLE files (duration VARCHAR(255), file_size VARCHAR(255), formats VARCHAR(255), f_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 2130
} |
Find the names of the artists who have produced English songs but have never received rating higher than 8. | SELECT DISTINCT artist_name FROM song WHERE languages = 'english' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8 | CREATE TABLE song (artist_name VARCHAR(255), languages VARCHAR(255), rating INTEGER) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2131
} |
Find the names of the artists who are from Bangladesh and have never received rating higher than 7. | SELECT DISTINCT artist_name FROM artist WHERE country = 'Bangladesh' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7 | CREATE TABLE artist (artist_name VARCHAR(255), country VARCHAR(255), rating INTEGER); CREATE TABLE song (artist_name VARCHAR(255), country VARCHAR(255), rating INTEGER) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 2132
} |
what is the full name and id of the college with the largest number of baseball players? | SELECT T1.name_full, T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE player_college (college_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE college (name_full VARCHAR(255), college_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 2133
} |
What is average salary of the players in the team named 'Boston Red Stockings' ? | SELECT AVG(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' | CREATE TABLE salary (salary INTEGER, team_id VARCHAR(255)); CREATE TABLE team (team_id_br VARCHAR(255), name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 2134
} |
What are the first name, last name and id of the player with the most all star game experiences? Also list the count. | SELECT T1.name_first, T1.name_last, T1.player_id, COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE player (name_first VARCHAR(255), name_last VARCHAR(255), player_id VARCHAR(255)); CREATE TABLE all_star (player_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 2 | {
"split": "train",
"row_index": 2136
} |
How many players enter hall of fame each year? | SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid | CREATE TABLE hall_of_fame (yearid VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2137
} |
What is the average number of attendance at home games for each year? | SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR | CREATE TABLE home_game (YEAR VARCHAR(255), attendance INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2138
} |
In 2014, what are the id and rank of the team that has the largest average number of attendance? | SELECT T2.team_id, T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY AVG(T1.attendance) DESC LIMIT 1 | CREATE TABLE team (team_id VARCHAR(255), rank VARCHAR(255)); CREATE TABLE home_game (team_id VARCHAR(255), year VARCHAR(255), attendance INTEGER) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 5 | 0 | 1 | {
"split": "train",
"row_index": 2139
} |
What are the manager's first name, last name and id who won the most manager award? | SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE player (name_first VARCHAR(255), name_last VARCHAR(255), player_id VARCHAR(255)); CREATE TABLE manager_award (player_id VARCHAR(255), award_name VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 2140
} |
How many parks are there in the state of NY? | SELECT COUNT(*) FROM park WHERE state = 'NY' | CREATE TABLE park (state VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 2141
} |
Which 3 players won the most player awards? List their full name and id. | SELECT T1.name_first, T1.name_last, T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 3 | CREATE TABLE player (name_first VARCHAR(255), name_last VARCHAR(255), player_id VARCHAR(255)); CREATE TABLE player_award (player_id VARCHAR(255), award_type VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 1 | {
"split": "train",
"row_index": 2142
} |
List three countries which are the origins of the least players. | SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) LIMIT 3 | CREATE TABLE player (birth_country VARCHAR(255), player_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 2143
} |
Find all the players' first name and last name who have empty death record. | SELECT name_first, name_last FROM player WHERE death_year = '' | CREATE TABLE player (name_first VARCHAR(255), name_last VARCHAR(255), death_year VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 2144
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.