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 \"first_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: How many draws did clitheroe have when their position was less than 12 and they lost less than 4 times?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"drawn\") FROM \"first_division_final_table\" WHERE \"position\"<12 AND \"team\"='clitheroe' AND \"lost\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the reserved for (ST/ST/None) when it was Uklana?"
},
{
"role": "assistant",
"content": "SELECT \"reserved_for_sc_st_none\" FROM \"assembly_segments\" WHERE \"name\"='uklana';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: Bhiwani district have what constituency number?"
},
{
"role": "assistant",
"content": "SELECT \"constituency_number\" FROM \"assembly_segments\" WHERE \"district\"='bhiwani';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the reserved for (SC/ST/None) when number of electorates (2009) is larger than 101,595, and constituency is 49?"
},
{
"role": "assistant",
"content": "SELECT \"reserved_for_sc_st_none\" FROM \"assembly_segments\" WHERE \"number_of_electorates_2009\">'101,595' AND \"constituency_number\"='49';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the constituency number with electorates (2009) number larger than 152,958?"
},
{
"role": "assistant",
"content": "SELECT \"constituency_number\" FROM \"assembly_segments\" WHERE \"number_of_electorates_2009\">'152,958';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_4_july_30_and_31_2008\" (\n \"main_contestant\" text,\n \"co_contestant_yaar_vs_pyaar\" text,\n \"date_performed\" text,\n \"scores_by_each_individual_judge\" text,\n \"total_score_week\" text,\n \"position\" text,\n \"status\" text\n);\n\nQuestion: What is the date of the performance by Jatin Shah and co-contestant is Shalini Chandran?"
},
{
"role": "assistant",
"content": "SELECT \"date_performed\" FROM \"week_4_july_30_and_31_2008\" WHERE \"main_contestant\"='jatin shah' AND \"co_contestant_yaar_vs_pyaar\"='shalini chandran';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_4_july_30_and_31_2008\" (\n \"main_contestant\" text,\n \"co_contestant_yaar_vs_pyaar\" text,\n \"date_performed\" text,\n \"scores_by_each_individual_judge\" text,\n \"total_score_week\" text,\n \"position\" text,\n \"status\" text\n);\n\nQuestion: What are the scores when total score/week is 41/60 and co-contestant is Shalini Chandran?"
},
{
"role": "assistant",
"content": "SELECT \"scores_by_each_individual_judge\" FROM \"week_4_july_30_and_31_2008\" WHERE \"total_score_week\"='41/60' AND \"co_contestant_yaar_vs_pyaar\"='shalini chandran';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_4_july_30_and_31_2008\" (\n \"main_contestant\" text,\n \"co_contestant_yaar_vs_pyaar\" text,\n \"date_performed\" text,\n \"scores_by_each_individual_judge\" text,\n \"total_score_week\" text,\n \"position\" text,\n \"status\" text\n);\n\nQuestion: What position is there when the main contestant is Vishal Singh and the scores are 1 + 7 + 5 = 13?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"week_4_july_30_and_31_2008\" WHERE \"main_contestant\"='vishal singh' AND \"scores_by_each_individual_judge\"='1 + 7 + 5 = 13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_4_july_30_and_31_2008\" (\n \"main_contestant\" text,\n \"co_contestant_yaar_vs_pyaar\" text,\n \"date_performed\" text,\n \"scores_by_each_individual_judge\" text,\n \"total_score_week\" text,\n \"position\" text,\n \"status\" text\n);\n\nQuestion: Who is the main contestant when the co-contestant (yaar vs. pyaar) is Shalini Chandran?"
},
{
"role": "assistant",
"content": "SELECT \"main_contestant\" FROM \"week_4_july_30_and_31_2008\" WHERE \"co_contestant_yaar_vs_pyaar\"='shalini chandran';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_4_july_30_and_31_2008\" (\n \"main_contestant\" text,\n \"co_contestant_yaar_vs_pyaar\" text,\n \"date_performed\" text,\n \"scores_by_each_individual_judge\" text,\n \"total_score_week\" text,\n \"position\" text,\n \"status\" text\n);\n\nQuestion: Who is the main contestant eliminated with a score of 1 + 7 + 5 = 13?"
},
{
"role": "assistant",
"content": "SELECT \"main_contestant\" FROM \"week_4_july_30_and_31_2008\" WHERE \"status\"='eliminated' AND \"scores_by_each_individual_judge\"='1 + 7 + 5 = 13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"czech_republic\" (\n \"seat\" real,\n \"series_1\" text,\n \"series_2\" text,\n \"series_3\" text,\n \"series_4\" text\n);\n\nQuestion: What shows for series 4 when the seat shows 1?"
},
{
"role": "assistant",
"content": "SELECT \"series_4\" FROM \"czech_republic\" WHERE \"seat\"=1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"czech_republic\" (\n \"seat\" real,\n \"series_1\" text,\n \"series_2\" text,\n \"series_3\" text,\n \"series_4\" text\n);\n\nQuestion: What is the seat number when Series 3 shows Dana B\u00e9rov\u00e1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"seat\") FROM \"czech_republic\" WHERE \"series_3\"='dana b\u00e9rov\u00e1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"double_titles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who was the Partner in the Algiers 2, Algeria Tournament?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"double_titles_5\" WHERE \"tournament\"='algiers 2, algeria';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"double_titles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who were the Opponents in the Match with Partner Rushmi Chakravarthi?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"double_titles_5\" WHERE \"partner\"='rushmi chakravarthi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"double_titles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Date of the Match with a Score of 6\u20134, 7\u20135?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"double_titles_5\" WHERE \"score\"='6\u20134, 7\u20135';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1_lyga\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the fewest loses for the club that is below 8 in position, and had played less than 30 games?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"loses\") FROM \"1_lyga\" WHERE \"position\"<8 AND \"games_played\"<30;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1_lyga\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the loses total when there is less than 4 draws, less than 105 conceded goals, less than 38 goals scored, and the club is positioned greater than 2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"loses\") FROM \"1_lyga\" WHERE \"draws\"<4 AND \"goals_conceded\"<105 AND \"position\">2 AND \"goals_scored\"<38;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1_lyga\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: How many total goals conceded are there when the points are greater than 58, less than 27 wins, and less than 1 draws?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"goals_conceded\") FROM \"1_lyga\" WHERE \"points\">58 AND \"wins\"<27 AND \"draws\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1_lyga\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: How many total goals scored when less than 30 games have been played?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_scored\") FROM \"1_lyga\" WHERE \"games_played\"<30;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1_lyga\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: When less than 30 games have been played what is the average goals scored?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals_scored\") FROM \"1_lyga\" WHERE \"games_played\"<30;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the league cup app with league cup goals more than 0?"
},
{
"role": "assistant",
"content": "SELECT \"league_cup_apps\" FROM \"appearances_and_goals\" WHERE \"league_cup_goals\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the fa cup apps with 0 league cup goals, and a total of 43 apps?"
},
{
"role": "assistant",
"content": "SELECT \"fa_cup_apps\" FROM \"appearances_and_goals\" WHERE \"league_cup_goals\"=0 AND \"total_apps\"='43';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the highest FLT goals with 0 league cup goals, a GK position, and 2 league cup apps?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"flt_goals\") FROM \"appearances_and_goals\" WHERE \"league_cup_goals\"=0 AND \"position\"='gk' AND \"league_cup_apps\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: On what date is the venue Sam Nujoma Stadium, Windhoek, Namibia?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"venue\"='sam nujoma stadium, windhoek, namibia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_seasons_1994_2003\" (\n \"season\" real,\n \"winners\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_placed\" text,\n \"number_of_clubs\" real\n);\n\nQuestion: Who was in third place when the Winner was Dalian Shide, Chongqing Longxin was 4th and 14 clubs?"
},
{
"role": "assistant",
"content": "SELECT \"third_place\" FROM \"professional_seasons_1994_2003\" WHERE \"number_of_clubs\"=14 AND \"winners\"='dalian shide' AND \"fourth_placed\"='chongqing longxin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_seasons_1994_2003\" (\n \"season\" real,\n \"winners\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_placed\" text,\n \"number_of_clubs\" real\n);\n\nQuestion: What season had Dalian Wanda as the winner with Yanbian Aodong winning 4th?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"season\") FROM \"professional_seasons_1994_2003\" WHERE \"winners\"='dalian wanda' AND \"fourth_placed\"='yanbian aodong';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_seasons_1994_2003\" (\n \"season\" real,\n \"winners\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_placed\" text,\n \"number_of_clubs\" real\n);\n\nQuestion: What is the number of clubs before 2003 with a 4th place winner of Shenzhen Jianlibao?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"number_of_clubs\") FROM \"professional_seasons_1994_2003\" WHERE \"fourth_placed\"='shenzhen jianlibao' AND \"season\"<2003;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_seasons_1994_2003\" (\n \"season\" real,\n \"winners\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_placed\" text,\n \"number_of_clubs\" real\n);\n\nQuestion: What is the number of clubs when Dalian Shide won and Sichuan Quanxing won 4th?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"number_of_clubs\") FROM \"professional_seasons_1994_2003\" WHERE \"winners\"='dalian shide' AND \"fourth_placed\"='sichuan quanxing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_seasons_1994_2003\" (\n \"season\" real,\n \"winners\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_placed\" text,\n \"number_of_clubs\" real\n);\n\nQuestion: Who was the winner when the runner-up was Guangzhou Apollo?"
},
{
"role": "assistant",
"content": "SELECT \"winners\" FROM \"professional_seasons_1994_2003\" WHERE \"runners_up\"='guangzhou apollo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_ladder\" (\n \"lexton_plains\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many Byes have an Against of 972, and more than 11 wins?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"byes\") FROM \"2010_ladder\" WHERE \"against\"=972 AND \"wins\">11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_ladder\" (\n \"lexton_plains\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Which Byes have a Lexton Plains of skipton?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"byes\") FROM \"2010_ladder\" WHERE \"lexton_plains\"='skipton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_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 value for Lost when Drawn is 0, and Tries against is 41?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"league_table\" WHERE \"drawn\"='0' AND \"tries_against\"='41';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_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 drawn value for furnace united rfc?"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"league_table\" WHERE \"club\"='furnace united rfc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_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 tries against value does burry port rfc have?"
},
{
"role": "assistant",
"content": "SELECT \"tries_against\" FROM \"league_table\" WHERE \"club\"='burry port rfc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_cruising_in_europe\" (\n \"ship_name\" text,\n \"year_built_refurbished\" text,\n \"length\" text,\n \"crew\" real,\n \"guests\" real,\n \"staterooms\" real,\n \"comments\" text\n);\n\nQuestion: Of the ships with diesel-electric hybrid engines, length of 443 feet, and over 190 guests, what is the lowest number of staterooms?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"staterooms\") FROM \"ships_cruising_in_europe\" WHERE \"comments\"='diesel-electric hybrid engines' AND \"length\"='443 feet' AND \"guests\">190;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: How many wins for the year that is later than 1987 and has points less than 188?"
},
{
"role": "assistant",
"content": "SELECT \"wins\" FROM \"grand_prix_career_statistics\" WHERE \"year\">1987 AND \"points\"<188;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the name of the machine that ranked 4th and has 2 wins?"
},
{
"role": "assistant",
"content": "SELECT \"machine\" FROM \"grand_prix_career_statistics\" WHERE \"rank\"='4th' AND \"wins\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: How many wins were there in 1994?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"grand_prix_career_statistics\" WHERE \"year\"=1994;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the rank associated with the team that has more than 2 wins and has greater than 204 points?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"grand_prix_career_statistics\" WHERE \"wins\">2 AND \"points\">204;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: How many picks have a Player of pong escobal?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick\") FROM \"round_2\" WHERE \"player\"='pong escobal';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: Which PBA team has a College of nu?"
},
{
"role": "assistant",
"content": "SELECT \"pba_team\" FROM \"round_2\" WHERE \"college\"='nu';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_participants\" (\n \"elector\" text,\n \"place_of_birth\" text,\n \"cardinalatial_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What is the birth place for someone elevated by Lucius III, and has the Cardinalatial title of Deacon of S. Giorgio in Velabro?"
},
{
"role": "assistant",
"content": "SELECT \"place_of_birth\" FROM \"list_of_participants\" WHERE \"elevator\"='lucius iii' AND \"cardinalatial_title\"='deacon of s. giorgio in velabro';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_participants\" (\n \"elector\" text,\n \"place_of_birth\" text,\n \"cardinalatial_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What is the place of birth for the elector Laborante de Panormo?"
},
{
"role": "assistant",
"content": "SELECT \"place_of_birth\" FROM \"list_of_participants\" WHERE \"elector\"='laborante de panormo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_participants\" (\n \"elector\" text,\n \"place_of_birth\" text,\n \"cardinalatial_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: Who is the elector that has the cardinalatial title of Deacon of SS. Cosma e Damiano?"
},
{
"role": "assistant",
"content": "SELECT \"elector\" FROM \"list_of_participants\" WHERE \"cardinalatial_title\"='deacon of ss. cosma e damiano';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_participants\" (\n \"elector\" text,\n \"place_of_birth\" text,\n \"cardinalatial_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: Who is the elevator with the cardinalatial title of Deacon of SS. Sergio e Bacco?"
},
{
"role": "assistant",
"content": "SELECT \"elevator\" FROM \"list_of_participants\" WHERE \"cardinalatial_title\"='deacon of ss. sergio e bacco';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goalscorers\" (\n \"name\" text,\n \"premier_league\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: How much Premier League has an FA Cup of 0, and a Total of 1, and a UEFA Cup larger than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"premier_league\") FROM \"goalscorers\" WHERE \"fa_cup\"=0 AND \"total\"=1 AND \"uefa_cup\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goalscorers\" (\n \"name\" text,\n \"premier_league\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: How many totals have a Premier League smaller than 6, and a League Cup larger than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"goalscorers\" WHERE \"premier_league\"<6 AND \"league_cup\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goalscorers\" (\n \"name\" text,\n \"premier_league\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: Which FA Cup has a Total smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"fa_cup\") FROM \"goalscorers\" WHERE \"total\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What week is the opponent the Indianapolis Colts with an attendance of 68,932?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"attendance\"='68,932' AND \"opponent\"='indianapolis colts';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance for the week before 10 with a result of L 12-15"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"<10 AND \"result\"='l 12-15';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What week has a result of L 17-31 first?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"result\"='l 17-31';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the score for the game that attendance was 70,721?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='70,721';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"week\" real,\n \"partner\" text,\n \"dance\" text,\n \"song\" text,\n \"result\" text\n);\n\nQuestion: What week was she safe for a salsa dance?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"week\") FROM \"performances\" WHERE \"result\"='safe' AND \"dance\"='salsa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_boxing_record\" (\n \"result\" text,\n \"opponent\" text,\n \"type\" text,\n \"rd_time\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: Who was the opponent with the loss in Westbury, NY?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"professional_boxing_record\" WHERE \"result\"='loss' AND \"location\"='westbury, ny';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_boxing_record\" (\n \"result\" text,\n \"opponent\" text,\n \"type\" text,\n \"rd_time\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: What is the date where the type is type?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"professional_boxing_record\" WHERE \"type\"='type';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total rank for the player with less than 2 silvers, 4 golds, and more than 2 bronze?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"performances_by_nation\" WHERE \"silver\"<2 AND \"gold\"=4 AND \"bronze\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of rank with more than 1 silver medal, 1 gold medal, and less than 6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"performances_by_nation\" WHERE \"silver\">1 AND \"gold\"=1 AND \"total\"<6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_m\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What is the height for the 2008 club Arona?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"volleyball_at_the_2008_summer_olympics_m\" WHERE \"2008_club\"='arona';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_m\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: Who was the 2008 club Apure?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"volleyball_at_the_2008_summer_olympics_m\" WHERE \"2008_club\"='apure';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_m\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: Which spike has a 2008 club Karava?"
},
{
"role": "assistant",
"content": "SELECT \"spike\" FROM \"volleyball_at_the_2008_summer_olympics_m\" WHERE \"2008_club\"='karava';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: What's the date of the circuit Winton Motor Raceway?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_calendar\" WHERE \"circuit\"='winton motor raceway';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: What's the city/state of Hidden Valley Raceway?"
},
{
"role": "assistant",
"content": "SELECT \"city_state\" FROM \"race_calendar\" WHERE \"circuit\"='hidden valley raceway';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: What's the date of Bahrain International Circuit?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_calendar\" WHERE \"circuit\"='bahrain international circuit';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: What's the circuit that had an event cancelled?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"race_calendar\" WHERE \"winner\"='event cancelled';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nearby_terrain_features\" (\n \"name\" text,\n \"feature\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"distance\" text,\n \"bearing\" text\n);\n\nQuestion: what is the distance for ridge?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"nearby_terrain_features\" WHERE \"feature\"='ridge';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nearby_terrain_features\" (\n \"name\" text,\n \"feature\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"distance\" text,\n \"bearing\" text\n);\n\nQuestion: what is the latitude when the distance is 42.5km?"
},
{
"role": "assistant",
"content": "SELECT \"latitude\" FROM \"nearby_terrain_features\" WHERE \"distance\"='42.5km';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nearby_terrain_features\" (\n \"name\" text,\n \"feature\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"distance\" text,\n \"bearing\" text\n);\n\nQuestion: what is the feature named bird ridge?"
},
{
"role": "assistant",
"content": "SELECT \"feature\" FROM \"nearby_terrain_features\" WHERE \"name\"='bird ridge';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nearby_terrain_features\" (\n \"name\" text,\n \"feature\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"distance\" text,\n \"bearing\" text\n);\n\nQuestion: what is the distance for mj\u00e5kollen?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"nearby_terrain_features\" WHERE \"name\"='mj\u00e5kollen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nearby_terrain_features\" (\n \"name\" text,\n \"feature\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"distance\" text,\n \"bearing\" text\n);\n\nQuestion: what is the distance for bearing 297\u00b0?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"nearby_terrain_features\" WHERE \"bearing\"='297\u00b0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gamasutra\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What platform has a year of 2007?"
},
{
"role": "assistant",
"content": "SELECT \"platform_s\" FROM \"gamasutra\" WHERE \"year\"=2007;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gamasutra\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: Which game was released in 2011?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"gamasutra\" WHERE \"year\"=2011;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gamasutra\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What platform came out before 2009 with the game wii sports?"
},
{
"role": "assistant",
"content": "SELECT \"platform_s\" FROM \"gamasutra\" WHERE \"year\"<2009 AND \"game\"='wii sports';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What nationality has a lane less than 6, with 1 as the rank?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"semifinal_2\" WHERE \"lane\"<6 AND \"rank\"=1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What time has a lane less than 5, with Poland as the nationality?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"semifinal_2\" WHERE \"lane\"<5 AND \"nationality\"='poland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: How many lanes have 1:53.70 as the time?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lane\") FROM \"semifinal_2\" WHERE \"time\"='1:53.70';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: How many ranks have chen yin as the name, with a lane greater than 8?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"semifinal_2\" WHERE \"name\"='chen yin' AND \"lane\">8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What nationality has 1:55.35 as the time?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"semifinal_2\" WHERE \"time\"='1:55.35';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: How many lanes have a rank greater than 8?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lane\") FROM \"semifinal_2\" WHERE \"rank\">8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"country\" text,\n \"home\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Where in Sweden is the home of the Swedish team?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"teams\" WHERE \"country\"='sweden';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"country\" text,\n \"home\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who is third to Xu Xiaoming at second?"
},
{
"role": "assistant",
"content": "SELECT \"third\" FROM \"teams\" WHERE \"second\"='xu xiaoming';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"country\" text,\n \"home\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who is the lead for the team from Saskatoon, Saskatchewan?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"teams\" WHERE \"home\"='saskatoon, saskatchewan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"country\" text,\n \"home\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who is second on the team with Euan Byers at lead?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"teams\" WHERE \"lead\"='euan byers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"country\" text,\n \"home\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who is the third on the team from Madison, Wisconsin that has Craig Brown as skip?"
},
{
"role": "assistant",
"content": "SELECT \"third\" FROM \"teams\" WHERE \"home\"='madison, wisconsin' AND \"skip\"='craig brown';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: On which date was the opponent the Chicago Bears?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"opponent\"='chicago bears';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which week was on october 30, 1983?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"date\"='october 30, 1983';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class_football_class\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: What is the Mascot for the team from leo that had a Previous Conference value of independent?"
},
{
"role": "assistant",
"content": "SELECT \"mascot\" FROM \"current_members\" WHERE \"previous_conference\"='independent' AND \"location\"='leo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class_football_class\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: What School had 3a/2a as the value for IHSAA Class/ Football Class?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"current_members\" WHERE \"ihsaa_class_football_class\"='3a/2a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"rank\" text,\n \"country_or_dependent_territory\" text,\n \"july_1_2013_projection\" real,\n \"pct_of_pop\" real,\n \"average_relative_annual_growth_pct\" real,\n \"average_absolute_annual_growth\" real\n);\n\nQuestion: How many July 1, 2013 projections have a Rank of 27?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"july_1_2013_projection\") FROM \"table\" WHERE \"rank\"='27';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"format\" text,\n \"owner\" text,\n \"notes\" text\n);\n\nQuestion: What is the format for the one which has a call sign of cite-fm-1?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"radio\" WHERE \"call_sign\"='cite-fm-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"dolphins_points\" real,\n \"opponents\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What'd the total Dolphin points when there was an attendance of 52,860?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"dolphins_points\") FROM \"schedule\" WHERE \"attendance\"='52,860';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"dolphins_points\" real,\n \"opponents\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What's the most in attendance when the Dolphins points were less than 24 and, they played the New England Patriots?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"dolphins_points\"<24 AND \"opponent\"='new england patriots';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2003\" real\n);\n\nQuestion: Which district had SC reserved and 169 Constituents?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"assembly_segments\" WHERE \"reserved_for_sc_st_none\"='sc' AND \"constituency_number\"='169';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2003\" real\n);\n\nQuestion: What was reserved in the district that has 169 constituents?"
},
{
"role": "assistant",
"content": "SELECT \"reserved_for_sc_st_none\" FROM \"assembly_segments\" WHERE \"constituency_number\"='169';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text\n);\n\nQuestion: What is 1995 Grand Slam Tournament if 1997 is LQ and 1989 is 1R?"
},
{
"role": "assistant",
"content": "SELECT \"1995\" FROM \"singles_performance_timeline\" WHERE \"1997\"='lq' AND \"1989\"='1r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text\n);\n\nQuestion: What is 1996 Grand Slam Tournament if 1994 is LQ and 1992 is 3R?"
},
{
"role": "assistant",
"content": "SELECT \"1996\" FROM \"singles_performance_timeline\" WHERE \"1994\"='lq' AND \"1992\"='3r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text\n);\n\nQuestion: What is 1994 Grand Slam Tournament if 1993 is also grand slam tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"1994\" FROM \"singles_performance_timeline\" WHERE \"1993\"='grand slam tournaments';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text\n);\n\nQuestion: What is 1995 Grand Slam Tournament if 1990 is LQ?"
},
{
"role": "assistant",
"content": "SELECT \"1995\" FROM \"singles_performance_timeline\" WHERE \"1990\"='lq';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text\n);\n\nQuestion: What is 1995 Grand Slam Tournament if 1996 is also grand slam tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"1990\" FROM \"singles_performance_timeline\" WHERE \"1996\"='grand slam tournaments';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text\n);\n\nQuestion: What is 1987 Grand Slam Tournament if 1989 is also grand slam tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"1987\" FROM \"singles_performance_timeline\" WHERE \"1989\"='grand slam tournaments';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many people attended the home game against the New York Jets?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"season_schedule\" WHERE \"opponent\"='new york jets';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.