db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
hr_1 | select first_name , last_name , hire_date from employees where department_id = (select department_id from employees where first_name = 'clara') | Question: what are the full names and hire dates for employees in the same department as someone with the first name clara? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MI... | what are the full names and hire dates for employees in the same department as someone with the first name clara? |
hr_1 | 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' | Question: display the employee name ( first name and last name ) and hire date for all employees in the same department as clara excluding clara. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs ->... | display the employee name ( first name and last name ) and hire date for all employees in the same department as clara excluding clara. |
hr_1 | 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' | Question: what are the full names and hire dates for employees in the same department as someone with the first name clara, not including clara? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> ... | what are the full names and hire dates for employees in the same department as someone with the first name clara, not including clara? |
hr_1 | select employee_id , first_name , last_name from employees where department_id in ( select department_id from employees where first_name like '%t%' ) | Question: 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. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCAT... | 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. |
hr_1 | select employee_id , first_name , last_name from employees where department_id in ( select department_id from employees where first_name like '%t%' ) | Question: what are the ids and full names for employees who work in a department that has someone with a first name that contains the letter t? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> J... | what are the ids and full names for employees who work in a department that has someone with a first name that contains the letter t? |
hr_1 | 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%') | Question: 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. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. depart... | 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. |
hr_1 | 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%') | Question: what are the ids, full names, and salaries for employees making more than average and who work in a department with employees who have the letter j in their first name? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME,... | what are the ids, full names, and salaries for employees making more than average and who work in a department with employees who have the letter j in their first name? |
hr_1 | select employee_id , job_id from employees where salary < ( select min(salary) from employees where job_id = 'mk_man' ) | Question: 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. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. ... | 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. |
hr_1 | select employee_id , job_id from employees where salary < ( select min(salary) from employees where job_id = 'mk_man' ) | Question: what are the employee ids and job ids for employees who make less than the lowest earning employee with title mk_man? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE... | what are the employee ids and job ids for employees who make less than the lowest earning employee with title mk_man? |
hr_1 | select employee_id , first_name , last_name , job_id from employees where salary > ( select max(salary) from employees where job_id = 'pu_man' ) | Question: 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. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTME... | 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. |
hr_1 | select employee_id , first_name , last_name , job_id from employees where salary > ( select max(salary) from employees where job_id = 'pu_man' ) | Question: what are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title pu_man? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB... | what are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title pu_man? |
hr_1 | select department_id , sum(salary) from employees group by department_id having count(*) >= 2 | Question: display the department id and the total salary for those departments which contains at least two employees. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALA... | display the department id and the total salary for those departments which contains at least two employees. |
hr_1 | select department_id , sum(salary) from employees group by department_id having count(*) >= 2 | Question: what are total salaries and department id for each department that has more than 2 employees? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALARY, MAX_SALARY... | what are total salaries and department id for each department that has more than 2 employees? |
hr_1 | select * from employees where employee_id not in (select employee_id from job_history) | Question: display all the information of those employees who did not have any job in the past. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALARY, MAX_SALARY. employe... | display all the information of those employees who did not have any job in the past. |
hr_1 | select * from employees where employee_id not in (select employee_id from job_history) | Question: what is all the information about employees who have never had a job in the past? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALARY, MAX_SALARY. employees ... | what is all the information about employees who have never had a job in the past? |
hr_1 | select first_name , last_name , salary , department_id , max(salary) from employees group by department_id | Question: display the department id, full name (first and last name), salary for those employees who is highest salary in every department. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_I... | display the department id, full name (first and last name), salary for those employees who is highest salary in every department. |
hr_1 | select first_name , last_name , salary , department_id , max(salary) from employees group by department_id | Question: what are the department ids, full names, and salaries for employees who make the most in their departments? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALA... | what are the department ids, full names, and salaries for employees who make the most in their departments? |
hr_1 | 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 | Question: display the first and last name, department, city, and state province for each employee. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALARY, MAX_SALARY. emp... | display the first and last name, department, city, and state province for each employee. |
hr_1 | 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 | Question: what are the full names, departments, cities, and state provinces for each employee? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALARY, MAX_SALARY. employe... | what are the full names, departments, cities, and state provinces for each employee? |
hr_1 | 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%' | Question: display those employees who contain a letter z to their first name and also display their last name, city. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALAR... | display those employees who contain a letter z to their first name and also display their last name, city. |
hr_1 | 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%' | Question: what are the full names and cities of employees who have the letter z in their first names? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALARY, MAX_SALARY. ... | what are the full names and cities of employees who have the letter z in their first names? |
hr_1 | select t1.department_name , t2.city , t2.state_province from departments as t1 join locations as t2 on t2.location_id = t1.location_id | Question: display the department name, city, and state province for each department. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALARY, MAX_SALARY. employees -> EMPL... | display the department name, city, and state province for each department. |
hr_1 | select t1.department_name , t2.city , t2.state_province from departments as t1 join locations as t2 on t2.location_id = t1.location_id | Question: what are the department names, cities, and state provinces for each department? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALARY, MAX_SALARY. employees ->... | what are the department names, cities, and state provinces for each department? |
hr_1 | 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 | Question: display the full name (first and last name ) of employee with id and name of the country presently where (s)he is working. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_... | display the full name (first and last name ) of employee with id and name of the country presently where (s)he is working. |
hr_1 | 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 | Question: what the full names, ids of each employee and the name of the country they are in? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALARY, MAX_SALARY. employees... | what the full names, ids of each employee and the name of the country they are in? |
hr_1 | select department_name , count(*) from employees as t1 join departments as t2 on t1.department_id = t2.department_id group by department_name | Question: display the department name and number of employees in each of the department. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALARY, MAX_SALARY. employees -> ... | display the department name and number of employees in each of the department. |
hr_1 | select department_name , count(*) from employees as t1 join departments as t2 on t1.department_id = t2.department_id group by department_name | Question: what are the department names and how many employees work in each of them? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALARY, MAX_SALARY. employees -> EMPL... | what are the department names and how many employees work in each of them? |
hr_1 | select first_name , last_name , salary 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 t3.city = 'london' | Question: display the full name (first and last name), and salary of those employees who working in any department located in london. | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB... | display the full name (first and last name), and salary of those employees who working in any department located in london. |
hr_1 | select first_name , last_name , salary 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 t3.city = 'london' | Question: what are full names and salaries of employees working in the city of london? | Tables: regions -> REGION_ID, REGION_NAME. countries -> COUNTRY_ID, COUNTRY_NAME, REGION_ID. departments -> DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID. jobs -> JOB_ID, JOB_TITLE, MIN_SALARY, MAX_SALARY. employees -> EM... | what are full names and salaries of employees working in the city of london? |
music_1 | select song_name , releasedate from song order by releasedate desc limit 1 | Question: what is the name of the song that was released in the most recent year? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, langua... | what is the name of the song that was released in the most recent year? |
music_1 | select song_name , releasedate from song order by releasedate desc limit 1 | Question: what is the name of the song that was released most recently? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, relea... | what is the name of the song that was released most recently? |
music_1 | select f_id from files order by duration desc limit 1 | Question: what is the id of the longest song? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. | Join... | what is the id of the longest song? |
music_1 | select f_id from files order by duration desc limit 1 | Question: find the id of the song that lasts the longest. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolu... | find the id of the song that lasts the longest. |
music_1 | select song_name from song where languages = 'english' | Question: find the names of all english songs. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. | Joi... | find the names of all english songs. |
music_1 | select song_name from song where languages = 'english' | Question: what are the names of all songs in english? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution... | what are the names of all songs in english? |
music_1 | select f_id from files where formats = 'mp3' | Question: what are the id of songs whose format is mp3. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resoluti... | what are the id of songs whose format is mp3. |
music_1 | select f_id from files where formats = 'mp3' | Question: what are the id of all the files in mp3 format? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolu... | what are the id of all the files in mp3 format? |
music_1 | 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 | Question: list the name and country of origin for all singers who have produced songs with rating above 9. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id,... | list the name and country of origin for all singers who have produced songs with rating above 9. |
music_1 | 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 | Question: what are the different names and countries of origins for all artists whose song ratings are above 9? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, ... | what are the different names and countries of origins for all artists whose song ratings are above 9? |
music_1 | select distinct t1.file_size , t1.formats from files as t1 join song as t2 on t1.f_id = t2.f_id where t2.resolution < 800 | Question: list the file size and format for all songs that have resolution lower than 800. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, ratin... | list the file size and format for all songs that have resolution lower than 800. |
music_1 | select distinct t1.file_size , t1.formats from files as t1 join song as t2 on t1.f_id = t2.f_id where t2.resolution < 800 | Question: what are the file sizes and formats for all songs with a resolution lower than 800? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, ra... | what are the file sizes and formats for all songs with a resolution lower than 800? |
music_1 | select t1.artist_name from song as t1 join files as t2 on t1.f_id = t2.f_id order by t2.duration limit 1 | Question: what is the name of the artist who produced the shortest song? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, rele... | what is the name of the artist who produced the shortest song? |
music_1 | select t1.artist_name from song as t1 join files as t2 on t1.f_id = t2.f_id order by t2.duration limit 1 | Question: what are the names of the artists who sang the shortest song? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, relea... | what are the names of the artists who sang the shortest song? |
music_1 | select t1.artist_name , t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name order by t2.rating desc limit 3 | Question: what are the names and countries of origin for the artists who produced the top three highly rated songs. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, count... | what are the names and countries of origin for the artists who produced the top three highly rated songs. |
music_1 | select t1.artist_name , t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name order by t2.rating desc limit 3 | Question: what are the names of the singers who sang the top 3 most highly rated songs and what countries do they hail from? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_na... | what are the names of the singers who sang the top 3 most highly rated songs and what countries do they hail from? |
music_1 | select count(*) from files where duration like '4:%' | Question: how many songs have 4 minute duration? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. | J... | how many songs have 4 minute duration? |
music_1 | select count(*) from files where duration like '4:%' | Question: what is the count of the songs that last approximately 4 minutes? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, r... | what is the count of the songs that last approximately 4 minutes? |
music_1 | select count(*) from artist where country = 'bangladesh' | Question: how many artists are from bangladesh? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. | Jo... | how many artists are from bangladesh? |
music_1 | select count(*) from artist where country = 'bangladesh' | Question: how many bangladeshi artists are listed? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. |... | how many bangladeshi artists are listed? |
music_1 | select avg(t2.rating) from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t1.gender = 'female' | Question: what is the average rating of songs produced by female artists? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, rel... | what is the average rating of songs produced by female artists? |
music_1 | select avg(t2.rating) from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t1.gender = 'female' | Question: how many songs, on average, are sung by a female artist? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedat... | how many songs, on average, are sung by a female artist? |
music_1 | select formats from files group by formats order by count (*) desc limit 1 | Question: what is the most popular file format? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. | Jo... | what is the most popular file format? |
music_1 | select formats from files group by formats order by count (*) desc limit 1 | Question: find the file format that is used by the most files. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, r... | find the file format that is used by the most files. |
music_1 | select artist_name from artist where country = 'uk' intersect select artist_name from song where languages = 'english' | Question: find the names of the artists who are from uk and have produced english songs. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating,... | find the names of the artists who are from uk and have produced english songs. |
music_1 | select artist_name from artist where country = 'uk' intersect select artist_name from song where languages = 'english' | Question: what are the names of the artists that are from the uk and sang songs in english? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rati... | what are the names of the artists that are from the uk and sang songs in english? |
music_1 | select f_id from files where formats = 'mp4' intersect select f_id from song where resolution < 1000 | Question: find the id of songs that are available in mp4 format and have resolution lower than 1000. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre... | find the id of songs that are available in mp4 format and have resolution lower than 1000. |
music_1 | select f_id from files where formats = 'mp4' intersect select f_id from song where resolution < 1000 | Question: what is the id of the files that are available in the format of mp4 and a resolution smaller than 1000? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country... | what is the id of the files that are available in the format of mp4 and a resolution smaller than 1000? |
music_1 | select t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t1.gender = 'female' and t2.languages = 'bangla' | Question: what is the country of origin of the artist who is female and produced a song in bangla? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_i... | what is the country of origin of the artist who is female and produced a song in bangla? |
music_1 | select t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t1.gender = 'female' and t2.languages = 'bangla' | Question: what countries are the female artists who sung in the language bangla from? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, la... | what countries are the female artists who sung in the language bangla from? |
music_1 | select avg(t1.duration) from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.formats = 'mp3' and t2.resolution < 800 | Question: what is the average duration of songs that have mp3 format and resolution below 800? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, r... | what is the average duration of songs that have mp3 format and resolution below 800? |
music_1 | select avg(t1.duration) from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.formats = 'mp3' and t2.resolution < 800 | Question: what is the average song duration for the songs that are in mp3 format and whose resolution below 800? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country,... | what is the average song duration for the songs that are in mp3 format and whose resolution below 800? |
music_1 | select count(*) , gender from artist group by gender | Question: what is the number of artists for each gender? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolut... | what is the number of artists for each gender? |
music_1 | select count(*) , gender from artist group by gender | Question: how many artists are male and how many are female? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, res... | how many artists are male and how many are female? |
music_1 | select avg(rating) , languages from song group by languages | Question: what is the average rating of songs for each language? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate,... | what is the average rating of songs for each language? |
music_1 | select avg(rating) , languages from song group by languages | Question: what is the average song rating for each language? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, res... | what is the average song rating for each language? |
music_1 | select t1.gender , t1.artist_name from artist as t1 join song as t2 on t1.artist_name = t2.artist_name order by t2.resolution limit 1 | Question: return the gender and name of artist who produced the song with the lowest resolution. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is,... | return the gender and name of artist who produced the song with the lowest resolution. |
music_1 | select t1.gender , t1.artist_name from artist as t1 join song as t2 on t1.artist_name = t2.artist_name order by t2.resolution limit 1 | Question: what is the gender and name of the artist who sang the song with the smallest resolution? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_... | what is the gender and name of the artist who sang the song with the smallest resolution? |
music_1 | select count(*) , formats from files group by formats | Question: for each file format, return the number of artists who released songs in that format. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, ... | for each file format, return the number of artists who released songs in that format. |
music_1 | select count(*) , formats from files group by formats | Question: how many songs were released for each format? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resoluti... | how many songs were released for each format? |
music_1 | select distinct song_name from song where resolution > (select min(resolution) from song where languages = 'english') | Question: find the distinct names of all songs that have a higher resolution than some songs in english. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, g... | find the distinct names of all songs that have a higher resolution than some songs in english. |
music_1 | select distinct song_name from song where resolution > (select min(resolution) from song where languages = 'english') | Question: what are the different names for all songs that have a higher resolution than english songs? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, gen... | what are the different names for all songs that have a higher resolution than english songs? |
music_1 | select song_name from song where rating < (select max(rating) from song where genre_is = 'blues') | Question: what are the names of all songs that have a lower rating than some song of blues genre? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is... | what are the names of all songs that have a lower rating than some song of blues genre? |
music_1 | select song_name from song where rating < (select max(rating) from song where genre_is = 'blues') | Question: what are the names of the songs that have a lower rating than at least one blues song? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is,... | what are the names of the songs that have a lower rating than at least one blues song? |
music_1 | 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%' | Question: what is the name and country of origin of the artist who released a song that has 'love' in its title? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country,... | what is the name and country of origin of the artist who released a song that has 'love' in its title? |
music_1 | 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%' | Question: what are the names of the artists who released a song that has the word love in its title, and where are the artists from? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, a... | what are the names of the artists who released a song that has the word love in its title, and where are the artists from? |
music_1 | 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%' | Question: list the name and gender for all artists who released songs in march. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, language... | list the name and gender for all artists who released songs in march. |
music_1 | 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%' | Question: what are the names and genders of all artists who released songs in the month of march? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is... | what are the names and genders of all artists who released songs in the month of march? |
music_1 | select g_name , rating from genre order by g_name | Question: list the names of all genres in alphabetical oder, together with its ratings. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, ... | list the names of all genres in alphabetical oder, together with its ratings. |
music_1 | select g_name , rating from genre order by g_name | Question: what are the names of all genres in alphabetical order, combined with its ratings? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rat... | what are the names of all genres in alphabetical order, combined with its ratings? |
music_1 | select song_name from song order by resolution | Question: give me a list of the names of all songs ordered by their resolution. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, language... | give me a list of the names of all songs ordered by their resolution. |
music_1 | select song_name from song order by resolution | Question: what are the names of all songs that are ordered by their resolution numbers? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, ... | what are the names of all songs that are ordered by their resolution numbers? |
music_1 | select f_id from files where formats = 'mp4' union select f_id from song where resolution > 720 | Question: what are the ids of songs that are available in either mp4 format or have resolution above 720? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, ... | what are the ids of songs that are available in either mp4 format or have resolution above 720? |
music_1 | select f_id from files where formats = 'mp4' union select f_id from song where resolution > 720 | Question: what are the ids of all songs that are available on mp4 or have a higher resolution than 720? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, ge... | what are the ids of all songs that are available on mp4 or have a higher resolution than 720? |
music_1 | select t2.song_name from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.duration like '4:%' union select song_name from song where languages = 'english' | Question: list the names of all songs that have 4 minute duration or are in english. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, lan... | list the names of all songs that have 4 minute duration or are in english. |
music_1 | select t2.song_name from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.duration like '4:%' union select song_name from song where languages = 'english' | Question: what are the names of all songs that are approximately 4 minutes long or are in english? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_i... | what are the names of all songs that are approximately 4 minutes long or are in english? |
music_1 | select languages from song group by languages order by count(*) desc limit 1 | Question: what is the language used most often in the songs? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, res... | what is the language used most often in the songs? |
music_1 | select languages from song group by languages order by count(*) desc limit 1 | Question: what are the languages that are used most often in songs? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releaseda... | what are the languages that are used most often in songs? |
music_1 | select artist_name from song where resolution > 500 group by languages order by count(*) desc limit 1 | Question: what is the language that was used most often in songs with resolution above 500? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rati... | what is the language that was used most often in songs with resolution above 500? |
music_1 | select artist_name from song where resolution > 500 group by languages order by count(*) desc limit 1 | Question: what is the name of the artist, for each language, that has the most songs with a higher resolution than 500? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, c... | what is the name of the artist, for each language, that has the most songs with a higher resolution than 500? |
music_1 | select artist_name from artist where country = 'uk' and gender = 'male' | Question: what are the names of artists who are male and are from uk? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, release... | what are the names of artists who are male and are from uk? |
music_1 | select artist_name from artist where country = 'uk' and gender = 'male' | Question: what are the names of all male british artists? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolu... | what are the names of all male british artists? |
music_1 | select song_name from song where genre_is = 'modern' or languages = 'english' | Question: find the names of songs whose genre is modern or language is english. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, language... | find the names of songs whose genre is modern or language is english. |
music_1 | select song_name from song where genre_is = 'modern' or languages = 'english' | Question: what are the names of the songs that are modern or sung in english? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages,... | what are the names of the songs that are modern or sung in english? |
music_1 | select t2.song_name from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.formats = 'mp3' intersect select song_name from song where resolution < 1000 | Question: return the names of songs for which format is mp3 and resolution is below 1000. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating... | return the names of songs for which format is mp3 and resolution is below 1000. |
music_1 | select t2.song_name from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.formats = 'mp3' intersect select song_name from song where resolution < 1000 | Question: what are the names of all songs that are in mp3 format and have a resolution lower than 1000? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, ge... | what are the names of all songs that are in mp3 format and have a resolution lower than 1000? |
music_1 | select artist_name from artist where country = 'uk' intersect select t1.artist_name from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.languages = 'english' | Question: return the names of singers who are from uk and released an english song. | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, lang... | return the names of singers who are from uk and released an english song. |
music_1 | select artist_name from artist where country = 'uk' intersect select t1.artist_name from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.languages = 'english' | Question: what are the names of all singers that are from the uk and released a song in english? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is,... | what are the names of all singers that are from the uk and released a song in english? |
music_1 | select avg(rating) , avg(resolution) from song where languages = 'bangla' | Question: what are the average rating and resolution of songs that are in bangla? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, langua... | what are the average rating and resolution of songs that are in bangla? |
music_1 | select avg(rating) , avg(resolution) from song where languages = 'bangla' | Question: what is the average rating and resolution of all bangla songs? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rating, languages, rele... | what is the average rating and resolution of all bangla songs? |
music_1 | 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:%' | Question: what are the maximum and minimum resolution of songs whose duration is 3 minutes? | Tables: genre -> g_name, rating, most_popular_in. artist -> artist_name, country, gender, preferred_genre. files -> f_id, artist_name, file_size, duration, formats. song -> song_name, artist_name, country, f_id, genre_is, rati... | what are the maximum and minimum resolution of songs whose duration is 3 minutes? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.