chat_prompt
stringlengths
438
1.53k
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_top_scorers\" (\n \"ranking\" real,\n \"nationality\" text,\n \"name\" text,\n \"years\" text,\n \"goals\" real\n);\n\nQuestion: What is the number of ranking when the nationalits is England with more than 53 goals?" }, { "role": "assistant", "content": "SELECT SUM(\"ranking\") FROM \"all_time_top_scorers\" WHERE \"nationality\"='england' AND \"goals\">53;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_top_scorers\" (\n \"ranking\" real,\n \"nationality\" text,\n \"name\" text,\n \"years\" text,\n \"goals\" real\n);\n\nQuestion: What is the lowest ranking for Paul Mctiernan?" }, { "role": "assistant", "content": "SELECT MIN(\"ranking\") FROM \"all_time_top_scorers\" WHERE \"name\"='paul mctiernan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_top_scorers\" (\n \"ranking\" real,\n \"nationality\" text,\n \"name\" text,\n \"years\" text,\n \"goals\" real\n);\n\nQuestion: What are the years when the ranking is less than 8 with less than 66 goals and name is Paul McGee?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"all_time_top_scorers\" WHERE \"ranking\"<8 AND \"goals\"<66 AND \"name\"='paul mcgee';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which entrant has a year after 1999?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"complete_formula_one_results\" WHERE \"year\">1999;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_at_the_pga_grand_slam_of_gol\" (\n \"year\" real,\n \"round_1\" text,\n \"round_2\" text,\n \"place\" real,\n \"money\" real\n);\n\nQuestion: Round 1 of beat lee janzen 3&2, and a Year smaller than 1998 has what total number of place?" }, { "role": "assistant", "content": "SELECT COUNT(\"place\") FROM \"performance_at_the_pga_grand_slam_of_gol\" WHERE \"round_1\"='beat lee janzen 3&2' AND \"year\"<1998;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_at_the_pga_grand_slam_of_gol\" (\n \"year\" real,\n \"round_1\" text,\n \"round_2\" text,\n \"place\" real,\n \"money\" real\n);\n\nQuestion: Round 1 of 71 has how many highest money?" }, { "role": "assistant", "content": "SELECT MAX(\"money\") FROM \"performance_at_the_pga_grand_slam_of_gol\" WHERE \"round_1\"='71';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_at_the_pga_grand_slam_of_gol\" (\n \"year\" real,\n \"round_1\" text,\n \"round_2\" text,\n \"place\" real,\n \"money\" real\n);\n\nQuestion: Round 1 of 66, and a Money ($) larger than 400,000 has what sum of year?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"performance_at_the_pga_grand_slam_of_gol\" WHERE \"round_1\"='66' AND \"money\">'400,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_at_the_pga_grand_slam_of_gol\" (\n \"year\" real,\n \"round_1\" text,\n \"round_2\" text,\n \"place\" real,\n \"money\" real\n);\n\nQuestion: Round 1 of 70, and a Money ($) larger than 500,000 has the highest year?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"performance_at_the_pga_grand_slam_of_gol\" WHERE \"round_1\"='70' AND \"money\">'500,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers_in_uefa_club_competitions\" (\n \"rank\" real,\n \"player\" text,\n \"goals\" real,\n \"games\" real,\n \"debut_in_europe\" real\n);\n\nQuestion: When was the latest debut in Europe for Henrik Larsson, with less than 108 games?" }, { "role": "assistant", "content": "SELECT MAX(\"debut_in_europe\") FROM \"top_scorers_in_uefa_club_competitions\" WHERE \"player\"='henrik larsson' AND \"games\"<108;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers_in_uefa_club_competitions\" (\n \"rank\" real,\n \"player\" text,\n \"goals\" real,\n \"games\" real,\n \"debut_in_europe\" real\n);\n\nQuestion: What were the lowest goals with a debut before 1961 in Europe?" }, { "role": "assistant", "content": "SELECT MIN(\"goals\") FROM \"top_scorers_in_uefa_club_competitions\" WHERE \"debut_in_europe\"<1961;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers_in_uefa_club_competitions\" (\n \"rank\" real,\n \"player\" text,\n \"goals\" real,\n \"games\" real,\n \"debut_in_europe\" real\n);\n\nQuestion: What was Thierry Henry's average goal when his rank was higher than 7?" }, { "role": "assistant", "content": "SELECT AVG(\"goals\") FROM \"top_scorers_in_uefa_club_competitions\" WHERE \"player\"='thierry henry' AND \"rank\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_9_5_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the surface for february 25, 1996" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_9_5_4\" WHERE \"date\"='february 25, 1996';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_9_5_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the tournament for may 18, 1997" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_9_5_4\" WHERE \"date\"='may 18, 1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_9_5_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the partner for may 2, 1993" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"doubles_9_5_4\" WHERE \"date\"='may 2, 1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_9_5_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the opponents for may 18, 1997" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"doubles_9_5_4\" WHERE \"date\"='may 18, 1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_power_translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: When the call sign is wpib, what is lowest ERP W?" }, { "role": "assistant", "content": "SELECT MIN(\"erp_w\") FROM \"full_power_translators\" WHERE \"call_sign\"='wpib';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_power_translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which class's call sign is wokg?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"full_power_translators\" WHERE \"call_sign\"='wokg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"full_power_translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: The frequency 89.3 belongs to what class?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"full_power_translators\" WHERE \"frequency_m_hz\"=89.3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"human_sacrifice_and_mass_suicide\" (\n \"low_estimate\" real,\n \"high_estimate\" real,\n \"type\" text,\n \"location\" text,\n \"date\" text\n);\n\nQuestion: With a type of mass suicide located in France and a low estimate greater than 16, the sum of the high estimate numbers listed is what number?" }, { "role": "assistant", "content": "SELECT SUM(\"high_estimate\") FROM \"human_sacrifice_and_mass_suicide\" WHERE \"type\"='mass suicide' AND \"location\"='france' AND \"low_estimate\">16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"human_sacrifice_and_mass_suicide\" (\n \"low_estimate\" real,\n \"high_estimate\" real,\n \"type\" text,\n \"location\" text,\n \"date\" text\n);\n\nQuestion: What is the sum of low estimate(s) that is listed for the date of 1978?" }, { "role": "assistant", "content": "SELECT SUM(\"low_estimate\") FROM \"human_sacrifice_and_mass_suicide\" WHERE \"date\"='1978';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_by_club\" (\n \"clubs\" text,\n \"winners\" real,\n \"runners_up\" real,\n \"total_finals\" real,\n \"winnig_years\" text\n);\n\nQuestion: What is the highest total number of finals a club with more than 2 runners-up and fewer than 1 winner went to?" }, { "role": "assistant", "content": "SELECT MAX(\"total_finals\") FROM \"winners_by_club\" WHERE \"runners_up\">2 AND \"winners\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"college_career\" (\n \"year\" text,\n \"games\" real,\n \"rushes\" real,\n \"rushing_yards\" real,\n \"rushing_t_ds\" real,\n \"receptions\" real,\n \"receiving_yards\" real,\n \"receiving_t_ds\" real\n);\n\nQuestion: How many receptions were smaller than 161 receiving yards but also had less than 14 rushing TDs?" }, { "role": "assistant", "content": "SELECT COUNT(\"receptions\") FROM \"college_career\" WHERE \"receiving_yards\"<161 AND \"rushing_t_ds\"<14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"college_career\" (\n \"year\" text,\n \"games\" real,\n \"rushes\" real,\n \"rushing_yards\" real,\n \"rushing_t_ds\" real,\n \"receptions\" real,\n \"receiving_yards\" real,\n \"receiving_t_ds\" real\n);\n\nQuestion: What was the greatest number of rushing yards for a runner who had 283 rushes and less than 10 rushing TDs?" }, { "role": "assistant", "content": "SELECT MAX(\"rushing_yards\") FROM \"college_career\" WHERE \"rushes\"=283 AND \"rushing_t_ds\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the Agg., when Team 1 was VSADC?" }, { "role": "assistant", "content": "SELECT \"agg\" FROM \"first_round\" WHERE \"team_1\"='vsadc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many goals were scored by the team that played less than 38 games, and had points of 47+9?" }, { "role": "assistant", "content": "SELECT MAX(\"goals_for\") FROM \"final_table\" WHERE \"points\"='47+9' AND \"played\"<38;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the average wins of the team with more than 13 draws, a goal difference of -14, and losses less than 14?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"final_table\" WHERE \"draws\">13 AND \"goal_difference\"=-14 AND \"losses\"<14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: In the club of Real Oviedo, what were the points of the competitor with a goal difference less than 38, and 12 wins?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"final_table\" WHERE \"goal_difference\"<38 AND \"wins\"=12 AND \"club\"='real oviedo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the visitor with attendance more than 14,646 and home of los angeles" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"regular_season\" WHERE \"attendance\">'14,646' AND \"home\"='los angeles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the record for february 25" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"date\"='february 25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_players\" (\n \"nationality\" text,\n \"position_a\" text,\n \"milan_career\" text,\n \"captaincy\" text,\n \"appearances\" real,\n \"goals\" real\n);\n\nQuestion: What nationality has 116 appearances?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"list_of_players\" WHERE \"appearances\"=116;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_players\" (\n \"nationality\" text,\n \"position_a\" text,\n \"milan_career\" text,\n \"captaincy\" text,\n \"appearances\" real,\n \"goals\" real\n);\n\nQuestion: What is the captaincy for Defender that has less than 212 appearances and 12 goals?" }, { "role": "assistant", "content": "SELECT \"captaincy\" FROM \"list_of_players\" WHERE \"appearances\"<212 AND \"goals\"=12 AND \"position_a\"='defender';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"score\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: Attendance larger than 55,189 is which average game?" }, { "role": "assistant", "content": "SELECT AVG(\"game\") FROM \"summary\" WHERE \"attendance\">'55,189';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"score\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: Game larger than 4, and a Time of 2:26 resulted in what score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"summary\" WHERE \"game\">4 AND \"time\"='2:26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What record does the event of dream 9 with a round of 2 hold?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=2 AND \"event\"='dream 9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What time was Opponent Fredson Paix\u00e3o beaten in?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='fredson paix\u00e3o';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"format\" (\n \"phase\" text,\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" text,\n \"new_entries_this_round\" text,\n \"leagues_entering_at_this_round\" text\n);\n\nQuestion: What league is entering this round with 24 clubs remaining?" }, { "role": "assistant", "content": "SELECT \"leagues_entering_at_this_round\" FROM \"format\" WHERE \"clubs_remaining\"=24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"format\" (\n \"phase\" text,\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" text,\n \"new_entries_this_round\" text,\n \"leagues_entering_at_this_round\" text\n);\n\nQuestion: How many new entries are there for a second phase that has 4 winners from previous rounds?" }, { "role": "assistant", "content": "SELECT \"new_entries_this_round\" FROM \"format\" WHERE \"phase\"='second phase' AND \"winners_from_previous_round\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the highest number of laps with a 21 start?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"indy_500_results\" WHERE \"start\"='21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the qual for rank 20?" }, { "role": "assistant", "content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"rank\"='20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the average number of laps in 1949?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"indy_500_results\" WHERE \"year\"='1949';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the total number of laps with a 128.260 qual?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"indy_500_results\" WHERE \"qual\"='128.260';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the start number for a rank 11 race with less than 200 laps?" }, { "role": "assistant", "content": "SELECT \"start\" FROM \"indy_500_results\" WHERE \"laps\"<200 AND \"rank\"='11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_in_presidential_elections\" (\n \"year\" real,\n \"candidate\" text,\n \"state_s_on_the_ballot\" text,\n \"popular_votes\" real,\n \"percentage\" text\n);\n\nQuestion: Name the staes on the ballot for jack herer" }, { "role": "assistant", "content": "SELECT \"state_s_on_the_ballot\" FROM \"results_in_presidential_elections\" WHERE \"candidate\"='jack herer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Name the loss with record of 45-59" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='45-59';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Name the loss with record of 38-53" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='38-53';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Name the score for record 33-47" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='33-47';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Name the attendance with record of 34-51" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"record\"='34-51';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Name the opponent with attendance of 31,777" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"attendance\"='31,777';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_2011_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many points drew 2 with a losing bonus of 5?" }, { "role": "assistant", "content": "SELECT \"points_for\" FROM \"2010_2011_table\" WHERE \"drawn\"='2' AND \"losing_bonus\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_2011_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is the number of tries for that has 30 tries against?" }, { "role": "assistant", "content": "SELECT \"tries_for\" FROM \"2010_2011_table\" WHERE \"tries_against\"='30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_2011_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many points did the Bridgend Athletic RFC have?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"2010_2011_table\" WHERE \"club\"='bridgend athletic rfc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_2011_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many points were scored against the club that drew 3 and scored 50 points?" }, { "role": "assistant", "content": "SELECT \"points_against\" FROM \"2010_2011_table\" WHERE \"drawn\"='3' AND \"points\"='50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_2011_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What try bonus drew 0 and scored 427 points for?" }, { "role": "assistant", "content": "SELECT \"try_bonus\" FROM \"2010_2011_table\" WHERE \"drawn\"='0' AND \"points_for\"='427';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What was the qualifying time of Jim Rathmann in 1959?" }, { "role": "assistant", "content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"year\"='1959';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the most recent championship for FISA?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='fisa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the average points earned for entrants with ATS V8 engines?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='ats v8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_finals_9_titles_2_runner_ups\" (\n \"outcome\" real,\n \"year\" real,\n \"tournament\" text,\n \"opponent_in_final\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome from the 2009 match in the final against Chong Wei Feng?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"career_finals_9_titles_2_runner_ups\" WHERE \"year\"=2009 AND \"opponent_in_final\"='chong wei feng';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_2008_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What was the try bonus for the team with 25 tries for?" }, { "role": "assistant", "content": "SELECT \"try_bonus\" FROM \"2007_2008_table\" WHERE \"tries_for\"='25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_2008_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: How many points for did Bridgend Athletic RFC score?" }, { "role": "assistant", "content": "SELECT \"points_for\" FROM \"2007_2008_table\" WHERE \"club\"='bridgend athletic rfc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_2008_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: How many tries for did the team with a try bonus of 5 score?" }, { "role": "assistant", "content": "SELECT \"tries_for\" FROM \"2007_2008_table\" WHERE \"try_bonus\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_2008_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: How many points against did the team that allowed 42 tries against allow?" }, { "role": "assistant", "content": "SELECT \"points_against\" FROM \"2007_2008_table\" WHERE \"tries_against\"='42';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average number of bronze medals associated with 0 silver, 1 total, and ranks over 16?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"total\"=1 AND \"silver\"=0 AND \"rank\">16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest total number of medals associated with 1 gold, more than 0 silver, and 2 bronze?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"medal_table\" WHERE \"bronze\"=2 AND \"gold\"=1 AND \"silver\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of Total values associated with mroe than 3 silvers, more than 2 bronze, and a rank of 3?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"silver\">3 AND \"rank\"=3 AND \"bronze\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest Silver value associated with teams having more than 0 gold, 0 bronze, and a rank of 14?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"bronze\"=0 AND \"rank\"=14 AND \"gold\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" real,\n \"best\" real\n);\n\nQuestion: What is the qual 1 for conquest racing?" }, { "role": "assistant", "content": "SELECT \"qual_1\" FROM \"qualifying_results\" WHERE \"team\"='conquest racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" real,\n \"best\" real\n);\n\nQuestion: Graham rahal for n/h/l racing has a qual 2 greater than 59.384 and how much lowest best?" }, { "role": "assistant", "content": "SELECT MIN(\"best\") FROM \"qualifying_results\" WHERE \"team\"='n/h/l racing' AND \"name\"='graham rahal' AND \"qual_2\">59.384;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" real,\n \"best\" real\n);\n\nQuestion: What is the total best for Bruno junqueira" }, { "role": "assistant", "content": "SELECT SUM(\"best\") FROM \"qualifying_results\" WHERE \"name\"='bruno junqueira';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"year_joined\" real,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: What is the Mascot of Brook?" }, { "role": "assistant", "content": "SELECT \"mascot\" FROM \"former_members\" WHERE \"location\"='brook';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"year_joined\" real,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: When was the first year when Fowler joined?" }, { "role": "assistant", "content": "SELECT MIN(\"year_left\") FROM \"former_members\" WHERE \"location\"='fowler';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clinical_pipeline_of_marine_pharmacology\" (\n \"clinical_status\" text,\n \"compound_name\" text,\n \"trademark\" text,\n \"marine_organism\" text,\n \"chemical_class\" text,\n \"molecular_target\" text,\n \"clinical_trials\" text,\n \"disease_area\" text\n);\n\nQuestion: What is the molecular target of bacterium?" }, { "role": "assistant", "content": "SELECT \"molecular_target\" FROM \"clinical_pipeline_of_marine_pharmacology\" WHERE \"marine_organism\"='bacterium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clinical_pipeline_of_marine_pharmacology\" (\n \"clinical_status\" text,\n \"compound_name\" text,\n \"trademark\" text,\n \"marine_organism\" text,\n \"chemical_class\" text,\n \"molecular_target\" text,\n \"clinical_trials\" text,\n \"disease_area\" text\n);\n\nQuestion: What is the organism that has a disease area of cancer and has 4/4 clinical trial b?" }, { "role": "assistant", "content": "SELECT \"marine_organism\" FROM \"clinical_pipeline_of_marine_pharmacology\" WHERE \"disease_area\"='cancer' AND \"clinical_trials\"='4/4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clinical_pipeline_of_marine_pharmacology\" (\n \"clinical_status\" text,\n \"compound_name\" text,\n \"trademark\" text,\n \"marine_organism\" text,\n \"chemical_class\" text,\n \"molecular_target\" text,\n \"clinical_trials\" text,\n \"disease_area\" text\n);\n\nQuestion: What is the molecular target of the organism that has a disease area of antiviral?" }, { "role": "assistant", "content": "SELECT \"molecular_target\" FROM \"clinical_pipeline_of_marine_pharmacology\" WHERE \"disease_area\"='antiviral';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: On what date was the record 62\u201384?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='62\u201384';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the record on September 4?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='september 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the record on September 26?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='september 26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent with a Loss of Leal (1\u20134)?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"loss\"='leal (1\u20134)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"great_northern_railway\" (\n \"class\" text,\n \"type\" text,\n \"fleet_numbers\" text,\n \"quantity_made\" real,\n \"manufacturer\" text,\n \"date_made\" text,\n \"1958_ci\" real,\n \"1958_uta\" real,\n \"date_withdrawn\" text\n);\n\nQuestion: In the Class T, what is the total of the 1958 UTA?" }, { "role": "assistant", "content": "SELECT COUNT(\"1958_uta\") FROM \"great_northern_railway\" WHERE \"class\"='t';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jo_o_pinto_international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result of the match played on 13 October 1993?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"jo_o_pinto_international_goals\" WHERE \"date\"='13 october 1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jo_o_pinto_international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: When did the team score 21 goals?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"jo_o_pinto_international_goals\" WHERE \"goal\"=21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jo_o_pinto_international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score of the match played on 14 October 1998, resulting in more than 10 goals?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"jo_o_pinto_international_goals\" WHERE \"date\"='14 october 1998' AND \"goal\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" text\n);\n\nQuestion: What is the total number of years that Scuderia Guastalla was an entrant?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='scuderia guastalla';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" text\n);\n\nQuestion: What was the earliest year that Scuderia Ferrari was an entrant with 0 points?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"points\"='0' AND \"entrant\"='scuderia ferrari';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" text\n);\n\nQuestion: What is the total number of years that has a chassis of Ferrari 625 and 2 points?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='ferrari 625' AND \"points\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"21st_century\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What players played mixed doubles when zhang xi played mixed singles?" }, { "role": "assistant", "content": "SELECT \"mixed_doubles\" FROM \"21st_century\" WHERE \"women_s_singles\"='zhang xi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"21st_century\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What player played women's singles when marcus ellis heather olver played mixed doubles?" }, { "role": "assistant", "content": "SELECT \"women_s_singles\" FROM \"21st_century\" WHERE \"mixed_doubles\"='marcus ellis heather olver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"21st_century\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What player played women's doubles when lee jae-jin lee eun-woo played mixed doubles?" }, { "role": "assistant", "content": "SELECT \"women_s_doubles\" FROM \"21st_century\" WHERE \"mixed_doubles\"='lee jae-jin lee eun-woo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"21st_century\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What year did helle nielsen marie r\u00f8pke play womens' doubles?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"21st_century\" WHERE \"women_s_doubles\"='helle nielsen marie r\u00f8pke';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"21st_century\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What is the latest year that chou tien-chen played men's singles?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"21st_century\" WHERE \"men_s_singles\"='chou tien-chen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"guest_appearances\" (\n \"year\" real,\n \"song\" text,\n \"work_done\" text,\n \"artist_s\" text,\n \"album\" text\n);\n\nQuestion: Which 2006 Cobra Starship song has work done of guest vocals?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"guest_appearances\" WHERE \"work_done\"='guest vocals' AND \"year\"=2006 AND \"artist_s\"='cobra starship';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"westland_district\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the decile sum with a roll smaller than 25, and franz josef area?" }, { "role": "assistant", "content": "SELECT SUM(\"decile\") FROM \"westland_district\" WHERE \"roll\"<25 AND \"area\"='franz josef';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"westland_district\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the area with decile of 8, and a 25 roll?" }, { "role": "assistant", "content": "SELECT \"area\" FROM \"westland_district\" WHERE \"decile\"=8 AND \"roll\"=25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the overall pick average with the pick # lower than 15?" }, { "role": "assistant", "content": "SELECT AVG(\"overall\") FROM \"indianapolis_colts_draft_history\" WHERE \"pick_num\"<15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winter_paralmypics\" (\n \"games\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real,\n \"rank\" real\n);\n\nQuestion: What is the lowest rank for Spain when more than 10 medals were won, 3 of which were bronze?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"winter_paralmypics\" WHERE \"bronze\"=3 AND \"total\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the Qual listed on the Year of 1954?" }, { "role": "assistant", "content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"year\"='1954';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Which Year has a Qual of 144.683 and Lap larger than 27?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"indy_500_results\" WHERE \"laps\">27 AND \"qual\"='144.683';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What's the Qual listed with a Rank of 27?" }, { "role": "assistant", "content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"rank\"='27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which Team has a Year of 1978?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\"=1978;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which Engine has a Team of Chesterfield Racing and include a Chassis of March 761?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"complete_formula_one_world_championship_\" WHERE \"team\"='chesterfield racing' AND \"chassis\"='march 761';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_strikes\" (\n \"year\" real,\n \"sport\" text,\n \"artist\" text,\n \"mintage\" real,\n \"issue_price\" text,\n \"release_date\" text\n);\n\nQuestion: What is the smallest year with a Mintage smaller than 10,000?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"first_strikes\" WHERE \"mintage\"<'10,000';" } ]