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 \"daytona_500_results\" (\n \"year\" real,\n \"manufacturer\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What is the lowest Year, when Finish is \"29\", and when Start is less than 24?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"daytona_500_results\" WHERE \"finish\"=29 AND \"start\"<24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"daytona_500_results\" (\n \"year\" real,\n \"manufacturer\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What is the highest Year, when Finish is \"51\", and when Start is less than 64?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"daytona_500_results\" WHERE \"finish\"=51 AND \"start\"<64;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"daytona_500_results\" (\n \"year\" real,\n \"manufacturer\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What is Manufacturer, when Finish is greater than 29, when Start is less than 23, and when Year is \"1973\"?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"daytona_500_results\" WHERE \"finish\">29 AND \"start\"<23 AND \"year\"=1973;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the opposing team with 11 against?" }, { "role": "assistant", "content": "SELECT \"opposing_teams\" FROM \"2009\" WHERE \"against\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the venue where Argentina was the opposing team in a test match?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"2009\" WHERE \"opposing_teams\"='argentina' AND \"status\"='test match';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1972\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the status of the game against France with more than 16 against?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"1972\" WHERE \"against\">16 AND \"opposing_teams\"='france';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1972\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: On what date is there a status of Five Nations and an against of 23?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"1972\" WHERE \"status\"='five nations' AND \"against\"=23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"w109\" (\n \"model\" text,\n \"chassis_code\" text,\n \"production_time\" text,\n \"number_built\" real,\n \"engine\" text\n);\n\nQuestion: What model has a number built smaller than 6.526, and the Chassis code w109.015?" }, { "role": "assistant", "content": "SELECT \"model\" FROM \"w109\" WHERE \"number_built\"<6.526 AND \"chassis_code\"='w109.015';" } ]
[ { "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\" real\n);\n\nQuestion: What was the record at Tiger Stadium?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule\" WHERE \"game_site\"='tiger stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance on September 19, 1971, after week 1?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"date\"='september 19, 1971' AND \"week\">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 Bronze medals did the team ranked 1 win?" }, { "role": "assistant", "content": "SELECT \"bronze\" FROM \"medal_table\" WHERE \"rank\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loan_in\" (\n \"date_from\" text,\n \"date_to\" text,\n \"position\" text,\n \"name\" text,\n \"from\" text\n);\n\nQuestion: What is the name of the person who plays the GK position and is from the Wolverhampton Wanderers?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"loan_in\" WHERE \"position\"='gk' AND \"from\"='wolverhampton wanderers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loan_in\" (\n \"date_from\" text,\n \"date_to\" text,\n \"position\" text,\n \"name\" text,\n \"from\" text\n);\n\nQuestion: What is the date for Liverpool, and player Robbie Threlfall?" }, { "role": "assistant", "content": "SELECT \"date_from\" FROM \"loan_in\" WHERE \"from\"='liverpool' AND \"name\"='robbie threlfall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loan_in\" (\n \"date_from\" text,\n \"date_to\" text,\n \"position\" text,\n \"name\" text,\n \"from\" text\n);\n\nQuestion: What is the date for Watford and player Lionel Ainsworth?" }, { "role": "assistant", "content": "SELECT \"date_to\" FROM \"loan_in\" WHERE \"from\"='watford' AND \"name\"='lionel ainsworth';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loan_in\" (\n \"date_from\" text,\n \"date_to\" text,\n \"position\" text,\n \"name\" text,\n \"from\" text\n);\n\nQuestion: What is the date for the MF position and player Jennison Myrie-Williams?" }, { "role": "assistant", "content": "SELECT \"date_from\" FROM \"loan_in\" WHERE \"position\"='mf' AND \"name\"='jennison myrie-williams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loan_in\" (\n \"date_from\" text,\n \"date_to\" text,\n \"position\" text,\n \"name\" text,\n \"from\" text\n);\n\nQuestion: What is the position of the player from Leicester City?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"loan_in\" WHERE \"from\"='leicester city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalkeepers\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: What Goals has a Team of zamora, and Average larger than 0.89?" }, { "role": "assistant", "content": "SELECT AVG(\"goals\") FROM \"top_goalkeepers\" WHERE \"team\"='zamora' AND \"average\">0.89;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalkeepers\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: What is the sum of Goals win an Average larger than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"goals\") FROM \"top_goalkeepers\" WHERE \"average\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalkeepers\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: What is the smallest Matches with a Goalkeeper of jos\u00e9 berm\u00fadez, and Goals larger than 18?" }, { "role": "assistant", "content": "SELECT MIN(\"matches\") FROM \"top_goalkeepers\" WHERE \"goalkeeper\"='jos\u00e9 berm\u00fadez' AND \"goals\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalkeepers\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: What is the total of Matches with Goals of 18, and an Average larger than 0.55?" }, { "role": "assistant", "content": "SELECT SUM(\"matches\") FROM \"top_goalkeepers\" WHERE \"goals\"=18 AND \"average\">0.55;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalkeepers\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: What is the largest Average with Goals smaller than 34, Matches larger than 30, and a Team of cultural leonesa?" }, { "role": "assistant", "content": "SELECT MAX(\"average\") FROM \"top_goalkeepers\" WHERE \"goals\"<34 AND \"matches\">30 AND \"team\"='cultural leonesa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: Which To par has a Score of 78-74-71-75=298?" }, { "role": "assistant", "content": "SELECT AVG(\"to_par\") FROM \"final_leaderboard\" WHERE \"score\"='78-74-71-75=298';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: How much To par has a Country of united states, and a Money ($) of 90?" }, { "role": "assistant", "content": "SELECT COUNT(\"to_par\") FROM \"final_leaderboard\" WHERE \"country\"='united states' AND \"money\"=90;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"date\" text,\n \"matches\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text,\n \"prize_money\" text\n);\n\nQuestion: What is are the highest matches with \u00a35,000 in prize money?" }, { "role": "assistant", "content": "SELECT MAX(\"matches\") FROM \"calendar\" WHERE \"prize_money\"='\u00a35,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"date\" text,\n \"matches\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text,\n \"prize_money\" text\n);\n\nQuestion: What is the prize money amount after match 1, with 102 new entries to the round?" }, { "role": "assistant", "content": "SELECT \"prize_money\" FROM \"calendar\" WHERE \"matches\">1 AND \"new_entries_this_round\"='102';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: In what place did Darren Clarke finish?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"third_round\" WHERE \"player\"='darren clarke';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was Ernie Els's score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"third_round\" WHERE \"player\"='ernie els';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: In what place did Tom Lehman finish?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"third_round\" WHERE \"player\"='tom lehman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: In what place did the golfer that scored 68-70-69=207 finish?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"third_round\" WHERE \"score\"='68-70-69=207';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"pos\" text,\n \"class\" text,\n \"entrant\" text,\n \"drivers\" text,\n \"laps\" real\n);\n\nQuestion: What were the highest laps for glenn seton gregg hansford?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"results\" WHERE \"drivers\"='glenn seton gregg hansford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"pos\" text,\n \"class\" text,\n \"entrant\" text,\n \"drivers\" text,\n \"laps\" real\n);\n\nQuestion: What driver had 101 laps?" }, { "role": "assistant", "content": "SELECT \"drivers\" FROM \"results\" WHERE \"laps\"=101;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: Gary Barnett who has been in 0 FA Cups plays what position?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"appearances_and_goals\" WHERE \"fa_cup_apps\"='0' AND \"name\"='gary barnett';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the maximum league cup goals when there has been 0 FA cup appearances, and MF is the position, with 1 league appearance, and smaller than 0 total goals?" }, { "role": "assistant", "content": "SELECT MAX(\"league_cup_goals\") FROM \"appearances_and_goals\" WHERE \"fa_cup_apps\"='0' AND \"position\"='mf' AND \"league_apps\"='1' AND \"total_goals\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: How many FLT appearances for the player with less than 5 total goals, and 3 FA Cup appearances, 4 league goals, and plays MF?" }, { "role": "assistant", "content": "SELECT \"flt_apps\" FROM \"appearances_and_goals\" WHERE \"total_goals\"<5 AND \"fa_cup_apps\"='3' AND \"position\"='mf' AND \"league_goals\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"rank_num\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent when the attendance was 87,453?" }, { "role": "assistant", "content": "SELECT \"opponentnum\" FROM \"schedule\" WHERE \"attendance\"='87,453';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"rank_num\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance when they had a ranking of #4?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"rank_num\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"pos\" real,\n \"club\" text,\n \"points\" real,\n \"played\" real,\n \"wins\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: What's the average Played for a draw of 5 and more than 43 points?" }, { "role": "assistant", "content": "SELECT AVG(\"played\") FROM \"final_table\" WHERE \"draw\"=5 AND \"points\">43;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"undersecretaries\" (\n \"romanised_name\" text,\n \"chinese_name\" text,\n \"age_at_appointment\" real,\n \"foreign_nationality\" text,\n \"portfolio_attachment\" text,\n \"govt_salary\" text\n);\n\nQuestion: What is the government salary of the Undersecretary with a Romanised name of Chen Wei-On, Kenneth?" }, { "role": "assistant", "content": "SELECT \"govt_salary\" FROM \"undersecretaries\" WHERE \"romanised_name\"='chen wei-on, kenneth';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"undersecretaries\" (\n \"romanised_name\" text,\n \"chinese_name\" text,\n \"age_at_appointment\" real,\n \"foreign_nationality\" text,\n \"portfolio_attachment\" text,\n \"govt_salary\" text\n);\n\nQuestion: What is the portfolio attachment of the Undersecretary appointed at age 48 with a Chinese name of \u6881\u9cf3\u5100?" }, { "role": "assistant", "content": "SELECT \"portfolio_attachment\" FROM \"undersecretaries\" WHERE \"age_at_appointment\"=48 AND \"chinese_name\"='\u6881\u9cf3\u5100';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"undersecretaries\" (\n \"romanised_name\" text,\n \"chinese_name\" text,\n \"age_at_appointment\" real,\n \"foreign_nationality\" text,\n \"portfolio_attachment\" text,\n \"govt_salary\" text\n);\n\nQuestion: What is the Romanised name of the Undersecretary with an education portfolio attachment?" }, { "role": "assistant", "content": "SELECT \"romanised_name\" FROM \"undersecretaries\" WHERE \"portfolio_attachment\"='education';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" text,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" text,\n \"money_list_rank\" text,\n \"scoring_average\" text,\n \"scoring_rank\" text\n);\n\nQuestion: What is the best top 10 when there are fewer than 0 wins?" }, { "role": "assistant", "content": "SELECT MAX(\"top_10s\") FROM \"lpga_tour_career_summary\" WHERE \"wins\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: Where did naylor move from?" }, { "role": "assistant", "content": "SELECT \"moving_from\" FROM \"in\" WHERE \"name\"='naylor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What type ends in 2011, has a free transfer fee, and is sourced in leeds united?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"in\" WHERE \"ends\"='2011' AND \"transfer_fee\"='free' AND \"source\"='leeds united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What is the type of sco country?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"in\" WHERE \"country\"='sco';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What is the type that ends in 2009?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"in\" WHERE \"ends\"='2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What is the transfer fee of assoumani, who has a summer transfer window?" }, { "role": "assistant", "content": "SELECT \"transfer_fee\" FROM \"in\" WHERE \"transfer_window\"='summer' AND \"name\"='assoumani';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What is the ends with a free transfer fee and was moved from middlesbrough?" }, { "role": "assistant", "content": "SELECT \"ends\" FROM \"in\" WHERE \"transfer_fee\"='free' AND \"moving_from\"='middlesbrough';" } ]
[ { "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 \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which Week has Attendance of 51,558?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"regular_season\" WHERE \"attendance\"='51,558';" } ]
[ { "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 \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which Attendance has a Result of w 24-14, and a Week smaller than 7?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"regular_season\" WHERE \"result\"='w 24-14' AND \"week\"<7;" } ]
[ { "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 \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which Attendance has an Opponent of at los angeles rams, and a Week larger than 12?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"regular_season\" WHERE \"opponent\"='at los angeles rams' AND \"week\">12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"location\" text\n);\n\nQuestion: Which method has a record of 4-0?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"kickboxing_record\" WHERE \"record\"='4-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"location\" text\n);\n\nQuestion: What is the record when the method is decision and the location is Martigues, France?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"kickboxing_record\" WHERE \"method\"='decision' AND \"location\"='martigues, france';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"location\" text\n);\n\nQuestion: Which location has a method of decision and Nikos Tsoukalas for an opponent?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"kickboxing_record\" WHERE \"method\"='decision' AND \"opponent\"='nikos tsoukalas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"location\" text\n);\n\nQuestion: What is the method when the location is Auckland, New Zealand, Darren Berry as the opponent, and resulted in a win?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"kickboxing_record\" WHERE \"location\"='auckland, new zealand' AND \"result\"='win' AND \"opponent\"='darren berry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"location\" text\n);\n\nQuestion: What is the location when the record is 9-7?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"kickboxing_record\" WHERE \"record\"='9-7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"location\" text\n);\n\nQuestion: What is the location when KO is the method, the result is a win, and the record is 2-0?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"kickboxing_record\" WHERE \"method\"='ko' AND \"result\"='win' AND \"record\"='2-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fall_1998\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What 1:00 pm has a 6:30 pm of local programs, and a 7:30 am of animaniacs?" }, { "role": "assistant", "content": "SELECT \"1_00_pm\" FROM \"fall_1998\" WHERE \"6_30_pm\"='local programs' AND \"7_30_am\"='animaniacs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fall_1998\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What 8:00 am has a 3:00 pm of space goofs (mon) spider-man (tue-fri)?" }, { "role": "assistant", "content": "SELECT \"8_00_am\" FROM \"fall_1998\" WHERE \"3_00_pm\"='space goofs (mon) spider-man (tue-fri)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fall_1998\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What 1:00 pm has an 11:00 am of the view?" }, { "role": "assistant", "content": "SELECT \"1_00_pm\" FROM \"fall_1998\" WHERE \"11_00_am\"='the view';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fall_1998\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What 1:30 pm has a 3:00 pm of local programs?" }, { "role": "assistant", "content": "SELECT \"1_30_pm\" FROM \"fall_1998\" WHERE \"3_00_pm\"='local programs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fall_1998\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What 12:30 pm has an 8:00 am of the today show with katie couric & matt lauer?" }, { "role": "assistant", "content": "SELECT \"12_30_pm\" FROM \"fall_1998\" WHERE \"8_00_am\"='the today show with katie couric & matt lauer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fall_1998\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What 1:00 pm has a 4:30 pm of local programs, and a 7:30 am of the today show with katie couric & matt lauer?" }, { "role": "assistant", "content": "SELECT \"1_00_pm\" FROM \"fall_1998\" WHERE \"4_30_pm\"='local programs' AND \"7_30_am\"='the today show with katie couric & matt lauer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"arab_violence\" (\n \"conflicts_prior_to_israel_s_independence\" text,\n \"military_deaths\" text,\n \"civilian_deaths\" text,\n \"total_deaths\" text,\n \"military_and_or_civilian_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: What are the total deaths from the Battle of Tel Hai prior to Israel's independence?" }, { "role": "assistant", "content": "SELECT \"total_deaths\" FROM \"arab_violence\" WHERE \"conflicts_prior_to_israel_s_independence\"='battle of tel hai';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"arab_violence\" (\n \"conflicts_prior_to_israel_s_independence\" text,\n \"military_deaths\" text,\n \"civilian_deaths\" text,\n \"total_deaths\" text,\n \"military_and_or_civilian_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: What are the total casualties with 1,200+ military and/or civilian wounded?" }, { "role": "assistant", "content": "SELECT \"total_casualties\" FROM \"arab_violence\" WHERE \"military_and_or_civilian_wounded\"='1,200+';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"arab_violence\" (\n \"conflicts_prior_to_israel_s_independence\" text,\n \"military_deaths\" text,\n \"civilian_deaths\" text,\n \"total_deaths\" text,\n \"military_and_or_civilian_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: How many military deaths were there when there were 1,615 total casualties?" }, { "role": "assistant", "content": "SELECT \"military_deaths\" FROM \"arab_violence\" WHERE \"total_casualties\"='1,615';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"arab_violence\" (\n \"conflicts_prior_to_israel_s_independence\" text,\n \"military_deaths\" text,\n \"civilian_deaths\" text,\n \"total_deaths\" text,\n \"military_and_or_civilian_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: How many military deaths were there when there were 1,200+ military and/or civilian wounded?" }, { "role": "assistant", "content": "SELECT \"military_deaths\" FROM \"arab_violence\" WHERE \"military_and_or_civilian_wounded\"='1,200+';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"arab_violence\" (\n \"conflicts_prior_to_israel_s_independence\" text,\n \"military_deaths\" text,\n \"civilian_deaths\" text,\n \"total_deaths\" text,\n \"military_and_or_civilian_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: How many deaths were there when the total casualties were 6?" }, { "role": "assistant", "content": "SELECT \"total_deaths\" FROM \"arab_violence\" WHERE \"total_casualties\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which country scored 70-68-71-71=280?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"score\"='70-68-71-71=280';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_by_team\" (\n \"champions\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What champions have 1 (2009) as the semi-finalists?" }, { "role": "assistant", "content": "SELECT \"champions\" FROM \"performance_by_team\" WHERE \"semi_finalists\"='1 (2009)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_by_team\" (\n \"champions\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What fourth-place has 2 (1999, 2005) as the runner(s)-up?" }, { "role": "assistant", "content": "SELECT \"fourth_place\" FROM \"performance_by_team\" WHERE \"runners_up\"='2 (1999, 2005)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_by_team\" (\n \"champions\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What semi-finalists has 2 (1993, 2003) as the fourth-place?" }, { "role": "assistant", "content": "SELECT \"semi_finalists\" FROM \"performance_by_team\" WHERE \"fourth_place\"='2 (1993, 2003)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_by_team\" (\n \"champions\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What runner(s)-up has 1 (2013) as the champions?" }, { "role": "assistant", "content": "SELECT \"runners_up\" FROM \"performance_by_team\" WHERE \"champions\"='1 (2013)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manage\" text,\n \"manner\" text,\n \"date_of_vacancy\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What was the day of vacancy for vit\u00f3ria de guimar\u00e3es?" }, { "role": "assistant", "content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"team\"='vit\u00f3ria de guimar\u00e3es';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manage\" text,\n \"manner\" text,\n \"date_of_vacancy\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: Who was the outgoing manager when the incoming manager was augusto in\u00e1cio?" }, { "role": "assistant", "content": "SELECT \"outgoing_manage\" FROM \"managerial_changes\" WHERE \"incoming_manager\"='augusto in\u00e1cio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalkeepers\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: How many matches did Atl\u00e9tico Ciudad have with an average higher than 0.61?" }, { "role": "assistant", "content": "SELECT COUNT(\"matches\") FROM \"top_goalkeepers\" WHERE \"team\"='atl\u00e9tico ciudad' AND \"average\">0.61;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalkeepers\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: Who is the goalkeeper with fewer than 24 goals?" }, { "role": "assistant", "content": "SELECT \"goalkeeper\" FROM \"top_goalkeepers\" WHERE \"goals\"<24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_playoff\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What was the highest amount of losses when there were 45 goals and the play was smaller than 38?" }, { "role": "assistant", "content": "SELECT MAX(\"losses\") FROM \"relegation_playoff\" WHERE \"goals_for\"=45 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_playoff\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What were the lowest goals when there were mor than 15 wins and the goal difference was larger than 35?" }, { "role": "assistant", "content": "SELECT MIN(\"goals_for\") FROM \"relegation_playoff\" WHERE \"wins\">15 AND \"goal_difference\">35;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_playoff\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What were the highest losses when the goal was smaller than 45 and the points was smaller than 18?" }, { "role": "assistant", "content": "SELECT MAX(\"losses\") FROM \"relegation_playoff\" WHERE \"goals_for\"<45 AND \"points\"<18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_playoff\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What were the highest goals against when the position was larger than 19 and the goals smaller than 36?" }, { "role": "assistant", "content": "SELECT MAX(\"goals_against\") FROM \"relegation_playoff\" WHERE \"position\">19 AND \"goals_for\"<36;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the to par for the player with fewer than 148 total points?" }, { "role": "assistant", "content": "SELECT SUM(\"to_par\") FROM \"missed_the_cut\" WHERE \"total\"<148;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_1998\" (\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is 2:00 pm, when 3:30 pm is \"Animaniacs (Mon-Thu) Pinky and The Brain (Fri)\"?" }, { "role": "assistant", "content": "SELECT \"2_00_pm\" FROM \"spring_1998\" WHERE \"3_30_pm\"='animaniacs (mon-thu) pinky and the brain (fri)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_1998\" (\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is 7:30 am, when 11:00 am is \"The View\"?" }, { "role": "assistant", "content": "SELECT \"7_30_am\" FROM \"spring_1998\" WHERE \"11_00_am\"='the view';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_1998\" (\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is 3:00 pm, when 1:00 pm is \"Days of Our Lives\"?" }, { "role": "assistant", "content": "SELECT \"3_00_pm\" FROM \"spring_1998\" WHERE \"1_00_pm\"='days of our lives';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_1998\" (\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is Noon, when 3:00 pm is \"General Hospital\"?" }, { "role": "assistant", "content": "SELECT \"noon\" FROM \"spring_1998\" WHERE \"3_00_pm\"='general hospital';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_1998\" (\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is 9:00 am, when 6:30 pm is \"Local Programs\"?" }, { "role": "assistant", "content": "SELECT \"9_00_am\" FROM \"spring_1998\" WHERE \"6_30_pm\"='local programs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"v\" (\n \"school\" text,\n \"suburb_town\" text,\n \"years\" text,\n \"founded\" real,\n \"website\" text\n);\n\nQuestion: What school year is vaucluse public school?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"v\" WHERE \"school\"='vaucluse public school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"v\" (\n \"school\" text,\n \"suburb_town\" text,\n \"years\" text,\n \"founded\" real,\n \"website\" text\n);\n\nQuestion: What are the websites of schools that were founded in 1872?" }, { "role": "assistant", "content": "SELECT \"website\" FROM \"v\" WHERE \"founded\"=1872;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"v\" (\n \"school\" text,\n \"suburb_town\" text,\n \"years\" text,\n \"founded\" real,\n \"website\" text\n);\n\nQuestion: On average, when were vineyard schools founded?" }, { "role": "assistant", "content": "SELECT AVG(\"founded\") FROM \"v\" WHERE \"suburb_town\"='vineyard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_55_25_30\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the surface later than 1979, for the Melbourne Indoor, Australia, and the score was 2\u20136, 6\u20132, 6\u20132?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_55_25_30\" WHERE \"date\">1979 AND \"championship\"='melbourne indoor, australia' AND \"score\"='2\u20136, 6\u20132, 6\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_55_25_30\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the earliest date when the championship was Monterrey WCT, Mexico?" }, { "role": "assistant", "content": "SELECT MIN(\"date\") FROM \"singles_55_25_30\" WHERE \"championship\"='monterrey wct, mexico';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_55_25_30\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the score when the outcome was runner-up, earlier than 1975?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_55_25_30\" WHERE \"outcome\"='runner-up' AND \"date\"<1975;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"geelong_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many Losses have a Geelong FL of newtown & chilwell, and more than 11 wins?" }, { "role": "assistant", "content": "SELECT COUNT(\"losses\") FROM \"2011_ladder\" WHERE \"geelong_fl\"='newtown & chilwell' AND \"wins\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"show\" text,\n \"date\" text,\n \"official_ratings_millions\" real,\n \"weekly_rank\" text,\n \"share\" text\n);\n\nQuestion: When were the shares 39.1%?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"ratings\" WHERE \"share\"='39.1%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"show\" text,\n \"date\" text,\n \"official_ratings_millions\" real,\n \"weekly_rank\" text,\n \"share\" text\n);\n\nQuestion: Which show aired on 19 april?" }, { "role": "assistant", "content": "SELECT \"show\" FROM \"ratings\" WHERE \"date\"='19 april';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_e_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"main_language_s\" text,\n \"result\" text\n);\n\nQuestion: What was the original title for the film used in nomination of street days?" }, { "role": "assistant", "content": "SELECT \"original_title\" FROM \"submissions\" WHERE \"film_title_used_in_nomination\"='street days';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_e_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"main_language_s\" text,\n \"result\" text\n);\n\nQuestion: What was the original title for the film used in nomination of keep smiling?" }, { "role": "assistant", "content": "SELECT \"original_title\" FROM \"submissions\" WHERE \"film_title_used_in_nomination\"='keep smiling';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"not_all_data_are_listed_only_select_date\" (\n \"date_s\" text,\n \"city_state\" text,\n \"ticket_price_s\" text,\n \"ticket_sold_available\" text,\n \"ticket_grossing\" text\n);\n\nQuestion: How much were tickets for the show in Hartford, Connecticut?" }, { "role": "assistant", "content": "SELECT \"ticket_price_s\" FROM \"not_all_data_are_listed_only_select_date\" WHERE \"city_state\"='hartford, connecticut';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"not_all_data_are_listed_only_select_date\" (\n \"date_s\" text,\n \"city_state\" text,\n \"ticket_price_s\" text,\n \"ticket_sold_available\" text,\n \"ticket_grossing\" text\n);\n\nQuestion: How many tickets were sold and how many were available for the shows that grossed $348,674?" }, { "role": "assistant", "content": "SELECT \"ticket_sold_available\" FROM \"not_all_data_are_listed_only_select_date\" WHERE \"ticket_grossing\"='$348,674';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"not_all_data_are_listed_only_select_date\" (\n \"date_s\" text,\n \"city_state\" text,\n \"ticket_price_s\" text,\n \"ticket_sold_available\" text,\n \"ticket_grossing\" text\n);\n\nQuestion: How much were tickets for the show in Indianapolis, Indiana?" }, { "role": "assistant", "content": "SELECT \"ticket_price_s\" FROM \"not_all_data_are_listed_only_select_date\" WHERE \"city_state\"='indianapolis, indiana';" } ]