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 \"nominations_table\" (\n \"week_1\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_6\" text,\n \"week_7\" text,\n \"week_8\" text,\n \"week_9\" text,\n \"week_10\" text,\n \"final_week_12\" text\n);\n\nQuestion: Who did the housemate that nominated Kashmera Rakhi in week 3 and Amit Bobby in week 1 nominate in week 6?" }, { "role": "assistant", "content": "SELECT \"week_6\" FROM \"nominations_table\" WHERE \"week_3\"='kashmera rakhi' AND \"week_1\"='amit bobby';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominations_table\" (\n \"week_1\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_6\" text,\n \"week_7\" text,\n \"week_8\" text,\n \"week_9\" text,\n \"week_10\" text,\n \"final_week_12\" text\n);\n\nQuestion: Who did the housemate that nominated Carol Roopali in week 1 nominate in week 8?" }, { "role": "assistant", "content": "SELECT \"week_8\" FROM \"nominations_table\" WHERE \"week_1\"='carol roopali';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What is the IHSAA class of Centerville, which plays IHSAA class AA football?" }, { "role": "assistant", "content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_football_class\"='aa' AND \"school\"='centerville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: Winchester Community school, which plays IHSAA class AA football, is located where?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_football_class\"='aa' AND \"school\"='winchester community';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What is the IHSAA class of the school with less than 400 students and a mascot of the Tigers?" }, { "role": "assistant", "content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"size\"<400 AND \"mascot\"='tigers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What county has a school with less than 301 students and plays IHSAA class A football?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_football_class\"='a' AND \"size\"<301;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is the lowest game when the score is 102-104?" }, { "role": "assistant", "content": "SELECT MIN(\"game\") FROM \"playoffs\" WHERE \"score\"='102-104';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: what is the score for game 4?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"playoffs\" WHERE \"game\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: what is the series for game 4?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"playoffs\" WHERE \"game\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_results_2009\" (\n \"party\" text,\n \"burnley\" real,\n \"chorley\" real,\n \"fylde\" real,\n \"hyndburn\" real,\n \"lancaster\" real,\n \"pendle\" real,\n \"preston\" real,\n \"ribble_valley\" real,\n \"rossendale\" real,\n \"south_ribble\" real,\n \"west_lancashire\" real,\n \"wyre\" real,\n \"total\" real\n);\n\nQuestion: Which Pendle has a Burnley smaller than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"pendle\") FROM \"summary_of_results_2009\" WHERE \"burnley\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_results_2009\" (\n \"party\" text,\n \"burnley\" real,\n \"chorley\" real,\n \"fylde\" real,\n \"hyndburn\" real,\n \"lancaster\" real,\n \"pendle\" real,\n \"preston\" real,\n \"ribble_valley\" real,\n \"rossendale\" real,\n \"south_ribble\" real,\n \"west_lancashire\" real,\n \"wyre\" real,\n \"total\" real\n);\n\nQuestion: How much Rossendale has a Fylde smaller than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"rossendale\") FROM \"summary_of_results_2009\" WHERE \"fylde\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_results_2009\" (\n \"party\" text,\n \"burnley\" real,\n \"chorley\" real,\n \"fylde\" real,\n \"hyndburn\" real,\n \"lancaster\" real,\n \"pendle\" real,\n \"preston\" real,\n \"ribble_valley\" real,\n \"rossendale\" real,\n \"south_ribble\" real,\n \"west_lancashire\" real,\n \"wyre\" real,\n \"total\" real\n);\n\nQuestion: How much Hyndburn has a Fylde larger than 3?" }, { "role": "assistant", "content": "SELECT SUM(\"hyndburn\") FROM \"summary_of_results_2009\" WHERE \"fylde\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_results_2009\" (\n \"party\" text,\n \"burnley\" real,\n \"chorley\" real,\n \"fylde\" real,\n \"hyndburn\" real,\n \"lancaster\" real,\n \"pendle\" real,\n \"preston\" real,\n \"ribble_valley\" real,\n \"rossendale\" real,\n \"south_ribble\" real,\n \"west_lancashire\" real,\n \"wyre\" real,\n \"total\" real\n);\n\nQuestion: How much Burnley has a Fylde smaller than 1, and a Rossendale larger than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"burnley\") FROM \"summary_of_results_2009\" WHERE \"fylde\"<1 AND \"rossendale\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"italy\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: What are the years that have un posto al sole as the soap opera, with riccardo polizzy carbonelli as the actor?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"italy\" WHERE \"soap_opera\"='un posto al sole' AND \"actor\"='riccardo polizzy carbonelli';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"italy\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: What years have a duration of 18 years, and patrizio rispo as the actor?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"italy\" WHERE \"duration\"='18 years' AND \"actor\"='patrizio rispo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"italy\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: What are the years that have a duration of 15 years and giulia poggi as the character?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"italy\" WHERE \"duration\"='15 years' AND \"character\"='giulia poggi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"italy\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: What years have claudia ruffo as the actor?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"italy\" WHERE \"actor\"='claudia ruffo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"italy\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: What is the duration that has pietro genuardi as the actor?" }, { "role": "assistant", "content": "SELECT \"duration\" FROM \"italy\" WHERE \"actor\"='pietro genuardi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"italy\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: What is the soap opera that has a duration of 13 years, with marina giulia cavalli as the actor?" }, { "role": "assistant", "content": "SELECT \"soap_opera\" FROM \"italy\" WHERE \"duration\"='13 years' AND \"actor\"='marina giulia cavalli';" } ]
[ { "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 is the lowest attendance for December 14, 1958 after week 12?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"date\"='december 14, 1958' AND \"week\">12;" } ]
[ { "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 is the total for the week in the game against the Chicago Bears" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"opponent\"='chicago bears';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the highest attendance for December 14, 1958 for after week 12" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"date\"='december 14, 1958' AND \"week\">12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_16_10_6\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Outcome of the Match played after 2003 with a Score of 6\u20130, 6\u20133?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_16_10_6\" WHERE \"year\">2003 AND \"score\"='6\u20130, 6\u20133';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_16_10_6\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Outcome of the match with a Score of 6\u20131, 6\u20131?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_16_10_6\" WHERE \"score\"='6\u20131, 6\u20131';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Who has rank 5?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"semifinal_2\" WHERE \"rank\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Which nationality has rank 4?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"semifinal_2\" WHERE \"rank\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominees\" (\n \"year_ceremony\" text,\n \"category\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"language\" text,\n \"result\" text\n);\n\nQuestion: What title was used in the nomination of Matrimonio All'Italiana?" }, { "role": "assistant", "content": "SELECT \"film_title_used_in_nomination\" FROM \"nominees\" WHERE \"original_title\"='matrimonio all''italiana';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominees\" (\n \"year_ceremony\" text,\n \"category\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"language\" text,\n \"result\" text\n);\n\nQuestion: What language was the film Pelle Erobreren, which received the best actor nomination, in?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"nominees\" WHERE \"category\"='best actor' AND \"original_title\"='pelle erobreren';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominees\" (\n \"year_ceremony\" text,\n \"category\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"language\" text,\n \"result\" text\n);\n\nQuestion: What title was used in the nomination of the Spanish language film Traffic?" }, { "role": "assistant", "content": "SELECT \"film_title_used_in_nomination\" FROM \"nominees\" WHERE \"language\"='spanish' AND \"original_title\"='traffic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominees\" (\n \"year_ceremony\" text,\n \"category\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"language\" text,\n \"result\" text\n);\n\nQuestion: What title was used in the nomination of Una Giornata Particolare?" }, { "role": "assistant", "content": "SELECT \"film_title_used_in_nomination\" FROM \"nominees\" WHERE \"original_title\"='una giornata particolare';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"player\" text,\n \"test_debut\" text,\n \"year\" real,\n \"cross_code_debut\" text,\n \"date\" text,\n \"position\" text\n);\n\nQuestion: What date has a Position of back, later than 1964, and a Test debut of 1st rl test v new zealand?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"australia\" WHERE \"position\"='back' AND \"year\">1964 AND \"test_debut\"='1st rl test v new zealand';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"player\" text,\n \"test_debut\" text,\n \"year\" real,\n \"cross_code_debut\" text,\n \"date\" text,\n \"position\" text\n);\n\nQuestion: What is the position earlier than 1907, with a cross-code debut of inaugural rl test v new zealand, and a test debut of inaugural ru test v new zealand?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"australia\" WHERE \"year\"<1907 AND \"cross_code_debut\"='inaugural rl test v new zealand' AND \"test_debut\"='inaugural ru test v new zealand';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"player\" text,\n \"test_debut\" text,\n \"year\" real,\n \"cross_code_debut\" text,\n \"date\" text,\n \"position\" text\n);\n\nQuestion: What is the cross-code debut later than 1958 for Dick Thornett?" }, { "role": "assistant", "content": "SELECT \"cross_code_debut\" FROM \"australia\" WHERE \"year\">1958 AND \"player\"='dick thornett';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"player\" text,\n \"test_debut\" text,\n \"year\" real,\n \"cross_code_debut\" text,\n \"date\" text,\n \"position\" text\n);\n\nQuestion: What position has a Cross-code debut of 1st ru test v ireland?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"australia\" WHERE \"cross_code_debut\"='1st ru test v ireland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a_b_first_round\" (\n \"time\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: What was the time for the match with away team Shatin?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"a_b_first_round\" WHERE \"away_team\"='shatin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a_b_first_round\" (\n \"time\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: What was the time for the match with away team Convoy Sun Hei Team A?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"a_b_first_round\" WHERE \"away_team\"='convoy sun hei team a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a_b_first_round\" (\n \"time\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: What was the away team for the match that had a time of 18:30?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"a_b_first_round\" WHERE \"time\"='18:30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a_b_first_round\" (\n \"time\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: What was the time for the match with away team Mutual Team B?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"a_b_first_round\" WHERE \"away_team\"='mutual team b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a_b_first_round\" (\n \"time\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: What was the time for the match that had a a home team of HKSSF?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"a_b_first_round\" WHERE \"home_team\"='hkssf';" } ]
[ { "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: How many people attended on december 26, 1982?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='december 26, 1982';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many Byes have Wins smaller than 11, and a Wimmera FL of minyip murtoa, and Losses smaller than 6?" }, { "role": "assistant", "content": "SELECT COUNT(\"byes\") FROM \"2012_ladder\" WHERE \"wins\"<11 AND \"wimmera_fl\"='minyip murtoa' AND \"losses\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Which Losses have an Against smaller than 1018, and Wins smaller than 14?" }, { "role": "assistant", "content": "SELECT AVG(\"losses\") FROM \"2012_ladder\" WHERE \"against\"<1018 AND \"wins\"<14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Which Byes have an Against larger than 1018, and a Wimmera FL of horsham diggers?" }, { "role": "assistant", "content": "SELECT MIN(\"byes\") FROM \"2012_ladder\" WHERE \"against\">1018 AND \"wimmera_fl\"='horsham diggers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Which Losses have a Wimmera FL of minyip murtoa?" }, { "role": "assistant", "content": "SELECT AVG(\"losses\") FROM \"2012_ladder\" WHERE \"wimmera_fl\"='minyip murtoa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Which Against has Losses smaller than 5, and a Wimmera FL of warrack eagles, and Draws smaller than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"against\") FROM \"2012_ladder\" WHERE \"losses\"<5 AND \"wimmera_fl\"='warrack eagles' AND \"draws\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Which country has Spence in the name section?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"out\" WHERE \"name\"='spence';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Which country has the status of transferred, moving to of released, and Solano as the listed name?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"out\" WHERE \"status\"='transferred' AND \"moving_to\"='released' AND \"name\"='solano';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the transfer fee for the country that has the name McCartney listed?" }, { "role": "assistant", "content": "SELECT \"transfer_fee\" FROM \"out\" WHERE \"name\"='mccartney';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the name listed for the country that has a status of loaned and a moving to listed as leyton orient?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"out\" WHERE \"status\"='loaned' AND \"moving_to\"='leyton orient';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the transfer fee for the country of Nir?" }, { "role": "assistant", "content": "SELECT \"transfer_fee\" FROM \"out\" WHERE \"country\"='nir';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Who had the fastest lap when adam christodoulou was the winning driver and had the pole position?" }, { "role": "assistant", "content": "SELECT \"fastest_lap\" FROM \"calendar\" WHERE \"winning_driver\"='adam christodoulou' AND \"pole_position\"='adam christodoulou';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: What date was the circuit, snetterton, when riki christodoulou had the fastest lap?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"calendar\" WHERE \"circuit\"='snetterton' AND \"fastest_lap\"='riki christodoulou';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: who had the pole position at rockingham circuit with adam christodoulou having the fastest lap?" }, { "role": "assistant", "content": "SELECT \"pole_position\" FROM \"calendar\" WHERE \"fastest_lap\"='adam christodoulou' AND \"circuit\"='rockingham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_table\" (\n \"club\" text,\n \"total_points\" text,\n \"bonus_points\" text,\n \"match_points\" text,\n \"games\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"diff\" text\n);\n\nQuestion: What bonus points have 448 as the points against?" }, { "role": "assistant", "content": "SELECT \"bonus_points\" FROM \"season_table\" WHERE \"points_against\"='448';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_table\" (\n \"club\" text,\n \"total_points\" text,\n \"bonus_points\" text,\n \"match_points\" text,\n \"games\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"diff\" text\n);\n\nQuestion: What points for have 30 as the game, and 73 as the total points?" }, { "role": "assistant", "content": "SELECT \"points_for\" FROM \"season_table\" WHERE \"games\"='30' AND \"total_points\"='73';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_table\" (\n \"club\" text,\n \"total_points\" text,\n \"bonus_points\" text,\n \"match_points\" text,\n \"games\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"diff\" text\n);\n\nQuestion: What drawn has 416 as the points for and 533 as the points against?" }, { "role": "assistant", "content": "SELECT \"drawn\" FROM \"season_table\" WHERE \"points_for\"='416' AND \"points_against\"='533';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_table\" (\n \"club\" text,\n \"total_points\" text,\n \"bonus_points\" text,\n \"match_points\" text,\n \"games\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"diff\" text\n);\n\nQuestion: What match points have 755 as the points against?" }, { "role": "assistant", "content": "SELECT \"match_points\" FROM \"season_table\" WHERE \"points_against\"='755';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_table\" (\n \"club\" text,\n \"total_points\" text,\n \"bonus_points\" text,\n \"match_points\" text,\n \"games\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"diff\" text\n);\n\nQuestion: What games have colomiers as the club?" }, { "role": "assistant", "content": "SELECT \"games\" FROM \"season_table\" WHERE \"club\"='colomiers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_table\" (\n \"club\" text,\n \"total_points\" text,\n \"bonus_points\" text,\n \"match_points\" text,\n \"games\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"diff\" text\n);\n\nQuestion: Which lost has 84 as the match points?" }, { "role": "assistant", "content": "SELECT \"lost\" FROM \"season_table\" WHERE \"match_points\"='84';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: How many constituents does udaipura have?" }, { "role": "assistant", "content": "SELECT \"constituency_number\" FROM \"assembly_segments\" WHERE \"name\"='udaipura';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What lane was Henrique Barbosa in?" }, { "role": "assistant", "content": "SELECT COUNT(\"lane\") FROM \"heats\" WHERE \"name\"='henrique barbosa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What game was before 2010 and was a role-playing game?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"list_of_game_of_the_year_awards\" WHERE \"year\"<2010 AND \"genre\"='role-playing game';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What was the platform of Red Dead Redemption?" }, { "role": "assistant", "content": "SELECT \"platform_s\" FROM \"list_of_game_of_the_year_awards\" WHERE \"game\"='red dead redemption';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: Who was the developer of Wii?" }, { "role": "assistant", "content": "SELECT \"developer_s\" FROM \"list_of_game_of_the_year_awards\" WHERE \"platform_s\"='wii';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What year was The Walking Dead?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"list_of_game_of_the_year_awards\" WHERE \"game\"='the walking dead';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What was the platform when the developer was Telltale Games?" }, { "role": "assistant", "content": "SELECT \"platform_s\" FROM \"list_of_game_of_the_year_awards\" WHERE \"developer_s\"='telltale games';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_game_of_the_year_awards\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the game of developer Rockstar Games?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"list_of_game_of_the_year_awards\" WHERE \"developer_s\"='rockstar games';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"and_surrounding_islands\" (\n \"peak\" text,\n \"country\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"col_m\" real\n);\n\nQuestion: Which Elevation (m) has a Prominence (m) of 2,876, and a Col (m) larger than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"elevation_m\") FROM \"and_surrounding_islands\" WHERE \"prominence_m\"='2,876' AND \"col_m\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"and_surrounding_islands\" (\n \"peak\" text,\n \"country\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"col_m\" real\n);\n\nQuestion: How much Elevation (m) has a Prominence (m) larger than 2,876?" }, { "role": "assistant", "content": "SELECT COUNT(\"elevation_m\") FROM \"and_surrounding_islands\" WHERE \"prominence_m\">'2,876';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sixth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: When was millwall the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"sixth_round_proper\" WHERE \"home_team\"='millwall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sixth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score when Arsenal was the away team?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"sixth_round_proper\" WHERE \"away_team\"='arsenal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sixth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Which away team had a Score of 2\u20130?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"sixth_round_proper\" WHERE \"score\"='2\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sixth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: When was Arsenal was the away team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"sixth_round_proper\" WHERE \"away_team\"='arsenal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"116_seats_needed_for_a_majority\" (\n \"date_released\" text,\n \"polling_institute\" text,\n \"social_democratic\" text,\n \"socialist\" text,\n \"green_communist\" text,\n \"democratic_and_social_centre\" text,\n \"lead\" text\n);\n\nQuestion: What's the date released when there was 9.7% of Green communist?" }, { "role": "assistant", "content": "SELECT \"date_released\" FROM \"116_seats_needed_for_a_majority\" WHERE \"green_communist\"='9.7%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"116_seats_needed_for_a_majority\" (\n \"date_released\" text,\n \"polling_institute\" text,\n \"social_democratic\" text,\n \"socialist\" text,\n \"green_communist\" text,\n \"democratic_and_social_centre\" text,\n \"lead\" text\n);\n\nQuestion: What's the green communist when Euroteste/JN is the polling Institute?" }, { "role": "assistant", "content": "SELECT \"green_communist\" FROM \"116_seats_needed_for_a_majority\" WHERE \"polling_institute\"='euroteste/jn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the most silver medals when the total is more than 2 medals, and with a rank of total, and the number of gold medals is greater than 44?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"total\">2 AND \"rank\"='total' AND \"gold\">44;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the fewest gold medals when there is 0 bronze medals, and the rank is 19, and silver medals are less than 1?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"bronze\"=0 AND \"rank\"='19' 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: What is the largest amount of bronze medals when the silver medals are less than 1, and Belgium (BEL) is the nation, and the gold medals are less than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"silver\"<1 AND \"nation\"='belgium (bel)' AND \"gold\"<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: With silver medals less than 1, and total medals less than 2, what is the most bronze medals?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"silver\"<1 AND \"total\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_m\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What is the weight for the 2008 club Dynamo Moscow?" }, { "role": "assistant", "content": "SELECT \"weight\" FROM \"volleyball_at_the_2008_summer_olympics_m\" WHERE \"2008_club\"='dynamo moscow';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_m\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What is the spike for the 2008 club Zenit Kazan?" }, { "role": "assistant", "content": "SELECT \"spike\" FROM \"volleyball_at_the_2008_summer_olympics_m\" WHERE \"2008_club\"='zenit kazan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_ladder\" (\n \"millewa\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Can you tell me the total number of Byes that has the Wins of 14, and the Losses larger than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"byes\") FROM \"2010_ladder\" WHERE \"wins\"=14 AND \"losses\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_ladder\" (\n \"millewa\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Can you tell me the average Wins that has the Against of 1132, and the Losses smaller than 7?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"2010_ladder\" WHERE \"against\"=1132 AND \"losses\"<7;" } ]
[ { "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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the date for the game that had a Location/Attendance of the spectrum?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"location_attendance\"='the spectrum';" } ]
[ { "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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent when they played at the Skydome?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"location_attendance\"='skydome';" } ]
[ { "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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the record on January 17?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='january 17';" } ]
[ { "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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the location and attendance when the record was 19-17?" }, { "role": "assistant", "content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"record\"='19-17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: What city joined the Independents conference after 1963?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"former_members\" WHERE \"year_joined\">1963 AND \"conference_joined\"='independents';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: What is the year that the Gary team with mascot of the Tornado joined?" }, { "role": "assistant", "content": "SELECT MIN(\"year_joined\") FROM \"former_members\" WHERE \"city\"='gary' AND \"mascot\"='tornado';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: What was the previous conference for the team with the Governors as their mascot that joined the Indiana Lake Shore conference?" }, { "role": "assistant", "content": "SELECT \"previous_conference\" FROM \"former_members\" WHERE \"conference_joined\"='indiana lake shore' AND \"mascot\"='governors';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: What is the year that the Roughriders left the conference?" }, { "role": "assistant", "content": "SELECT MAX(\"year_left\") FROM \"former_members\" WHERE \"mascot\"='roughriders';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: What conference did the city of Valparaiso join?" }, { "role": "assistant", "content": "SELECT \"conference_joined\" FROM \"former_members\" WHERE \"city\"='valparaiso';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: What is the mascot of Hammond Tech?" }, { "role": "assistant", "content": "SELECT \"mascot\" FROM \"former_members\" WHERE \"city\"='hammond' AND \"school\"='hammond tech';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"hungary\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: What is the duration of the character Bartha Zsolt?" }, { "role": "assistant", "content": "SELECT \"duration\" FROM \"hungary\" WHERE \"character\"='bartha zsolt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: How many losses have jake sharp as the name, with a long less than 30?" }, { "role": "assistant", "content": "SELECT COUNT(\"loss\") FROM \"rushing\" WHERE \"name\"='jake sharp' AND \"long\"<30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: What is the average long that has 1581 as a gain, with a loss less than 308?" }, { "role": "assistant", "content": "SELECT AVG(\"long\") FROM \"rushing\" WHERE \"gain\"=1581 AND \"loss\"<308;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: How many gains have a long greater than 8, with avg/g of 124.9?" }, { "role": "assistant", "content": "SELECT SUM(\"gain\") FROM \"rushing\" WHERE \"long\">8 AND \"avg_g\"=124.9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: How many longs have a gain less than 379, and 0.8 as an avg/g?" }, { "role": "assistant", "content": "SELECT SUM(\"long\") FROM \"rushing\" WHERE \"gain\"<379 AND \"avg_g\"=0.8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: What is the lowest gain that has toben opurum as the name, with an avg/g less than 54.1?" }, { "role": "assistant", "content": "SELECT MIN(\"gain\") FROM \"rushing\" WHERE \"name\"='toben opurum' AND \"avg_g\"<54.1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Which Driver has a Grid smaller than 17, and Points larger than 0, and a Lapse of 87, and a Time/Retired of 1:48:11.023?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"<17 AND \"points\">0 AND \"laps\"=87 AND \"time_retired\"='1:48:11.023';" } ]