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 \"singles\" (\n \"year\" real,\n \"title\" text,\n \"label\" text,\n \"format\" text,\n \"album\" text\n);\n\nQuestion: What title has a Label of warp records / paper bag records?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"singles\" WHERE \"label\"='warp records / paper bag records';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1986_87\" text,\n \"1987_88\" text,\n \"1988_89\" real\n);\n\nQuestion: What's the highest Average that has a 1987-88 of 55 and a Played that's larger than 114?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"average\") FROM \"relegation\" WHERE \"1987_88\"='55' AND \"played\">114;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1986_87\" text,\n \"1987_88\" text,\n \"1988_89\" real\n);\n\nQuestion: What's the lowest Points for the Team of San Mart\u00edn De Tucum\u00e1n, and a Played that's smaller than 38?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"relegation\" WHERE \"team\"='san mart\u00edn de tucum\u00e1n' AND \"played\"<38;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1986_87\" text,\n \"1987_88\" text,\n \"1988_89\" real\n);\n\nQuestion: What's the 1986-87 that's got a 1988-89 that's larger than 42, and Points of 109?"
},
{
"role": "assistant",
"content": "SELECT \"1986_87\" FROM \"relegation\" WHERE \"1988_89\">42 AND \"points\"=109;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1986_87\" text,\n \"1987_88\" text,\n \"1988_89\" real\n);\n\nQuestion: What's the total of 1988-89 that has a 1986-87 of 38, and Points that's smaller than 109?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"1988_89\") FROM \"relegation\" WHERE \"1986_87\"='38' AND \"points\"<109;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What nation has a total more than 3, with more than 5 for bronze, and less than 4 for the silver?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"total\">3 AND \"bronze\">5 AND \"silver\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the largest number for bronze with a rank of 19?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"rank\"='19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"last_encounters_since_2006\" (\n \"season\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"date\" text\n);\n\nQuestion: what season had a score of 1:0"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"last_encounters_since_2006\" WHERE \"score\"='1:0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nasl_indoor_soccer\" (\n \"indoor_year\" text,\n \"record\" text,\n \"regular_season_finish\" text,\n \"playoffs\" text,\n \"avg_attend\" real\n);\n\nQuestion: indoor year is 1978, what is the record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"nasl_indoor_soccer\" WHERE \"indoor_year\"='1978';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Record of 11-10-3 is what sum of game #?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game_num\") FROM \"december\" WHERE \"record\"='11-10-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Points of 31, and a Score of 1 - 5 is what home?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"december\" WHERE \"points\"=31 AND \"score\"='1 - 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Visitor of calgary has what record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"december\" WHERE \"visitor\"='calgary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Score of 2 - 2 had what points?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"december\" WHERE \"score\"='2 - 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_division\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: On what Date was Gainsborough Trinity the Opponents with H/A of H?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"second_division\" WHERE \"opponents\"='gainsborough trinity' AND \"h_a\"='h';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_division\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What H/A had more than 15,000 in Attendance and Blackpool as Opponents?"
},
{
"role": "assistant",
"content": "SELECT \"h_a\" FROM \"second_division\" WHERE \"attendance\">'15,000' AND \"opponents\"='blackpool';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_division\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What was the Attendance when Lincoln City was the Opponents with H/A of A?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"second_division\" WHERE \"opponents\"='lincoln city' AND \"h_a\"='a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"defunct_callsigns\" (\n \"callsign\" text,\n \"area_served\" text,\n \"frequency\" text,\n \"band\" text,\n \"on_air_id\" text,\n \"purpose\" text\n);\n\nQuestion: what Area has the frequency of 100.3 and an On-air ID of yass fm?"
},
{
"role": "assistant",
"content": "SELECT \"area_served\" FROM \"defunct_callsigns\" WHERE \"frequency\"='100.3' AND \"on_air_id\"='yass fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"defunct_callsigns\" (\n \"callsign\" text,\n \"area_served\" text,\n \"frequency\" text,\n \"band\" text,\n \"on_air_id\" text,\n \"purpose\" text\n);\n\nQuestion: What is the Callsign with an Area of tamworth and frequency of 0 88.9?"
},
{
"role": "assistant",
"content": "SELECT \"callsign\" FROM \"defunct_callsigns\" WHERE \"area_served\"='tamworth' AND \"frequency\"='0 88.9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"defunct_callsigns\" (\n \"callsign\" text,\n \"area_served\" text,\n \"frequency\" text,\n \"band\" text,\n \"on_air_id\" text,\n \"purpose\" text\n);\n\nQuestion: What is the Purpose of the Area Braidwood?"
},
{
"role": "assistant",
"content": "SELECT \"purpose\" FROM \"defunct_callsigns\" WHERE \"area_served\"='braidwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"defunct_callsigns\" (\n \"callsign\" text,\n \"area_served\" text,\n \"frequency\" text,\n \"band\" text,\n \"on_air_id\" text,\n \"purpose\" text\n);\n\nQuestion: What Band has a Frequency of 0 99.7 in the Area of Newcastle?"
},
{
"role": "assistant",
"content": "SELECT \"band\" FROM \"defunct_callsigns\" WHERE \"frequency\"='0 99.7' AND \"area_served\"='newcastle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"defunct_callsigns\" (\n \"callsign\" text,\n \"area_served\" text,\n \"frequency\" text,\n \"band\" text,\n \"on_air_id\" text,\n \"purpose\" text\n);\n\nQuestion: What is the Frequency of Gosford when the Callsign of 2cfm?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"defunct_callsigns\" WHERE \"area_served\"='gosford' AND \"callsign\"='2cfm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"defunct_callsigns\" (\n \"callsign\" text,\n \"area_served\" text,\n \"frequency\" text,\n \"band\" text,\n \"on_air_id\" text,\n \"purpose\" text\n);\n\nQuestion: What is the On-air ID with the frequency of 105.9, and purpose of commercial?"
},
{
"role": "assistant",
"content": "SELECT \"on_air_id\" FROM \"defunct_callsigns\" WHERE \"frequency\"='105.9' AND \"purpose\"='commercial';"
}
] |
[
{
"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 \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What Time/Retired has a Points that's smaller than 11 and has a Laps of 74?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"points\"<11 AND \"laps\"=74;"
}
] |
[
{
"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 \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What Time/Retired has a Laps of 86 and the Team of HVM Racing?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"laps\"=86 AND \"team\"='hvm racing';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"region\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Catalog number in France?"
},
{
"role": "assistant",
"content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"region\"='france';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"region\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Format o Catalog F4 87199?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"catalog\"='f4 87199';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"region\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Region of Catalog 885 973-4?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"catalog\"='885 973-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"region\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Catalog number in the Region of France?"
},
{
"role": "assistant",
"content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"region\"='france';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"region\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What Label has a Catalog number of 885 572-7 in 7\" single Format?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"format\"='7\\\" single' AND \"catalog\"='885 572-7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march_may\" (\n \"date\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"league_position\" text\n);\n\nQuestion: How many people in total attended the game on 1 november 1997?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"march_may\" WHERE \"date\"='1 november 1997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b_b_blingen\" (\n \"pos\" real,\n \"matches\" real,\n \"wins\" real,\n \"loses\" real,\n \"results\" text,\n \"points\" real,\n \"diff\" text\n);\n\nQuestion: Wins of 3, and a Pos. larger than 3 is what average loses?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"loses\") FROM \"group_b_b_blingen\" WHERE \"wins\"=3 AND \"pos\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b_b_blingen\" (\n \"pos\" real,\n \"matches\" real,\n \"wins\" real,\n \"loses\" real,\n \"results\" text,\n \"points\" real,\n \"diff\" text\n);\n\nQuestion: Matches larger than 5 is the sum of what position?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pos\") FROM \"group_b_b_blingen\" WHERE \"matches\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_coaches_results\" (\n \"name\" text,\n \"years\" text,\n \"seasons\" real,\n \"lost\" real,\n \"pct\" real\n);\n\nQuestion: What years did Dwane Morrison had a pct less than 0.389 and losses less than 12?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"head_coaches_results\" WHERE \"pct\"<0.389 AND \"lost\"<12 AND \"name\"='dwane morrison';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_coaches_results\" (\n \"name\" text,\n \"years\" text,\n \"seasons\" real,\n \"lost\" real,\n \"pct\" real\n);\n\nQuestion: How many seasons did Charles C. Farrell coach?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"seasons\") FROM \"head_coaches_results\" WHERE \"name\"='charles c. farrell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_coaches_results\" (\n \"name\" text,\n \"years\" text,\n \"seasons\" real,\n \"lost\" real,\n \"pct\" real\n);\n\nQuestion: What's the average pct for George Felton when he had losses greater than 7?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pct\") FROM \"head_coaches_results\" WHERE \"lost\">7 AND \"name\"='george felton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which Margin of victory has a Runner(s)-up of jos\u00e9 maria ca\u00f1izares?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"european_tour_wins_8\" WHERE \"runner_s_up\"='jos\u00e9 maria ca\u00f1izares';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which Tournament has a Runner(s)-up of bob charles?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"european_tour_wins_8\" WHERE \"runner_s_up\"='bob charles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the winning score on 7 jun 1976?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"european_tour_wins_8\" WHERE \"date\"='7 jun 1976';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which Winning score has a Margin of victory of 1 stroke, and a Date of 21 jun 1981?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"european_tour_wins_8\" WHERE \"margin_of_victory\"='1 stroke' AND \"date\"='21 jun 1981';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: On which date was the Winning score \u20135 (70-65-69-75=279)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"european_tour_wins_8\" WHERE \"winning_score\"='\u20135 (70-65-69-75=279)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which Runner(s)-up has a Winning score of \u20139 (71-68-72-68=279)?"
},
{
"role": "assistant",
"content": "SELECT \"runner_s_up\" FROM \"european_tour_wins_8\" WHERE \"winning_score\"='\u20139 (71-68-72-68=279)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the leading scorer of the game with an attendance of 14,096?"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"december\" WHERE \"attendance\"='14,096';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the leading scorer of the game with the Celtics as the visiting team?"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"december\" WHERE \"visitor\"='celtics';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the date of the game with an attendance of 19,183?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"december\" WHERE \"attendance\"='19,183';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track_number\" real,\n \"song_title\" text,\n \"songwriter_s\" text,\n \"orchestra\" text,\n \"time\" text\n);\n\nQuestion: Name the time with track number less than 4 for you're my everything"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"track_listing\" WHERE \"track_number\"<4 AND \"song_title\"='you''re my everything';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track_number\" real,\n \"song_title\" text,\n \"songwriter_s\" text,\n \"orchestra\" text,\n \"time\" text\n);\n\nQuestion: Name the orchestra for ted varnick"
},
{
"role": "assistant",
"content": "SELECT \"orchestra\" FROM \"track_listing\" WHERE \"songwriter_s\"='ted varnick';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track_number\" real,\n \"song_title\" text,\n \"songwriter_s\" text,\n \"orchestra\" text,\n \"time\" text\n);\n\nQuestion: Name the songwriter for track number 12"
},
{
"role": "assistant",
"content": "SELECT \"songwriter_s\" FROM \"track_listing\" WHERE \"track_number\"=12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: Player of dan federman, and a Pick larger than 114 involves which highest round?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"nba_draft\" WHERE \"player\"='dan federman' AND \"pick\">114;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: College of villanova has what round?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"nba_draft\" WHERE \"college\"='villanova';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: College of boston college has what pick?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"nba_draft\" WHERE \"college\"='boston college';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_by_nation\" (\n \"nation\" text,\n \"finalists\" real,\n \"winners\" real,\n \"runners_up\" real,\n \"pct_won\" real,\n \"years_won\" text\n);\n\nQuestion: How many finalists were there when the years won was 2008 and the won % was greater than 33?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"finalists\") FROM \"performance_by_nation\" WHERE \"years_won\"='2008' AND \"pct_won\">33;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"time_time_zone\" text,\n \"game_site\" text,\n \"final_score\" text,\n \"record\" text,\n \"match_report\" text\n);\n\nQuestion: Where was the game site for the game that had a packers record of 2-2?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"regular_season\" WHERE \"record\"='2-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"time_time_zone\" text,\n \"game_site\" text,\n \"final_score\" text,\n \"record\" text,\n \"match_report\" text\n);\n\nQuestion: What is the final score of the game that was at raymond james stadium?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"regular_season\" WHERE \"game_site\"='raymond james stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"time_time_zone\" text,\n \"game_site\" text,\n \"final_score\" text,\n \"record\" text,\n \"match_report\" text\n);\n\nQuestion: What is the match report for the game that was against Houston?"
},
{
"role": "assistant",
"content": "SELECT \"match_report\" FROM \"regular_season\" WHERE \"opponent\"='houston';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"time_time_zone\" text,\n \"game_site\" text,\n \"final_score\" text,\n \"record\" text,\n \"match_report\" text\n);\n\nQuestion: Where is the game site for the game that had a packers record of 2-3?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"regular_season\" WHERE \"record\"='2-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the Record of the game with a Score of 118\u2013105?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"season_schedule\" WHERE \"score\"='118\u2013105';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What is the Record of the game with a Score of 107\u2013108?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"season_schedule\" WHERE \"score\"='107\u2013108';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the Record during the game with a Score of 113\u2013103?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"season_schedule\" WHERE \"score\"='113\u2013103';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_championship_points_in_a_season_up_\" (\n \"driver\" text,\n \"points\" real,\n \"season\" real,\n \"races\" real,\n \"percentage_of_possible_points\" text\n);\n\nQuestion: How many points have a percentage of possible points of 67.22%?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"most_championship_points_in_a_season_up_\" WHERE \"percentage_of_possible_points\"='67.22%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_championship_points_in_a_season_up_\" (\n \"driver\" text,\n \"points\" real,\n \"season\" real,\n \"races\" real,\n \"percentage_of_possible_points\" text\n);\n\nQuestion: Which races have points greater than 123, fernando alonso as the driver and a percentage of possible points of 74.44%?"
},
{
"role": "assistant",
"content": "SELECT \"races\" FROM \"most_championship_points_in_a_season_up_\" WHERE \"points\">123 AND \"driver\"='fernando alonso' AND \"percentage_of_possible_points\"='74.44%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_championship_points_in_a_season_up_\" (\n \"driver\" text,\n \"points\" real,\n \"season\" real,\n \"races\" real,\n \"percentage_of_possible_points\" text\n);\n\nQuestion: How many seasons have fernando alonso as the driver, and a percentage of possible points of 64.12% and points less than 109?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"season\") FROM \"most_championship_points_in_a_season_up_\" WHERE \"driver\"='fernando alonso' AND \"percentage_of_possible_points\"='64.12%' AND \"points\"<109;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: Who remixed the version after 1999?"
},
{
"role": "assistant",
"content": "SELECT \"remixed_by\" FROM \"official_versions\" WHERE \"year\">1999;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: Who remixed the version with a length of 3:58?"
},
{
"role": "assistant",
"content": "SELECT \"remixed_by\" FROM \"official_versions\" WHERE \"length\"='3:58';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: Which album is the royal g's club mix version, which is remixed by royal garden sound, from?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"official_versions\" WHERE \"remixed_by\"='royal garden sound' AND \"version\"='royal g''s club mix';"
}
] |
[
{
"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 \"record\" text,\n \"attendance\" text\n);\n\nQuestion: How many were in attendance in a week less than 4 with a record of 2\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"<4 AND \"record\"='2\u20131';"
}
] |
[
{
"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 \"record\" text,\n \"attendance\" text\n);\n\nQuestion: How many were in attendance at Griffith Stadium with Philadelphia Eagles as an opponent?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"game_site\"='griffith stadium' AND \"opponent\"='philadelphia eagles';"
}
] |
[
{
"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 \"record\" text,\n \"attendance\" text\n);\n\nQuestion: In what week was the attendance 25,000?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"attendance\"='25,000';"
}
] |
[
{
"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 \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What game site had a result at l 21\u201313?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"result\"='l 21\u201313';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What score has 34-19-6 as the record?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"record\"='34-19-6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the average February that has 56 as the game?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"february\") FROM \"schedule_and_results\" WHERE \"game\"=56;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"round\" real,\n \"track\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_race_lap\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What is the sum of team impul with the date of 8 july"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"race_calendar_and_results\" WHERE \"team\"='team impul' AND \"date\"='8 july';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"round\" real,\n \"track\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_race_lap\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: what is the pole position of Round 9"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"race_calendar_and_results\" WHERE \"round\"=9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"round\" real,\n \"track\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_race_lap\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: what is the lowest round pole position of satoshi motoyama"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"race_calendar_and_results\" WHERE \"pole_position\"='satoshi motoyama';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the home team with the away team of rushden & diamonds?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"third_round\" WHERE \"away_team\"='rushden & diamonds';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: For the attendance of 2 january 1999 with a home team of plymouth argyle what is the tie no. ?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"third_round\" WHERE \"attendance\"='2 january 1999' AND \"home_team\"='plymouth argyle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_austria\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: Which Lost has a Drawn larger than 1, and Games smaller than 7?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"world_championship_group_b_austria\" WHERE \"drawn\">1 AND \"games\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_austria\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: Which Drawn has Games smaller than 7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"drawn\") FROM \"world_championship_group_b_austria\" WHERE \"games\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_austria\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: How many Games have a Drawn smaller than 1, and a Lost larger than 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"games\") FROM \"world_championship_group_b_austria\" WHERE \"drawn\"<1 AND \"lost\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: what is the winning driver in taunus"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"other_grands_prix\" WHERE \"circuit\"='taunus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_quebec_nordiques_2\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which Record has a Home of Montreal Canadiens and a Date of April 22?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"montreal_canadiens_4_quebec_nordiques_2\" WHERE \"home\"='montreal canadiens' AND \"date\"='april 22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_quebec_nordiques_2\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What Score has a Home of Montreal Canadiens and a Date of April 22?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"montreal_canadiens_4_quebec_nordiques_2\" WHERE \"home\"='montreal canadiens' AND \"date\"='april 22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medallists_by_nation\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest number of bronze medals received by a nation with fewer than 0 gold medals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medallists_by_nation\" WHERE \"gold\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medallists_by_nation\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest number of silver medals for a nation with fewer than 1 total medals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"silver\") FROM \"medallists_by_nation\" WHERE \"total\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"total_all_around_medals_by_country_1963_\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Rank has a Total larger than 17, and a Silver smaller than 13?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"total_all_around_medals_by_country_1963_\" WHERE \"total\">17 AND \"silver\"<13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"total_all_around_medals_by_country_1963_\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Total is the highest one that has a Gold of 1, and a Nation of czechoslovakia?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"total_all_around_medals_by_country_1963_\" WHERE \"gold\"=1 AND \"nation\"='czechoslovakia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"total_all_around_medals_by_country_1963_\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much Total has a Silver smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"total_all_around_medals_by_country_1963_\" WHERE \"silver\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"total_all_around_medals_by_country_1963_\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Total has a Rank of 4, and a Silver smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"total_all_around_medals_by_country_1963_\" WHERE \"rank\"='4' AND \"silver\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"total_all_around_medals_by_country_1963_\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Silver is the lowest one that has a Bronze smaller than 1, and a Gold larger than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"silver\") FROM \"total_all_around_medals_by_country_1963_\" WHERE \"bronze\"<1 AND \"gold\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"filmfare_awards\" (\n \"year\" real,\n \"song\" text,\n \"film\" text,\n \"music_director_s\" text,\n \"lyricist\" text\n);\n\nQuestion: WHich Year has a Music director(s) of anu malik?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"filmfare_awards\" WHERE \"music_director_s\"='anu malik';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"filmfare_awards\" (\n \"year\" real,\n \"song\" text,\n \"film\" text,\n \"music_director_s\" text,\n \"lyricist\" text\n);\n\nQuestion: Which Year has a Film of baazigar?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"filmfare_awards\" WHERE \"film\"='baazigar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"filmfare_awards\" (\n \"year\" real,\n \"song\" text,\n \"film\" text,\n \"music_director_s\" text,\n \"lyricist\" text\n);\n\nQuestion: Which Film has a Song of \"ek ladki ko dekha\"?"
},
{
"role": "assistant",
"content": "SELECT \"film\" FROM \"filmfare_awards\" WHERE \"song\"='\\\"ek ladki ko dekha\\\"';"
}
] |
[
{
"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 \"bulls_score\" real,\n \"opponent_score\" real,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Record has an Opponent score smaller than 100, and a Date of december 6?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"opponent_score\"<100 AND \"date\"='december 6';"
}
] |
[
{
"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 \"bulls_score\" real,\n \"opponent_score\" real,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Record has an Opponent of detroit, and an Opponent score smaller than 87?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"opponent\"='detroit' AND \"opponent_score\"<87;"
}
] |
[
{
"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 \"bulls_score\" real,\n \"opponent_score\" real,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Opponent has a Streak of lost 1, and a Date of april 30?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"streak\"='lost 1' AND \"date\"='april 30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nc_rna_gene_prediction_software\" (\n \"name\" text,\n \"number_of_sequences_number_of_sequences\" text,\n \"alignment_alignment_predicts_an_alignment\" text,\n \"structure_structure_predicts_structure\" text,\n \"link\" text\n);\n\nQuestion: What is the number of sequences for the name Alifoldz?"
},
{
"role": "assistant",
"content": "SELECT \"number_of_sequences_number_of_sequences\" FROM \"nc_rna_gene_prediction_software\" WHERE \"name\"='alifoldz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nc_rna_gene_prediction_software\" (\n \"name\" text,\n \"number_of_sequences_number_of_sequences\" text,\n \"alignment_alignment_predicts_an_alignment\" text,\n \"structure_structure_predicts_structure\" text,\n \"link\" text\n);\n\nQuestion: What is the link with an alignment input and any number of sequences?"
},
{
"role": "assistant",
"content": "SELECT \"link\" FROM \"nc_rna_gene_prediction_software\" WHERE \"alignment_alignment_predicts_an_alignment\"='input' AND \"number_of_sequences_number_of_sequences\"='any';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nc_rna_gene_prediction_software\" (\n \"name\" text,\n \"number_of_sequences_number_of_sequences\" text,\n \"alignment_alignment_predicts_an_alignment\" text,\n \"structure_structure_predicts_structure\" text,\n \"link\" text\n);\n\nQuestion: What is the alignment that predicts an alignment of the linuxbinary link?"
},
{
"role": "assistant",
"content": "SELECT \"alignment_alignment_predicts_an_alignment\" FROM \"nc_rna_gene_prediction_software\" WHERE \"link\"='linuxbinary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nc_rna_gene_prediction_software\" (\n \"name\" text,\n \"number_of_sequences_number_of_sequences\" text,\n \"alignment_alignment_predicts_an_alignment\" text,\n \"structure_structure_predicts_structure\" text,\n \"link\" text\n);\n\nQuestion: What is the link of rnaz that predicts an alignment of input?"
},
{
"role": "assistant",
"content": "SELECT \"link\" FROM \"nc_rna_gene_prediction_software\" WHERE \"alignment_alignment_predicts_an_alignment\"='input' AND \"name\"='rnaz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: Which Playoffs have a Year smaller than 2012, and an Open Cup of did not enter?"
},
{
"role": "assistant",
"content": "SELECT \"playoffs\" FROM \"year_by_year\" WHERE \"year\"<2012 AND \"open_cup\"='did not enter';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: Which Year is the lowest one that has a Regular Season of 5th, atlantic, and a Division larger than 4?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"year_by_year\" WHERE \"regular_season\"='5th, atlantic' AND \"division\">4;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.