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 \"2000_indiana_fever_miami_sol_portland_fi\" (\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"new_wnba_team\" text,\n \"former_wnba_team\" text,\n \"college_country_team\" text\n);\n\nQuestion: Who is the player who played for the Miami Sol and went to school at North Carolina State?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"2000_indiana_fever_miami_sol_portland_fi\" WHERE \"new_wnba_team\"='miami sol' AND \"college_country_team\"='north carolina state';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"ast_avg\" real,\n \"total_assists\" real\n);\n\nQuestion: WHAT IS THE AVG AST FOR GAMES LARGER THAN 101, RANK 5, TOTAL ASSISTS SMALLER THAN 331?" }, { "role": "assistant", "content": "SELECT AVG(\"ast_avg\") FROM \"assists\" WHERE \"games\">101 AND \"rank\"=5 AND \"total_assists\"<331;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"ast_avg\" real,\n \"total_assists\" real\n);\n\nQuestion: WHAT IS THE SUM OF AST AVG WITH RANK 5 AND GAMES BIGGER THAN 108?" }, { "role": "assistant", "content": "SELECT SUM(\"ast_avg\") FROM \"assists\" WHERE \"rank\"=5 AND \"games\">108;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Round has a Name of john goodyear?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"washington_redskins_draft_history\" WHERE \"name\"='john goodyear';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Round has a College of appalachian state, and an Overall smaller than 156?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='appalachian state' AND \"overall\"<156;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Pick has a Round larger than 17, and a Name of gene stewart?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"round\">17 AND \"name\"='gene stewart';" } ]
[ { "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 \"location\" text\n);\n\nQuestion: What was the result when the opponent was Rory Markham?" }, { "role": "assistant", "content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='rory markham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"am_stations_radyo_agila\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: Which Branding has a frequency of 1080khz?" }, { "role": "assistant", "content": "SELECT \"branding\" FROM \"am_stations_radyo_agila\" WHERE \"frequency\"='1080khz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"am_stations_radyo_agila\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: Which frequency is located in Dagupan?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"am_stations_radyo_agila\" WHERE \"location\"='dagupan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"am_stations_radyo_agila\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What frequency does branding dzec radyo agila 1062 have?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"am_stations_radyo_agila\" WHERE \"branding\"='dzec radyo agila 1062';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"am_stations_radyo_agila\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: Which frequency has 40kw power?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"am_stations_radyo_agila\" WHERE \"power_k_w\"='40kw';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"am_stations_radyo_agila\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: Which frequency is located in Davao?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"am_stations_radyo_agila\" WHERE \"location\"='davao';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cities_formerly_over_100_000_people\" (\n \"city\" text,\n \"state\" text,\n \"2010_population\" text,\n \"peak_population_year\" text,\n \"numeric_decline_from_peak_population\" text,\n \"percent_decline_from_peak_population\" text\n);\n\nQuestion: what is the peak population (year) for scranton?" }, { "role": "assistant", "content": "SELECT \"peak_population_year\" FROM \"cities_formerly_over_100_000_people\" WHERE \"city\"='scranton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cities_formerly_over_100_000_people\" (\n \"city\" text,\n \"state\" text,\n \"2010_population\" text,\n \"peak_population_year\" text,\n \"numeric_decline_from_peak_population\" text,\n \"percent_decline_from_peak_population\" text\n);\n\nQuestion: what is the numeric decline from peak population when the perfect decline from peak population is -16.76%" }, { "role": "assistant", "content": "SELECT \"numeric_decline_from_peak_population\" FROM \"cities_formerly_over_100_000_people\" WHERE \"percent_decline_from_peak_population\"='-16.76%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cities_formerly_over_100_000_people\" (\n \"city\" text,\n \"state\" text,\n \"2010_population\" text,\n \"peak_population_year\" text,\n \"numeric_decline_from_peak_population\" text,\n \"percent_decline_from_peak_population\" text\n);\n\nQuestion: what is the numeric decline from peak population when 2010 population is 88857?" }, { "role": "assistant", "content": "SELECT \"numeric_decline_from_peak_population\" FROM \"cities_formerly_over_100_000_people\" WHERE \"2010_population\"='88857';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cities_formerly_over_100_000_people\" (\n \"city\" text,\n \"state\" text,\n \"2010_population\" text,\n \"peak_population_year\" text,\n \"numeric_decline_from_peak_population\" text,\n \"percent_decline_from_peak_population\" text\n);\n\nQuestion: what is the state when the peak population (year) is 134995 (1950)?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"cities_formerly_over_100_000_people\" WHERE \"peak_population_year\"='134995 (1950)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cities_formerly_over_100_000_people\" (\n \"city\" text,\n \"state\" text,\n \"2010_population\" text,\n \"peak_population_year\" text,\n \"numeric_decline_from_peak_population\" text,\n \"percent_decline_from_peak_population\" text\n);\n\nQuestion: what is the percent decline from peak population when the peak population (year) is 178320 (1960)?" }, { "role": "assistant", "content": "SELECT \"percent_decline_from_peak_population\" FROM \"cities_formerly_over_100_000_people\" WHERE \"peak_population_year\"='178320 (1960)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_u_s\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: WHAT IS THE RANK OF UNIVERSAL, AND DIRECTOR JOHN HUGHES?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"highest_grossing_films_u_s\" WHERE \"studio\"='universal' AND \"director\"='john hughes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_u_s\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: WHAT IS THE TITLE THAT HAS A RANK BIGGER THAN 10, FOR DIRECTOR WALTER HILL?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"highest_grossing_films_u_s\" WHERE \"rank\">10 AND \"director\"='walter hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_u_s\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: WHAT IS THE STUDIO WITH THE TITLE MASK?" }, { "role": "assistant", "content": "SELECT \"studio\" FROM \"highest_grossing_films_u_s\" WHERE \"title\"='mask';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_u_s\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: WHAT IS THE RANK WITH A GROSS OF $96,773,200?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"highest_grossing_films_u_s\" WHERE \"gross\"='$96,773,200';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"premier_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: How many times was the player drawn that had less than 12 losses and a goal difference of +20?" }, { "role": "assistant", "content": "SELECT \"drawn\" FROM \"premier_division_final_table\" WHERE \"lost\"<12 AND \"goal_difference\"='+20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"premier_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the sum of the positions for the player who had less than 25 losses, a goal difference of +20, 10 draws, and played less than 42?" }, { "role": "assistant", "content": "SELECT SUM(\"position\") FROM \"premier_division_final_table\" WHERE \"drawn\"=10 AND \"lost\"<25 AND \"goal_difference\"='+20' AND \"played\"<42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"premier_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the highest number played when there were less than 13 losses and a goal difference of +46?" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"premier_division_final_table\" WHERE \"lost\"<13 AND \"goal_difference\"='+46';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"premier_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is listed under points 1 when the position was greater than 4, there were 54 goals for and more than 11 losses?" }, { "role": "assistant", "content": "SELECT \"points_1\" FROM \"premier_division_final_table\" WHERE \"position\">4 AND \"goals_for\"=54 AND \"lost\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing_cd\" (\n \"track\" real,\n \"song\" text,\n \"author\" text,\n \"worship_leader\" text,\n \"lead_supporting_vocal\" text,\n \"time\" text\n);\n\nQuestion: Who was the worship leader that had a lead supporting vocal Marcus Temu?" }, { "role": "assistant", "content": "SELECT \"worship_leader\" FROM \"track_listing_cd\" WHERE \"lead_supporting_vocal\"='marcus temu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing_cd\" (\n \"track\" real,\n \"song\" text,\n \"author\" text,\n \"worship_leader\" text,\n \"lead_supporting_vocal\" text,\n \"time\" text\n);\n\nQuestion: Who was the lead supporting vocalist on the song that was 4:54 long?" }, { "role": "assistant", "content": "SELECT \"lead_supporting_vocal\" FROM \"track_listing_cd\" WHERE \"time\"='4:54';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing_cd\" (\n \"track\" real,\n \"song\" text,\n \"author\" text,\n \"worship_leader\" text,\n \"lead_supporting_vocal\" text,\n \"time\" text\n);\n\nQuestion: Who was the Worship Leader for the song that was 7:05 long?" }, { "role": "assistant", "content": "SELECT \"worship_leader\" FROM \"track_listing_cd\" WHERE \"time\"='7:05';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing_cd\" (\n \"track\" real,\n \"song\" text,\n \"author\" text,\n \"worship_leader\" text,\n \"lead_supporting_vocal\" text,\n \"time\" text\n);\n\nQuestion: What is the song name that featured Marcus Temu as the lead supporting vocalist?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"track_listing_cd\" WHERE \"lead_supporting_vocal\"='marcus temu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sulci\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter\" real,\n \"year_named\" real\n);\n\nQuestion: What's the lowest diameter when the longitude is 71.1w?" }, { "role": "assistant", "content": "SELECT MIN(\"diameter\") FROM \"sulci\" WHERE \"longitude\"='71.1w';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sulci\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter\" real,\n \"year_named\" real\n);\n\nQuestion: What's the longitude for philae sulcus in 1997 with a diameter less than 1,575.0?" }, { "role": "assistant", "content": "SELECT \"longitude\" FROM \"sulci\" WHERE \"diameter\"<'1,575.0' AND \"year_named\"=1997 AND \"name\"='philae sulcus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sulci\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter\" real,\n \"year_named\" real\n);\n\nQuestion: What is dardanus sulcus' lowest diameter?" }, { "role": "assistant", "content": "SELECT MIN(\"diameter\") FROM \"sulci\" WHERE \"name\"='dardanus sulcus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sulci\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter\" real,\n \"year_named\" real\n);\n\nQuestion: How many years is ur sulcus listed with a diameter less than 1,145.0?" }, { "role": "assistant", "content": "SELECT COUNT(\"year_named\") FROM \"sulci\" WHERE \"name\"='ur sulcus' AND \"diameter\"<'1,145.0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: When the attendance was 3188 what was the score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"round_6\" WHERE \"attendance\"=3188;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: What is the maximum number of people in attendance on 16 August 2008 when the home team was Deportes Savio?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"round_6\" WHERE \"date\"='16 august 2008' AND \"home\"='deportes savio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: What team was the away team when the Deportes Savio was the home team?" }, { "role": "assistant", "content": "SELECT \"away\" FROM \"round_6\" WHERE \"home\"='deportes savio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: What was the away team when the score was 3:1?" }, { "role": "assistant", "content": "SELECT \"away\" FROM \"round_6\" WHERE \"score\"='3:1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: When Platense was the away team on 16 August 2008 how many people attended the game?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"round_6\" WHERE \"date\"='16 august 2008' AND \"away\"='platense';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: What was the score when 2441 people were in attendance?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"round_6\" WHERE \"attendance\"=2441;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: Which driver had 35+3 points?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"classification\" WHERE \"points\"='35+3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: What was the time/retired for the driver with 14 points?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"points\"='14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_division\" (\n \"scorer\" text,\n \"club\" text,\n \"league_goals\" text,\n \"fa_cup_goals\" text,\n \"league_cup_goals\" text,\n \"total\" real\n);\n\nQuestion: What is the sum of goals when the league cup goals are 4 and the FA cup goals are 0?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"second_division\" WHERE \"league_cup_goals\"='4' AND \"fa_cup_goals\"='0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_division\" (\n \"scorer\" text,\n \"club\" text,\n \"league_goals\" text,\n \"fa_cup_goals\" text,\n \"league_cup_goals\" text,\n \"total\" real\n);\n\nQuestion: What is the amount of FA cups goals that were made when the total goals is greater than 16, and the league cup goals is 1 for the Norwich City club?" }, { "role": "assistant", "content": "SELECT \"fa_cup_goals\" FROM \"second_division\" WHERE \"total\">16 AND \"league_cup_goals\"='1' AND \"club\"='norwich city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_division\" (\n \"scorer\" text,\n \"club\" text,\n \"league_goals\" text,\n \"fa_cup_goals\" text,\n \"league_cup_goals\" text,\n \"total\" real\n);\n\nQuestion: What is the number of league goals when Bill Dearden was the scorer and there was 0 league cup goals?" }, { "role": "assistant", "content": "SELECT \"league_goals\" FROM \"second_division\" WHERE \"league_cup_goals\"='0' AND \"scorer\"='bill dearden';" } ]
[ { "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: What is the name of the player with a transfer window in summer, an undisclosed transfer fee, and is moving from brussels?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"players_in\" WHERE \"transfer_window\"='summer' AND \"transfer_fee\"='undisclosed' AND \"moving_from\"='brussels';" } ]
[ { "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: What is the type of bulykin, which has a summer transfer window?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"players_in\" WHERE \"transfer_window\"='summer' AND \"name\"='bulykin';" } ]
[ { "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: What is the country of cordier?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"players_in\" WHERE \"name\"='cordier';" } ]
[ { "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: What is the country of the player moving from belgrano with a summer transfer window?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"players_in\" WHERE \"transfer_window\"='summer' AND \"moving_from\"='belgrano';" } ]
[ { "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: What is the transfer window of the player moving from barueri?" }, { "role": "assistant", "content": "SELECT \"transfer_window\" FROM \"players_in\" WHERE \"moving_from\"='barueri';" } ]
[ { "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: What is the type of the player moving from belgrano?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"players_in\" WHERE \"moving_from\"='belgrano';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Average round for 22 pick that is overall smaller than 229?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"pick\"=22 AND \"overall\"<229;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"copper_production_thousands_tonnes\" (\n \"country\" text,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the normal 2002 that has a Country of Peru, and 2007 bigger than 1,200?" }, { "role": "assistant", "content": "SELECT AVG(\"2002\") FROM \"copper_production_thousands_tonnes\" WHERE \"country\"='peru' AND \"2007\">'1,200';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"copper_production_thousands_tonnes\" (\n \"country\" text,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the most reduced 2007 that has 2008 littler than 1,270, and 2003 bigger than 870?" }, { "role": "assistant", "content": "SELECT MIN(\"2007\") FROM \"copper_production_thousands_tonnes\" WHERE \"2008\"<'1,270' AND \"2003\">870;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"copper_production_thousands_tonnes\" (\n \"country\" text,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the most noteworthy 2006 that has 2008 littler than 5,330, and a Country of Peru, and 2009 littler than 1,260?" }, { "role": "assistant", "content": "SELECT MAX(\"2006\") FROM \"copper_production_thousands_tonnes\" WHERE \"2008\"<'5,330' AND \"country\"='peru' AND \"2009\"<'1,260';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"copper_production_thousands_tonnes\" (\n \"country\" text,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the least 2009 that has 2005 littler than 640, and 2011 of 425, and 2003 littler than 500?" }, { "role": "assistant", "content": "SELECT MIN(\"2009\") FROM \"copper_production_thousands_tonnes\" WHERE \"2005\"<640 AND \"2011\"=425 AND \"2003\"<500;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"copper_production_thousands_tonnes\" (\n \"country\" text,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the aggregate number of 2005 that has 2004 bigger than 1,040, and a Country of Chile, and 2006 littler than 5,560?" }, { "role": "assistant", "content": "SELECT COUNT(\"2005\") FROM \"copper_production_thousands_tonnes\" WHERE \"2004\">'1,040' AND \"country\"='chile' AND \"2006\"<'5,560';" } ]
[ { "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: How many Bronze medals did the Nation with 0 Silver receive?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"silver\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Gold medals did the Nation with less than 8 Total medals including 1 Bronze and 0 Silver receive?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"total\"<8 AND \"bronze\"<1 AND \"silver\"<1;" } ]
[ { "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: How many Total medals did the Nation the got 0 Bronze medals receive?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"bronze\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What Nation had a more than 1 Total medal including less than 3 Silver, less than 4 Gold and a Rank of 4?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"silver\"<3 AND \"total\">1 AND \"gold\"<4 AND \"rank\"='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: How many Silver medals did the Nation ranking 8 with more than 1 Total medal but less than 1 Gold receive?" }, { "role": "assistant", "content": "SELECT SUM(\"silver\") FROM \"medal_table\" WHERE \"gold\"<1 AND \"rank\"='8' AND \"total\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_summary\" (\n \"series\" text,\n \"start\" text,\n \"finish\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third_place\" text,\n \"winning_mentor\" text,\n \"main_host\" text\n);\n\nQuestion: What is the start date with Luke Jacobz hosting and Dannii Minogue as a winning mentor?" }, { "role": "assistant", "content": "SELECT \"start\" FROM \"series_summary\" WHERE \"main_host\"='luke jacobz' AND \"winning_mentor\"='dannii minogue';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_summary\" (\n \"series\" text,\n \"start\" text,\n \"finish\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third_place\" text,\n \"winning_mentor\" text,\n \"main_host\" text\n);\n\nQuestion: Who was in third place when Guy Sebastian was the winning mentor and Andrew Wishart was the runner-up?" }, { "role": "assistant", "content": "SELECT \"third_place\" FROM \"series_summary\" WHERE \"winning_mentor\"='guy sebastian' AND \"runner_up\"='andrew wishart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipalities_in_trentino\" (\n \"municipality\" text,\n \"inhabitants\" real,\n \"mayor\" text,\n \"party\" text,\n \"election\" real\n);\n\nQuestion: In what Election year was Adalberto Mosaner the Mayor with less than 16,170 Inhabitants?" }, { "role": "assistant", "content": "SELECT SUM(\"election\") FROM \"municipalities_in_trentino\" WHERE \"mayor\"='adalberto mosaner' AND \"inhabitants\"<'16,170';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipalities_in_trentino\" (\n \"municipality\" text,\n \"inhabitants\" real,\n \"mayor\" text,\n \"party\" text,\n \"election\" real\n);\n\nQuestion: In what Election year were there less than 16,170 Inhabitants?" }, { "role": "assistant", "content": "SELECT COUNT(\"election\") FROM \"municipalities_in_trentino\" WHERE \"inhabitants\"<'16,170';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipalities_in_trentino\" (\n \"municipality\" text,\n \"inhabitants\" real,\n \"mayor\" text,\n \"party\" text,\n \"election\" real\n);\n\nQuestion: What is the Mayor of Riva del Garda in 2010?" }, { "role": "assistant", "content": "SELECT \"mayor\" FROM \"municipalities_in_trentino\" WHERE \"election\"=2010 AND \"municipality\"='riva del garda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipalities_in_trentino\" (\n \"municipality\" text,\n \"inhabitants\" real,\n \"mayor\" text,\n \"party\" text,\n \"election\" real\n);\n\nQuestion: How many Inhabitants were there after 2009 in the Municipality with a Party of union for trentino?" }, { "role": "assistant", "content": "SELECT AVG(\"inhabitants\") FROM \"municipalities_in_trentino\" WHERE \"party\"='union for trentino' AND \"election\">2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" text,\n \"joined_conference\" real,\n \"enrollment\" real,\n \"nickname\" text\n);\n\nQuestion: What is the lowest enrolled school that was founded in 1992 and joined a conference before 1998?" }, { "role": "assistant", "content": "SELECT MIN(\"enrollment\") FROM \"members\" WHERE \"founded\"='1992' AND \"joined_conference\"<1998;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"boys_league_championships\" (\n \"school_year\" text,\n \"football\" text,\n \"cross_country\" text,\n \"soccer\" text,\n \"golf\" text\n);\n\nQuestion: Which foot ball team played soccer at wooster, and Gold in Ashland?" }, { "role": "assistant", "content": "SELECT \"football\" FROM \"boys_league_championships\" WHERE \"soccer\"='wooster' AND \"golf\"='ashland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total for the team with fewer than 2 bronze, ranked less than 4 and fewer than 1 silver?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"women\" WHERE \"bronze\"<2 AND \"rank\"<4 AND \"silver\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silver for the team with more than 2 bronze and more than 7 gold?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"women\" WHERE \"bronze\">2 AND \"gold\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total for the team with 0 bronze and 3 silver?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"women\" WHERE \"bronze\"=0 AND \"silver\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the total number of Rounds held in Nevada, United States in which the time was 1:55?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"location\"='nevada, united states' AND \"time\"='1:55';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the time when his opponent was Rudy Martin?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='rudy martin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the method when the fight's time was 1:52?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='1:52';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_economy\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"overs\" real,\n \"economy_rate\" real,\n \"wickets\" real,\n \"average\" real,\n \"strike_rate\" real,\n \"best_bowling\" text\n);\n\nQuestion: What is the lowest overs of the Chennai Super Kings when the Economy Rate is less than 5.92 with a Best Bowling number of 2/17?" }, { "role": "assistant", "content": "SELECT MIN(\"overs\") FROM \"best_economy\" WHERE \"team\"='chennai super kings' AND \"best_bowling\"='2/17' AND \"economy_rate\"<5.92;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_economy\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"overs\" real,\n \"economy_rate\" real,\n \"wickets\" real,\n \"average\" real,\n \"strike_rate\" real,\n \"best_bowling\" text\n);\n\nQuestion: What is the lowest number of Overs for the Royal Challengers Bangalore?" }, { "role": "assistant", "content": "SELECT MIN(\"overs\") FROM \"best_economy\" WHERE \"team\"='royal challengers bangalore';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_economy\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"overs\" real,\n \"economy_rate\" real,\n \"wickets\" real,\n \"average\" real,\n \"strike_rate\" real,\n \"best_bowling\" text\n);\n\nQuestion: What is the highest Strike Rate when the average is less than 50.25 with less than 13 matches played?" }, { "role": "assistant", "content": "SELECT MAX(\"strike_rate\") FROM \"best_economy\" WHERE \"matches\"<13 AND \"average\"<50.25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What is the venue of the race where Lineth Chepkurui placed 4th?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"achievements\" WHERE \"position\"='4th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What is the venue of the team race that was before 2010?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"achievements\" WHERE \"notes\"='team' AND \"year\"<2010;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What is the venue of the team race that was after 2008?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"achievements\" WHERE \"year\">2008 AND \"notes\"='team';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What competition did Lineth Chepkurui place 5th?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"achievements\" WHERE \"position\"='5th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"presidential_elections\" (\n \"election\" real,\n \"candidate\" text,\n \"running_mate\" text,\n \"total_votes\" real,\n \"share_of_votes\" text,\n \"outcome\" text\n);\n\nQuestion: How many votes did Lee Teng-Hui receive when he was elected?" }, { "role": "assistant", "content": "SELECT MAX(\"total_votes\") FROM \"presidential_elections\" WHERE \"outcome\"='elected' AND \"candidate\"='lee teng-hui';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_league\" (\n \"match\" real,\n \"date\" text,\n \"home_away\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: What was the score for a match before 13, and a home game on April 21, 2008?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"s_league\" WHERE \"match\"<13 AND \"home_away\"='home' AND \"date\"='april 21, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_league\" (\n \"match\" real,\n \"date\" text,\n \"home_away\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: What home/away game is on February 29, 2008?" }, { "role": "assistant", "content": "SELECT \"home_away\" FROM \"s_league\" WHERE \"date\"='february 29, 2008';" } ]
[ { "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 \"date\" text\n);\n\nQuestion: What team was the home team when Manchester City was the away team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"third_round\" WHERE \"away_team\"='manchester city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"riders\" (\n \"position\" real,\n \"equipment\" text,\n \"points\" real,\n \"wins\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: What is the sum of Points, when Equipment was \"Zabel-BSU\", and when Position was 42?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"riders\" WHERE \"equipment\"='zabel-bsu' AND \"position\"=42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"riders\" (\n \"position\" real,\n \"equipment\" text,\n \"points\" real,\n \"wins\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: What is Equipment, when Points is less than 6, and when Position is 53?" }, { "role": "assistant", "content": "SELECT \"equipment\" FROM \"riders\" WHERE \"points\"<6 AND \"position\"=53;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"riders\" (\n \"position\" real,\n \"equipment\" text,\n \"points\" real,\n \"wins\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: What is Second, when Position is greater than 33, when Points is greater than 12, and when Equipment is Zabel-VMC?" }, { "role": "assistant", "content": "SELECT \"second\" FROM \"riders\" WHERE \"position\">33 AND \"points\">12 AND \"equipment\"='zabel-vmc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"riders\" (\n \"position\" real,\n \"equipment\" text,\n \"points\" real,\n \"wins\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: What is Equipment, when Position is greater than 28, and when Points is greater than 10?" }, { "role": "assistant", "content": "SELECT \"equipment\" FROM \"riders\" WHERE \"position\">28 AND \"points\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1st_round\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When Hawthorn is the away team, what is their score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"1st_round\" WHERE \"away_team\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1st_round\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which ground has a crowd over 41,185?" }, { "role": "assistant", "content": "SELECT \"ground\" FROM \"1st_round\" WHERE \"crowd\">'41,185';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1st_round\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When the crowd is larger than 12,314 and the home team score is 17.7 (109), what is the away team score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"1st_round\" WHERE \"crowd\">'12,314' AND \"home_team_score\"='17.7 (109)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: What place has a 67-68-78-77=290 score?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_round\" WHERE \"score\"='67-68-78-77=290';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: What is the highest to par of the player from the United States with a t3 place and a 74-73-72-69=288 place?" }, { "role": "assistant", "content": "SELECT MAX(\"to_par\") FROM \"final_round\" WHERE \"country\"='united states' AND \"place\"='t3' AND \"score\"='74-73-72-69=288';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: What is the place of player peter oosterhuis, who has $7,500?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_round\" WHERE \"money\"='7,500' AND \"player\"='peter oosterhuis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: What country has a 72-70-75-72=289 score?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"final_round\" WHERE \"score\"='72-70-75-72=289';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: Who is the player from the United States with a 4 to par and a 74-73-72-69=288 score?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"final_round\" WHERE \"country\"='united states' AND \"to_par\"=4 AND \"score\"='74-73-72-69=288';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: How much money does the player with a to par less than 4 and a score of 74-72-68-73=287 have?" }, { "role": "assistant", "content": "SELECT \"money\" FROM \"final_round\" WHERE \"to_par\"<4 AND \"score\"='74-72-68-73=287';" } ]
[ { "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: What is High Assists, when High Points is \"Tayshaun Prince (23)\"?" }, { "role": "assistant", "content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"high_points\"='tayshaun prince (23)';" } ]