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 \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the most laps for driver jackie stewart?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"classification\" WHERE \"driver\"='jackie stewart';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the time/retired for driver richard attwood?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"driver\"='richard attwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_before_the_elections\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"r_53\" text,\n \"r_52\" text,\n \"r_51\" text\n);\n\nQuestion: Tell me the D 41 and R 51 of r 11"
},
{
"role": "assistant",
"content": "SELECT \"d_41\" FROM \"senate_composition_before_the_elections\" WHERE \"r_51\"='r 11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_before_the_elections\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"r_53\" text,\n \"r_52\" text,\n \"r_51\" text\n);\n\nQuestion: I want the D 46 which has a D 44 of r 17"
},
{
"role": "assistant",
"content": "SELECT \"d_46\" FROM \"senate_composition_before_the_elections\" WHERE \"d_44\"='r 17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_before_the_elections\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"r_53\" text,\n \"r_52\" text,\n \"r_51\" text\n);\n\nQuestion: Tell me the D 41 for D 43 of d 18"
},
{
"role": "assistant",
"content": "SELECT \"d_41\" FROM \"senate_composition_before_the_elections\" WHERE \"d_43\"='d 18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_before_the_elections\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"r_53\" text,\n \"r_52\" text,\n \"r_51\" text\n);\n\nQuestion: Tell me the D 47 for D 46 of r 35"
},
{
"role": "assistant",
"content": "SELECT \"d_47\" FROM \"senate_composition_before_the_elections\" WHERE \"d_46\"='r 35';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_before_the_elections\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"r_53\" text,\n \"r_52\" text,\n \"r_51\" text\n);\n\nQuestion: I want the D 42 with R 51 of r 11"
},
{
"role": "assistant",
"content": "SELECT \"d_42\" FROM \"senate_composition_before_the_elections\" WHERE \"r_51\"='r 11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_before_the_elections\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"r_53\" text,\n \"r_52\" text,\n \"r_51\" text\n);\n\nQuestion: I want the R 53 of D 41 of r 21"
},
{
"role": "assistant",
"content": "SELECT \"r_53\" FROM \"senate_composition_before_the_elections\" WHERE \"d_41\"='r 21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table_2007_2013\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real\n);\n\nQuestion: What is the low silver total for switzerland with over 0 golds?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"silver\") FROM \"medal_table_2007_2013\" WHERE \"gold\">0 AND \"nation\"='switzerland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table_2007_2013\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real\n);\n\nQuestion: What is the silver total for nations with 10 bronze medals?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"silver\") FROM \"medal_table_2007_2013\" WHERE \"bronze\"=10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table_2007_2013\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real\n);\n\nQuestion: What is the gold total for lithuania with under 2 silvers?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gold\") FROM \"medal_table_2007_2013\" WHERE \"nation\"='lithuania' AND \"silver\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score for the home team that played at Moorabbin Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_6\" WHERE \"venue\"='moorabbin oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discontinued_models\" (\n \"maker\" text,\n \"model\" text,\n \"intro_year\" text,\n \"screen_size_inch\" text,\n \"self_lit\" text,\n \"screen_type\" text,\n \"screen_pixels\" text\n);\n\nQuestion: Name the size of the screen that came out in 2006 and is iliad"
},
{
"role": "assistant",
"content": "SELECT \"screen_size_inch\" FROM \"discontinued_models\" WHERE \"intro_year\"='2006' AND \"model\"='iliad';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Which Report includes the Belgian Grand Prix Race?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"season_review\" WHERE \"race\"='belgian grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Which Report includes Monaco?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"season_review\" WHERE \"location\"='monaco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: On what date did Gunnar Nilsson make the fastest lap?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_review\" WHERE \"fastest_lap\"='gunnar nilsson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who had the fastest lap for the German Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"fastest_lap\" FROM \"season_review\" WHERE \"race\"='german grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" real,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the format for the album under the label, luaka bop, that had a catalog number of 3645 and dated after 1981?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"catalog\"='3645' AND \"date\">1981 AND \"label\"='luaka bop';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" real,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: what is the earliest date for the album that had a catalog number of 3645, was formatted as a cd and was under the luaka bop label?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"date\") FROM \"release_history\" WHERE \"catalog\"='3645' AND \"format\"='cd' AND \"label\"='luaka bop';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" real,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Under what label was the album with the catalog of 3645 and came out later than 1987?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"catalog\"='3645' AND \"date\">1987;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the points where Toronto was the home team and the game number was larger than 63?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"february\" WHERE \"home\"='toronto' AND \"game_num\">63;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps did mike spence complete grids above 12?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"classification\" WHERE \"driver\"='mike spence' AND \"grid\">12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many average laps did brm complete in grids larger than 12?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"classification\" WHERE \"constructor\"='brm' AND \"grid\"=12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who drove in grids more than 3 and exited in an accident?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"classification\" WHERE \"grid\">3 AND \"time_retired\"='accident';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: In what grid did jim clark drive in?"
},
{
"role": "assistant",
"content": "SELECT \"grid\" FROM \"classification\" WHERE \"driver\"='jim clark';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text\n);\n\nQuestion: Which opponent has a date 21 jul 2007?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"pre_season\" WHERE \"date\"='21 jul 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the venue of the Melbourne team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_16\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the race that featured stirling moss winning with a maserati at aintree?"
},
{
"role": "assistant",
"content": "SELECT \"race_name\" FROM \"non_championship_race_results\" WHERE \"constructor\"='maserati' AND \"circuit\"='aintree' AND \"winning_driver\"='stirling moss';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What does the Circuit of caen report?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"non_championship_race_results\" WHERE \"circuit\"='caen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who is the winning drive of iv grand prix de caen?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"non_championship_race_results\" WHERE \"race_name\"='iv grand prix de caen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"yards_on_the_great_lakes\" (\n \"yard_name\" text,\n \"location_city_state\" text,\n \"1st_ship_delivery_date\" text,\n \"ship_types_delivered\" text,\n \"total_number_of_ways\" text\n);\n\nQuestion: What types of ships were made at the Froemming Brothers ship yard?"
},
{
"role": "assistant",
"content": "SELECT \"ship_types_delivered\" FROM \"yards_on_the_great_lakes\" WHERE \"yard_name\"='froemming brothers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"yards_on_the_great_lakes\" (\n \"yard_name\" text,\n \"location_city_state\" text,\n \"1st_ship_delivery_date\" text,\n \"ship_types_delivered\" text,\n \"total_number_of_ways\" text\n);\n\nQuestion: What ship types were first delivered in December 1942?"
},
{
"role": "assistant",
"content": "SELECT \"ship_types_delivered\" FROM \"yards_on_the_great_lakes\" WHERE \"1st_ship_delivery_date\"='december 1942';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_players\" (\n \"nationality\" text,\n \"position\" text,\n \"boro_career\" text,\n \"captaincy\" text,\n \"appearances\" real,\n \"goals\" real\n);\n\nQuestion: What is the amount of apperances of the person who had 36 goals?"
},
{
"role": "assistant",
"content": "SELECT \"appearances\" FROM \"notable_players\" WHERE \"goals\"=36;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: If the Home team was north melbourne and the Crowd was larger than 10,000, what was the Home team's score?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"crowd\">'10,000' AND \"home_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people were in the Crowd when the Home team scored 10.7 (67)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_8\" WHERE \"home_team_score\"='10.7 (67)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ladies\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"sp_fs\" real,\n \"points\" real,\n \"places\" real\n);\n\nQuestion: Tell me the name with points of 151.66"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"ladies\" WHERE \"points\"=151.66;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ladies\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"sp_fs\" real,\n \"points\" real,\n \"places\" real\n);\n\nQuestion: Tell me the total number of rank for places less than 94 and points less than 169.8 for japan"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"ladies\" WHERE \"places\"<94 AND \"points\"<169.8 AND \"nation\"='japan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ladies\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"sp_fs\" real,\n \"points\" real,\n \"places\" real\n);\n\nQuestion: Tell me the total number of SP+FS with rank more than 8 for the netherlands and points more than 127.26"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"sp_fs\") FROM \"ladies\" WHERE \"rank\">8 AND \"nation\"='netherlands' AND \"points\">127.26;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ladies\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"sp_fs\" real,\n \"points\" real,\n \"places\" real\n);\n\nQuestion: Name the total number of SP+FS for places of 60 and points more than 151.66"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"sp_fs\") FROM \"ladies\" WHERE \"places\"=60 AND \"points\">151.66;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ladies\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"sp_fs\" real,\n \"points\" real,\n \"places\" real\n);\n\nQuestion: Name the average SP+FS with places less tha 94 for renata baierova"
},
{
"role": "assistant",
"content": "SELECT AVG(\"sp_fs\") FROM \"ladies\" WHERE \"places\"<94 AND \"name\"='renata baierova';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"features_by_model\" (\n \"model_name\" text,\n \"model_num\" text,\n \"color\" text,\n \"switch_type\" text,\n \"interface\" text,\n \"blank_keytops\" text,\n \"introduced\" text\n);\n\nQuestion: What color is model # pd-kb400w?"
},
{
"role": "assistant",
"content": "SELECT \"color\" FROM \"features_by_model\" WHERE \"model_num\"='pd-kb400w';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What's the lowest average for a swimsuit over 6.89, evening gown over 7.76, and an interview over 8.57 in illinois?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"average\") FROM \"preliminary_competition\" WHERE \"swimsuit\">6.89 AND \"evening_gown\">7.76 AND \"state\"='illinois' AND \"interview\">8.57;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What's the highest swimsuit for an average less than 8.073, evening gown less than 8.31, and an interview over 8.23 in georgia?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"swimsuit\") FROM \"preliminary_competition\" WHERE \"average\"<8.073 AND \"evening_gown\"<8.31 AND \"interview\">8.23 AND \"state\"='georgia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What's utah's lowest swimsuit with an interview over 8.53?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"swimsuit\") FROM \"preliminary_competition\" WHERE \"state\"='utah' AND \"interview\">8.53;"
}
] |
[
{
"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: What week was October 9, 1938?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='october 9, 1938';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What home team played Collingwood as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_17\" WHERE \"away_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score of the away team at Junction Oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_17\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who built giancarlo fisichella's car?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"driver\"='giancarlo fisichella';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the high lap total for mika salo with a grid greater than 17?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"driver\"='mika salo' AND \"grid\">17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_100_in_the_world\" (\n \"rank\" real,\n \"name\" text,\n \"location\" text,\n \"country\" text,\n \"designer_year\" text\n);\n\nQuestion: Where was the location with Muirfield in Scotland?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"top_100_in_the_world\" WHERE \"country\"='scotland' AND \"name\"='muirfield';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Name the country for pieroni"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"players_in\" WHERE \"name\"='pieroni';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Name the country for 6-month loan and moving from of lens"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"players_in\" WHERE \"type\"='6-month loan' AND \"moving_from\"='lens';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Name the transfer fee with a transfer window of summer for schollen"
},
{
"role": "assistant",
"content": "SELECT \"transfer_fee\" FROM \"players_in\" WHERE \"transfer_window\"='summer' AND \"name\"='schollen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Name the name that has moving of 1. fc n\u00fcrnberg."
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"players_in\" WHERE \"moving_from\"='1. fc n\u00fcrnberg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Name the country with pol\u00e1k"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"players_in\" WHERE \"name\"='pol\u00e1k';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team score at North Melbourne's away game?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_5\" WHERE \"away_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which away team scored 4.15 (39)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_5\" WHERE \"away_team_score\"='4.15 (39)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was Collingwood's score at the home match against Richmond?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_5\" WHERE \"away_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the lowest number of laps with a grid larger than 24?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"classification\" WHERE \"grid\">24;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: For Jo Siffert, what was the highest grid with the number of laps above 12?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"grid\") FROM \"classification\" WHERE \"driver\"='jo siffert' AND \"laps\">12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the average number of laps when Gerhard Berger is the driver?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"driver\"='gerhard berger';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the name of the constructor who has more than 50 laps and a grid of 7?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"laps\">50 AND \"grid\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2\" (\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the title of the episode with a production code of ad1b04?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"season_2\" WHERE \"production_code\"='ad1b04';"
}
] |
[
{
"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: Name the time for event of tfc 21"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='tfc 21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"asian_games\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What sport has a Gold larger than 0, and a Silver of 2?"
},
{
"role": "assistant",
"content": "SELECT \"sport\" FROM \"asian_games\" WHERE \"gold\">0 AND \"silver\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"asian_games\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest Bronze that has a Total larger than 18 and a Silver smaller than 143?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"asian_games\" WHERE \"total\">18 AND \"sport\"='total' AND \"silver\"<143;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"asian_games\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many total Silver has a Bronze larger than 19 and a Total smaller than 125?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"silver\") FROM \"asian_games\" WHERE \"bronze\">19 AND \"total\"<125;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"asian_games\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest total Bronze larger than 10, Silver larger than 28, and a Gold of 58?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"asian_games\" WHERE \"bronze\">10 AND \"silver\">28 AND \"gold\"=58;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"asian_games\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest Total that has a Gold larger than 0, Silver smaller than 4, Sport of football, and a Bronze larger than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"asian_games\" WHERE \"gold\">0 AND \"silver\"<4 AND \"sport\"='football' AND \"bronze\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the time/retired when the grid is 9?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"grid\"=9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the number of laps when the driver is ron flockhart?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"classification\" WHERE \"driver\"='ron flockhart';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"years\" text,\n \"displacement\" text,\n \"engine\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What Engine has a Power of 114hp (85kw)?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"engines\" WHERE \"power\"='114hp (85kw)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"years\" text,\n \"displacement\" text,\n \"engine\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What Torque has an AMC Power Tech I6 Engine?"
},
{
"role": "assistant",
"content": "SELECT \"torque\" FROM \"engines\" WHERE \"engine\"='amc power tech i6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"years\" text,\n \"displacement\" text,\n \"engine\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What Displacement has 185hp (138kw) Power o"
},
{
"role": "assistant",
"content": "SELECT \"displacement\" FROM \"engines\" WHERE \"power\"='185hp (138kw)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue features collingwood as the home side?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_4\" WHERE \"home_team\"='collingwood';"
}
] |
[
{
"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 \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What's the attendance numbers for veterans stadium?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"game_site\"='veterans stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What is the name of the school that has a player named Michael Dunigan?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2008_boys_team\" WHERE \"player\"='michael dunigan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"district\" text,\n \"name\" text,\n \"party\" text,\n \"religion\" text,\n \"former_experience\" text,\n \"assumed_office\" real,\n \"born_in\" real\n);\n\nQuestion: Name the religion for Former Experience of commissioner of health and assumed office before 2005"
},
{
"role": "assistant",
"content": "SELECT \"religion\" FROM \"delegates\" WHERE \"assumed_office\"<2005 AND \"former_experience\"='commissioner of health';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"district\" text,\n \"name\" text,\n \"party\" text,\n \"religion\" text,\n \"former_experience\" text,\n \"assumed_office\" real,\n \"born_in\" real\n);\n\nQuestion: Tell me the loewst assume office for madeleine bordallo"
},
{
"role": "assistant",
"content": "SELECT MIN(\"assumed_office\") FROM \"delegates\" WHERE \"name\"='madeleine bordallo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which team had a game of 82?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"game\"=82;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people attended the game at Junction Oval?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_13\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score for Boston's Home game that had Gerber as the decision?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"march\" WHERE \"decision\"='gerber' AND \"home\"='boston';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record for the game on March 25?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"march\" WHERE \"date\"='march 25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the Decision at Anaheim's home game?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"march\" WHERE \"home\"='anaheim';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who is the driver of the chassis that is tg183b tg184?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"drivers_and_constructors\" WHERE \"chassis\"='tg183b tg184';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What was the engine belonging to Pierluigi Martini with a Tyre of P?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"tyres\"='p' AND \"driver\"='pierluigi martini';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What was the featured in Engine through rounds 10-13?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"rounds\"='10-13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Nigel Mansell was the driver in what Entrant?"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"drivers_and_constructors\" WHERE \"driver\"='nigel mansell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tornadoes\" (\n \"rank\" real,\n \"name_location\" text,\n \"country\" text,\n \"date\" text,\n \"deaths\" real,\n \"injuries_num\" text\n);\n\nQuestion: What Date does the Name (location) Belyanitsky, Ivanovo, and Balino have?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"tornadoes\" WHERE \"name_location\"='belyanitsky, ivanovo, and balino';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day did North Melbourne play as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_16\" WHERE \"home_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team at Arden Street Oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"venue\"='arden street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_and_capital_gains_tax_rates_for_\" (\n \"ordinary_income_rate\" text,\n \"long_term_capital_gain_rate\" text,\n \"short_term_capital_gain_rate\" text,\n \"long_term_gain_on_commercial_buildings\" text,\n \"long_term_gain_on_collectibles\" text\n);\n\nQuestion: What is the long-term capital gain rate when the long-term gain on commercial buildings is 25% and long term gain on collectibles is 28% while short-term capital gain rate is 33%?"
},
{
"role": "assistant",
"content": "SELECT \"long_term_capital_gain_rate\" FROM \"regular_and_capital_gains_tax_rates_for_\" WHERE \"long_term_gain_on_commercial_buildings\"='25%' AND \"long_term_gain_on_collectibles\"='28%' AND \"short_term_capital_gain_rate\"='33%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_and_capital_gains_tax_rates_for_\" (\n \"ordinary_income_rate\" text,\n \"long_term_capital_gain_rate\" text,\n \"short_term_capital_gain_rate\" text,\n \"long_term_gain_on_commercial_buildings\" text,\n \"long_term_gain_on_collectibles\" text\n);\n\nQuestion: What is long-term gain for commercial buildings when long-term gain on collectible sis 28% and ordinary income rate is 35%?"
},
{
"role": "assistant",
"content": "SELECT \"long_term_gain_on_commercial_buildings\" FROM \"regular_and_capital_gains_tax_rates_for_\" WHERE \"long_term_gain_on_collectibles\"='28%' AND \"ordinary_income_rate\"='35%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_and_capital_gains_tax_rates_for_\" (\n \"ordinary_income_rate\" text,\n \"long_term_capital_gain_rate\" text,\n \"short_term_capital_gain_rate\" text,\n \"long_term_gain_on_commercial_buildings\" text,\n \"long_term_gain_on_collectibles\" text\n);\n\nQuestion: What is the ordinary income rate when short-term capital gain rate is 28%?"
},
{
"role": "assistant",
"content": "SELECT \"ordinary_income_rate\" FROM \"regular_and_capital_gains_tax_rates_for_\" WHERE \"short_term_capital_gain_rate\"='28%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_and_capital_gains_tax_rates_for_\" (\n \"ordinary_income_rate\" text,\n \"long_term_capital_gain_rate\" text,\n \"short_term_capital_gain_rate\" text,\n \"long_term_gain_on_commercial_buildings\" text,\n \"long_term_gain_on_collectibles\" text\n);\n\nQuestion: What is the long-term gain for commercial buildings with a short-term capital gain rate of 15%?"
},
{
"role": "assistant",
"content": "SELECT \"long_term_gain_on_commercial_buildings\" FROM \"regular_and_capital_gains_tax_rates_for_\" WHERE \"short_term_capital_gain_rate\"='15%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_and_capital_gains_tax_rates_for_\" (\n \"ordinary_income_rate\" text,\n \"long_term_capital_gain_rate\" text,\n \"short_term_capital_gain_rate\" text,\n \"long_term_gain_on_commercial_buildings\" text,\n \"long_term_gain_on_collectibles\" text\n);\n\nQuestion: What is short-term capital gain rate with long-term gain on collectibles at 15%?"
},
{
"role": "assistant",
"content": "SELECT \"short_term_capital_gain_rate\" FROM \"regular_and_capital_gains_tax_rates_for_\" WHERE \"long_term_gain_on_collectibles\"='15%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_and_capital_gains_tax_rates_for_\" (\n \"ordinary_income_rate\" text,\n \"long_term_capital_gain_rate\" text,\n \"short_term_capital_gain_rate\" text,\n \"long_term_gain_on_commercial_buildings\" text,\n \"long_term_gain_on_collectibles\" text\n);\n\nQuestion: What long-term gain for collectibles coincides with ordinary income rate 15%?"
},
{
"role": "assistant",
"content": "SELECT \"long_term_gain_on_collectibles\" FROM \"regular_and_capital_gains_tax_rates_for_\" WHERE \"ordinary_income_rate\"='15%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"franklin_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the Decile with a State Authority and a roll of 120?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"decile\") FROM \"franklin_local_board\" WHERE \"authority\"='state' AND \"roll\"=120;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"franklin_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the highest Roll of Orere School with a Decile less than 8 with a State Authority?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"roll\") FROM \"franklin_local_board\" WHERE \"decile\"<8 AND \"authority\"='state' AND \"name\"='orere school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which venue has an Away team score of 10.11 (71)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_16\" WHERE \"away_team_score\"='10.11 (71)';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.