db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
wta_1 | select sum(ranking_points) , t1.first_name from players as t1 join rankings as t2 on t1.player_id = t2.player_id group by t1.first_name | Question: what are the first names of all players, and their total ranking points? | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_see... | what are the first names of all players, and their total ranking points? |
wta_1 | select count(*) , country_code from players group by country_code | Question: find the number of players for each country. | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, round... | find the number of players for each country. |
wta_1 | select count(*) , country_code from players group by country_code | Question: how many players are from each country? | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, round, sco... | how many players are from each country? |
wta_1 | select country_code from players group by country_code order by count(*) desc limit 1 | Question: find the code of the country where has the greatest number of players. | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed,... | find the code of the country where has the greatest number of players. |
wta_1 | select country_code from players group by country_code order by count(*) desc limit 1 | Question: what is the code of the country with the most players? | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minu... | what is the code of the country with the most players? |
wta_1 | select country_code from players group by country_code having count(*) > 50 | Question: find the codes of countries that have more than 50 players. | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num,... | find the codes of countries that have more than 50 players. |
wta_1 | select country_code from players group by country_code having count(*) > 50 | Question: what are the codes of countries with more than 50 players? | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, ... | what are the codes of countries with more than 50 players? |
wta_1 | select sum(tours) , ranking_date from rankings group by ranking_date | Question: find the total number of tours for each ranking date. | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minut... | find the total number of tours for each ranking date. |
wta_1 | select sum(tours) , ranking_date from rankings group by ranking_date | Question: how many total tours were there for each ranking date? | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minu... | how many total tours were there for each ranking date? |
wta_1 | select count(*) , year from matches group by year | Question: find the number of matches happened in each year. | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, ... | find the number of matches happened in each year. |
wta_1 | select count(*) , year from matches group by year | Question: how many matches were played in each year? | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, round, ... | how many matches were played in each year? |
wta_1 | select distinct winner_name , winner_rank from matches order by winner_age limit 3 | Question: find the name and rank of the 3 youngest winners across all matches. | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, m... | find the name and rank of the 3 youngest winners across all matches. |
wta_1 | select distinct winner_name , winner_rank from matches order by winner_age limit 3 | Question: what are the names and ranks of the three youngest winners across all matches? | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, los... | what are the names and ranks of the three youngest winners across all matches? |
wta_1 | select count(distinct winner_name) from matches where tourney_name = 'wta championships' and winner_hand = 'l' | Question: how many different winners both participated in the wta championships and were left handed? | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_ran... | how many different winners both participated in the wta championships and were left handed? |
wta_1 | select count(distinct winner_name) from matches where tourney_name = 'wta championships' and winner_hand = 'l' | Question: find the number of left handed winners who participated in the wta championships. | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, ... | find the number of left handed winners who participated in the wta championships. |
wta_1 | select t1.first_name , t1.country_code , t1.birth_date from players as t1 join matches as t2 on t1.player_id = t2.winner_id order by t2.winner_rank_points desc limit 1 | Question: find the first name, country code and birth date of the winner who has the highest rank points in all matches. | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, lo... | find the first name, country code and birth date of the winner who has the highest rank points in all matches. |
wta_1 | select t1.first_name , t1.country_code , t1.birth_date from players as t1 join matches as t2 on t1.player_id = t2.winner_id order by t2.winner_rank_points desc limit 1 | Question: what is the first name, country code, and birth date of the player with the most winner rank points across all matches? | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser... | what is the first name, country code, and birth date of the player with the most winner rank points across all matches? |
wta_1 | select count(*) , hand from players group by hand | Question: find the number of players for each hand type. | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, rou... | find the number of players for each hand type. |
wta_1 | select count(*) , hand from players group by hand | Question: how many players are there for each hand type? | Tables: players -> player_id, first_name, last_name, hand, birth_date, country_code. matches -> best_of, draw_size, loser_age, loser_entry, loser_hand, loser_ht, loser_id, loser_ioc, loser_name, loser_rank, loser_rank_points, loser_seed, match_num, minutes, rou... | how many players are there for each hand type? |
battle_death | select count(*) from ship where disposition_of_ship = 'captured' | Question: how many ships ended up being 'captured'? | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, killed, injured. | Joins: ship.lost_in_battle = battle.id, deat... | how many ships ended up being 'captured'? |
battle_death | select name , tonnage from ship order by name desc | Question: list the name and tonnage ordered by in descending alphaetical order for the names. | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, killed, injured. | Jo... | list the name and tonnage ordered by in descending alphaetical order for the names. |
battle_death | select name , date from battle | Question: list the name, date and result of each battle. | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, killed, injured. | Joins: ship.lost_in_battle = battle.id,... | list the name, date and result of each battle. |
battle_death | select max(killed) , min(killed) from death | Question: what is maximum and minimum death toll caused each time? | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, killed, injured. | Joins: ship.lost_in_battle = ... | what is maximum and minimum death toll caused each time? |
battle_death | select avg(injured) from death | Question: what is the average number of injuries caused each time? | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, killed, injured. | Joins: ship.lost_in_battle = ... | what is the average number of injuries caused each time? |
battle_death | select t1.killed , t1.injured from death as t1 join ship as t2 on t1.caused_by_ship_id = t2.id where t2.tonnage = 't' | Question: what are the death and injury situations caused by the ship with tonnage 't'? | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, killed, injured. | Joins: s... | what are the death and injury situations caused by the ship with tonnage 't'? |
battle_death | select name , result from battle where bulgarian_commander != 'boril' | Question: what are the name and results of the battles when the bulgarian commander is not 'boril' | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, killed, injured.... | what are the name and results of the battles when the bulgarian commander is not 'boril' |
battle_death | select distinct t1.id , t1.name from battle as t1 join ship as t2 on t1.id = t2.lost_in_battle where t2.ship_type = 'brig' | Question: what are the different ids and names of the battles that lost any 'brig' type shipes? | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, killed, injured. | ... | what are the different ids and names of the battles that lost any 'brig' type shipes? |
battle_death | select t1.id , t1.name from battle as t1 join ship as t2 on t1.id = t2.lost_in_battle join death as t3 on t2.id = t3.caused_by_ship_id group by t1.id having sum(t3.killed) > 10 | Question: what are the ids and names of the battles that led to more than 10 people killed in total. | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, killed, injure... | what are the ids and names of the battles that led to more than 10 people killed in total. |
battle_death | select t2.id , t2.name from death as t1 join ship as t2 on t1.caused_by_ship_id = t2.id group by t2.id order by count(*) desc limit 1 | Question: what is the ship id and name that caused most total injuries? | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, killed, injured. | Joins: ship.lost_in_batt... | what is the ship id and name that caused most total injuries? |
battle_death | select name from battle where bulgarian_commander = 'kaloyan' and latin_commander = 'baldwin i' | Question: what are the distinct battle names which are between bulgarian commander 'kaloyan' and latin commander 'baldwin i'? | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id,... | what are the distinct battle names which are between bulgarian commander 'kaloyan' and latin commander 'baldwin i'? |
battle_death | select count(distinct result) from battle | Question: how many different results are there for the battles? | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, killed, injured. | Joins: ship.lost_in_battle = bat... | how many different results are there for the battles? |
battle_death | select count(*) from battle where id not in ( select lost_in_battle from ship where tonnage = '225' ); | Question: how many battles did not lose any ship with tonnage '225'? | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, killed, injured. | Joins: ship.lost_in_battle ... | how many battles did not lose any ship with tonnage '225'? |
battle_death | select t1.name , t1.date from battle as t1 join ship as t2 on t1.id = t2.lost_in_battle where t2.name = 'lettice' intersect select t1.name , t1.date from battle as t1 join ship as t2 on t1.id = t2.lost_in_battle where t2.name = 'hms atalanta' | Question: list the name and date the battle that has lost the ship named 'lettice' and the ship named 'hms atalanta' | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note... | list the name and date the battle that has lost the ship named 'lettice' and the ship named 'hms atalanta' |
battle_death | select name , result , bulgarian_commander from battle except select t1.name , t1.result , t1.bulgarian_commander from battle as t1 join ship as t2 on t1.id = t2.lost_in_battle where t2.location = 'english channel' | Question: show names, results and bulgarian commanders of the battles with no ships lost in the 'english channel'. | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, ... | show names, results and bulgarian commanders of the battles with no ships lost in the 'english channel'. |
battle_death | select note from death where note like '%east%' | Question: what are the notes of the death events which has substring 'east'? | Tables: battle -> id, name, date, bulgarian_commander, latin_commander, result. ship -> lost_in_battle, id, name, tonnage, ship_type, location, disposition_of_ship. death -> caused_by_ship_id, id, note, killed, injured. | Joins: ship.lost_in... | what are the notes of the death events which has substring 'east'? |
student_transcripts_tracking | select line_1 , line_2 from addresses | Question: what are all the addresses including line 1 and line 2? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, dep... | what are all the addresses including line 1 and line 2? |
student_transcripts_tracking | select line_1 , line_2 from addresses | Question: what is the first and second line for all addresses? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, depart... | what is the first and second line for all addresses? |
student_transcripts_tracking | select count(*) from courses | Question: how many courses in total are listed? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_descriptio... | how many courses in total are listed? |
student_transcripts_tracking | select count(*) from courses | Question: how many courses are there? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_description, other_d... | how many courses are there? |
student_transcripts_tracking | select course_description from courses where course_name = 'math' | Question: how is the math course described? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_description, o... | how is the math course described? |
student_transcripts_tracking | select course_description from courses where course_name = 'math' | Question: what are the descriptions for all the math courses? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, departm... | what are the descriptions for all the math courses? |
student_transcripts_tracking | select zip_postcode from addresses where city = 'port chelsea' | Question: what is the zip code of the address in the city port chelsea? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_nam... | what is the zip code of the address in the city port chelsea? |
student_transcripts_tracking | select zip_postcode from addresses where city = 'port chelsea' | Question: what is the zip code for port chelsea? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_descripti... | what is the zip code for port chelsea? |
student_transcripts_tracking | select t2.department_name , t1.department_id from degree_programs as t1 join departments as t2 on t1.department_id = t2.department_id group by t1.department_id order by count(*) desc limit 1 | Question: which department offers the most number of degrees? list department name and id. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department... | which department offers the most number of degrees? list department name and id. |
student_transcripts_tracking | select t2.department_name , t1.department_id from degree_programs as t1 join departments as t2 on t1.department_id = t2.department_id group by t1.department_id order by count(*) desc limit 1 | Question: what is the name and id of the department with the most number of degrees ? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, ... | what is the name and id of the department with the most number of degrees ? |
student_transcripts_tracking | select count(distinct department_id) from degree_programs | Question: how many departments offer any degree? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_descripti... | how many departments offer any degree? |
student_transcripts_tracking | select count(distinct department_id) from degree_programs | Question: how many different departments offer degrees? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_de... | how many different departments offer degrees? |
student_transcripts_tracking | select count(distinct degree_summary_name) from degree_programs | Question: how many different degree names are offered? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_des... | how many different degree names are offered? |
student_transcripts_tracking | select count(distinct degree_summary_name) from degree_programs | Question: how many different degrees are offered? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_descript... | how many different degrees are offered? |
student_transcripts_tracking | select count(*) from departments as t1 join degree_programs as t2 on t1.department_id = t2.department_id where t1.department_name = 'engineer' | Question: how many degrees does the engineering department offer? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, dep... | how many degrees does the engineering department offer? |
student_transcripts_tracking | select count(*) from departments as t1 join degree_programs as t2 on t1.department_id = t2.department_id where t1.department_name = 'engineer' | Question: how many degrees does the engineering department have? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, depa... | how many degrees does the engineering department have? |
student_transcripts_tracking | select section_name , section_description from sections | Question: what are the names and descriptions of all the sections? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, de... | what are the names and descriptions of all the sections? |
student_transcripts_tracking | select section_name , section_description from sections | Question: what are the names and descriptions for all the sections? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, d... | what are the names and descriptions for all the sections? |
student_transcripts_tracking | select t1.course_name , t1.course_id from courses as t1 join sections as t2 on t1.course_id = t2.course_id group by t1.course_id having count(*) <= 2 | Question: what are the names and id of courses having at most 2 sections? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_n... | what are the names and id of courses having at most 2 sections? |
student_transcripts_tracking | select t1.course_name , t1.course_id from courses as t1 join sections as t2 on t1.course_id = t2.course_id group by t1.course_id having count(*) <= 2 | Question: what are the names and ids of every course with less than 2 sections? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, depart... | what are the names and ids of every course with less than 2 sections? |
student_transcripts_tracking | select section_name from sections order by section_name desc | Question: list the section_name in reversed lexicographical order. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, de... | list the section_name in reversed lexicographical order. |
student_transcripts_tracking | select section_name from sections order by section_name desc | Question: what are the names of the sections in reverse alphabetical order? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department... | what are the names of the sections in reverse alphabetical order? |
student_transcripts_tracking | select t1.semester_name , t1.semester_id from semesters as t1 join student_enrolment as t2 on t1.semester_id = t2.semester_id group by t1.semester_id order by count(*) desc limit 1 | Question: what is the semester which most student registered in? show both the name and the id. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> depar... | what is the semester which most student registered in? show both the name and the id. |
student_transcripts_tracking | select t1.semester_name , t1.semester_id from semesters as t1 join student_enrolment as t2 on t1.semester_id = t2.semester_id group by t1.semester_id order by count(*) desc limit 1 | Question: for each semester, what is the name and id of the one with the most students registered? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> de... | for each semester, what is the name and id of the one with the most students registered? |
student_transcripts_tracking | select department_description from departments where department_name like '%computer%' | Question: what is the description of the department whose name has the substring the computer? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> depart... | what is the description of the department whose name has the substring the computer? |
student_transcripts_tracking | select department_description from departments where department_name like '%computer%' | Question: what is the department description for the one whose name has the word computer? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department... | what is the department description for the one whose name has the word computer? |
student_transcripts_tracking | select t1.first_name , t1.middle_name , t1.last_name , t1.student_id from students as t1 join student_enrolment as t2 on t1.student_id = t2.student_id group by t1.student_id having count(*) = 2 | Question: who are enrolled in 2 degree programs in one semester? list the first name, middle name and last name and the id. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_d... | who are enrolled in 2 degree programs in one semester? list the first name, middle name and last name and the id. |
student_transcripts_tracking | select t1.first_name , t1.middle_name , t1.last_name , t1.student_id from students as t1 join student_enrolment as t2 on t1.student_id = t2.student_id group by t1.student_id having count(*) = 2 | Question: what are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_des... | what are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester? |
student_transcripts_tracking | select distinct t1.first_name , t1.middle_name , t1.last_name from students as t1 join student_enrolment as t2 on t1.student_id = t2.student_id join degree_programs as t3 on t2.degree_program_id = t3.degree_program_id where t3.degree_summary_name = 'bachelor' | Question: who is enrolled in a bachelor degree program? list the first name, middle name, last name. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> ... | who is enrolled in a bachelor degree program? list the first name, middle name, last name. |
student_transcripts_tracking | select distinct t1.first_name , t1.middle_name , t1.last_name from students as t1 join student_enrolment as t2 on t1.student_id = t2.student_id join degree_programs as t3 on t2.degree_program_id = t3.degree_program_id where t3.degree_summary_name = 'bachelor' | Question: what are the first, middle, and last names for everybody enrolled in a bachelors program? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> d... | what are the first, middle, and last names for everybody enrolled in a bachelors program? |
student_transcripts_tracking | select t1.degree_summary_name from degree_programs as t1 join student_enrolment as t2 on t1.degree_program_id = t2.degree_program_id group by t1.degree_summary_name order by count(*) desc limit 1 | Question: find the kind of program which most number of students are enrolled in? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, depa... | find the kind of program which most number of students are enrolled in? |
student_transcripts_tracking | select t1.degree_summary_name from degree_programs as t1 join student_enrolment as t2 on t1.degree_program_id = t2.degree_program_id group by t1.degree_summary_name order by count(*) desc limit 1 | Question: what is the degree summary name that has the most number of students enrolled? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_i... | what is the degree summary name that has the most number of students enrolled? |
student_transcripts_tracking | select t1.degree_program_id , t1.degree_summary_name from degree_programs as t1 join student_enrolment as t2 on t1.degree_program_id = t2.degree_program_id group by t1.degree_program_id order by count(*) desc limit 1 | Question: find the program which most number of students are enrolled in. list both the id and the summary. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departme... | find the program which most number of students are enrolled in. list both the id and the summary. |
student_transcripts_tracking | select t1.degree_program_id , t1.degree_summary_name from degree_programs as t1 join student_enrolment as t2 on t1.degree_program_id = t2.degree_program_id group by t1.degree_program_id order by count(*) desc limit 1 | Question: what is the program id and the summary of the degree that has the most students enrolled? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> d... | what is the program id and the summary of the degree that has the most students enrolled? |
student_transcripts_tracking | select t1.student_id , t1.first_name , t1.middle_name , t1.last_name , count(*) , t1.student_id from students as t1 join student_enrolment as t2 on t1.student_id = t2.student_id group by t1.student_id order by count(*) desc limit 1 | Question: which student has enrolled for the most times in any program? list the id, first name, middle name, last name, the number of enrollments and student id. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, c... | which student has enrolled for the most times in any program? list the id, first name, middle name, last name, the number of enrollments and student id. |
student_transcripts_tracking | select t1.student_id , t1.first_name , t1.middle_name , t1.last_name , count(*) , t1.student_id from students as t1 join student_enrolment as t2 on t1.student_id = t2.student_id group by t1.student_id order by count(*) desc limit 1 | Question: what is the first, middle, and last name, along with the id and number of enrollments, for the student who enrolled the most in any program? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, ... | what is the first, middle, and last name, along with the id and number of enrollments, for the student who enrolled the most in any program? |
student_transcripts_tracking | select semester_name from semesters where semester_id not in( select semester_id from student_enrolment ) | Question: which semesters do not have any student enrolled? list the semester name. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, de... | which semesters do not have any student enrolled? list the semester name. |
student_transcripts_tracking | select semester_name from semesters where semester_id not in( select semester_id from student_enrolment ) | Question: what is the name of the semester with no students enrolled? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name,... | what is the name of the semester with no students enrolled? |
student_transcripts_tracking | select distinct t1.course_name from courses as t1 join student_enrolment_courses as t2 on t1.course_id = t2.course_id | Question: what are all the course names of the courses which ever have students enrolled in? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> departme... | what are all the course names of the courses which ever have students enrolled in? |
student_transcripts_tracking | select distinct t1.course_name from courses as t1 join student_enrolment_courses as t2 on t1.course_id = t2.course_id | Question: what are the names of all courses that have some students enrolled? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, departme... | what are the names of all courses that have some students enrolled? |
student_transcripts_tracking | select t1.course_name from courses as t1 join student_enrolment_courses as t2 on t1.course_id = t2.course_id group by t1.course_name order by count(*) desc limit 1 | Question: what's the name of the course with most number of enrollments? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_na... | what's the name of the course with most number of enrollments? |
student_transcripts_tracking | select t1.course_name from courses as t1 join student_enrolment_courses as t2 on t1.course_id = t2.course_id group by t1.course_name order by count(*) desc limit 1 | Question: what is the name of the course with the most students enrolled? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_n... | what is the name of the course with the most students enrolled? |
student_transcripts_tracking | select t1.last_name from students as t1 join addresses as t2 on t1.current_address_id = t2.address_id where t2.state_province_county = 'northcarolina' except select distinct t3.last_name from students as t3 join student_enrolment as t4 on t3.student_id = t4.student_id | Question: find the last name of the students who currently live in the state of north carolina but have not registered in any degree program. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_de... | find the last name of the students who currently live in the state of north carolina but have not registered in any degree program. |
student_transcripts_tracking | select t1.last_name from students as t1 join addresses as t2 on t1.current_address_id = t2.address_id where t2.state_province_county = 'northcarolina' except select distinct t3.last_name from students as t3 join student_enrolment as t4 on t3.student_id = t4.student_id | Question: what are the last name of the students who live in north carolina but have not registered in any degree programs? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_d... | what are the last name of the students who live in north carolina but have not registered in any degree programs? |
student_transcripts_tracking | select t2.transcript_date , t1.transcript_id from transcript_contents as t1 join transcripts as t2 on t1.transcript_id = t2.transcript_id group by t1.transcript_id having count(*) >= 2 | Question: show the date and id of the transcript with at least 2 course results. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, depar... | show the date and id of the transcript with at least 2 course results. |
student_transcripts_tracking | select t2.transcript_date , t1.transcript_id from transcript_contents as t1 join transcripts as t2 on t1.transcript_id = t2.transcript_id group by t1.transcript_id having count(*) >= 2 | Question: what is the date and id of the transcript with at least 2 courses listed? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, de... | what is the date and id of the transcript with at least 2 courses listed? |
student_transcripts_tracking | select cell_mobile_number from students where first_name = 'timmothy' and last_name = 'ward' | Question: what is the phone number of the man with the first name timmothy and the last name ward? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> de... | what is the phone number of the man with the first name timmothy and the last name ward? |
student_transcripts_tracking | select cell_mobile_number from students where first_name = 'timmothy' and last_name = 'ward' | Question: what is the mobile phone number of the student named timmothy ward ? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, departm... | what is the mobile phone number of the student named timmothy ward ? |
student_transcripts_tracking | select first_name , middle_name , last_name from students order by date_first_registered asc limit 1 | Question: who is the first student to register? list the first name, middle name and last name. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> depar... | who is the first student to register? list the first name, middle name and last name. |
student_transcripts_tracking | select first_name , middle_name , last_name from students order by date_first_registered asc limit 1 | Question: what is the first, middle, and last name of the first student to register? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, d... | what is the first, middle, and last name of the first student to register? |
student_transcripts_tracking | select first_name , middle_name , last_name from students order by date_left asc limit 1 | Question: who is the earliest graduate of the school? list the first name, middle name and last name. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments ->... | who is the earliest graduate of the school? list the first name, middle name and last name. |
student_transcripts_tracking | select first_name , middle_name , last_name from students order by date_left asc limit 1 | Question: what is the first, middle, and last name of the earliest school graduate? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, de... | what is the first, middle, and last name of the earliest school graduate? |
student_transcripts_tracking | select first_name from students where current_address_id != permanent_address_id | Question: whose permanent address is different from his or her current address? list his or her first name. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departme... | whose permanent address is different from his or her current address? list his or her first name. |
student_transcripts_tracking | select first_name from students where current_address_id != permanent_address_id | Question: what is the first name of the student whose permanent address is different from his or her current one? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. De... | what is the first name of the student whose permanent address is different from his or her current one? |
student_transcripts_tracking | select t1.address_id , t1.line_1 , t1.line_2 from addresses as t1 join students as t2 on t1.address_id = t2.current_address_id group by t1.address_id order by count(*) desc limit 1 | Question: which address holds the most number of students currently? list the address id and all lines. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments ... | which address holds the most number of students currently? list the address id and all lines. |
student_transcripts_tracking | select t1.address_id , t1.line_1 , t1.line_2 from addresses as t1 join students as t2 on t1.address_id = t2.current_address_id group by t1.address_id order by count(*) desc limit 1 | Question: what is the id, line 1, and line 2 of the address with the most students? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, de... | what is the id, line 1, and line 2 of the address with the most students? |
student_transcripts_tracking | select avg(transcript_date) from transcripts | Question: on average, when were the transcripts printed? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_d... | on average, when were the transcripts printed? |
student_transcripts_tracking | select avg(transcript_date) from transcripts | Question: what is the average transcript date? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_description... | what is the average transcript date? |
student_transcripts_tracking | select transcript_date , other_details from transcripts order by transcript_date asc limit 1 | Question: when is the first transcript released? list the date and details. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department... | when is the first transcript released? list the date and details. |
student_transcripts_tracking | select transcript_date , other_details from transcripts order by transcript_date asc limit 1 | Question: what is the earliest date of a transcript release, and what details can you tell me? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> depart... | what is the earliest date of a transcript release, and what details can you tell me? |
student_transcripts_tracking | select count(*) from transcripts | Question: how many transcripts are released? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_description, ... | how many transcripts are released? |
student_transcripts_tracking | select count(*) from transcripts | Question: how many transcripts are listed? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_description, ot... | how many transcripts are listed? |
student_transcripts_tracking | select transcript_date from transcripts order by transcript_date desc limit 1 | Question: what is the last transcript release date? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_descri... | what is the last transcript release date? |
student_transcripts_tracking | select transcript_date from transcripts order by transcript_date desc limit 1 | Question: when was the last transcript released? | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, other_details. Departments -> department_id, department_name, department_descripti... | when was the last transcript released? |
student_transcripts_tracking | select count(*) , student_course_id from transcript_contents group by student_course_id order by count(*) desc limit 1 | Question: how many times at most can a course enrollment result show in different transcripts? also show the course enrollment id. | Tables: Addresses -> address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. Courses -> course_id, course_name, course_description, ... | how many times at most can a course enrollment result show in different transcripts? also show the course enrollment id. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.