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 \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What is the Issue with less than 6 weeks on top and for the song \" the friends of mr. cairo \"?" }, { "role": "assistant", "content": "SELECT \"issue_date_s\" FROM \"see_also\" WHERE \"weeks_on_top\"<6 AND \"song\"='\\\" the friends of mr. cairo \\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What is the sum of Weeks on Top for the Volume:Issue 34:9-12?" }, { "role": "assistant", "content": "SELECT SUM(\"weeks_on_top\") FROM \"see_also\" WHERE \"volume_issue\"='34:9-12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clausura_2008_standings\" (\n \"place_posici_n\" real,\n \"team_equipo\" text,\n \"played_pj\" real,\n \"won_pg\" real,\n \"draw_pe\" real,\n \"lost_pp\" real,\n \"goals_scored_gf\" real,\n \"goals_conceded_gc\" real,\n \"dif\" real,\n \"points_pts\" real\n);\n\nQuestion: How many Places (Posici\u00f3n) has a Draw (PE) larger than 2 and a Team (Equipo) of para\u00edso and a Won (PG) larger than 6?" }, { "role": "assistant", "content": "SELECT COUNT(\"place_posici_n\") FROM \"clausura_2008_standings\" WHERE \"draw_pe\">2 AND \"team_equipo\"='para\u00edso' AND \"won_pg\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"topscorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: How many league cups have yeovil town as the club, with a league less than 16?" }, { "role": "assistant", "content": "SELECT COUNT(\"league_cup\") FROM \"topscorers_in_order_of_league_goals\" WHERE \"club\"='yeovil town' AND \"league\"<16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"topscorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the average FA Cup that has gary jones as the player, and an FA trophy greater than 5?" }, { "role": "assistant", "content": "SELECT AVG(\"fa_cup\") FROM \"topscorers_in_order_of_league_goals\" WHERE \"player\"='gary jones' AND \"fa_trophy\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"topscorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What FA trophys have tony hemmings as the player, with a league greater than 15?" }, { "role": "assistant", "content": "SELECT SUM(\"fa_trophy\") FROM \"topscorers_in_order_of_league_goals\" WHERE \"player\"='tony hemmings' AND \"league\">15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: What is the score where the country is Japan?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"winners\" WHERE \"country\"='japan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: What year has a winner's share smaller than 14,000?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"winners\" WHERE \"winner_s_share\"<'14,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"provinces_of_unified_silla\" (\n \"former_kingdom\" text,\n \"province\" text,\n \"hangul\" text,\n \"hanja\" text,\n \"capital\" text,\n \"modern_equivalent\" text\n);\n\nQuestion: Which province has muju as the capital?" }, { "role": "assistant", "content": "SELECT \"province\" FROM \"provinces_of_unified_silla\" WHERE \"capital\"='muju';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"provinces_of_unified_silla\" (\n \"former_kingdom\" text,\n \"province\" text,\n \"hangul\" text,\n \"hanja\" text,\n \"capital\" text,\n \"modern_equivalent\" text\n);\n\nQuestion: What is the modern equivalent of \u826f\u5dde in Hanja?" }, { "role": "assistant", "content": "SELECT \"modern_equivalent\" FROM \"provinces_of_unified_silla\" WHERE \"hanja\"='\u826f\u5dde';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"provinces_of_unified_silla\" (\n \"former_kingdom\" text,\n \"province\" text,\n \"hangul\" text,\n \"hanja\" text,\n \"capital\" text,\n \"modern_equivalent\" text\n);\n\nQuestion: What is the capital of the province with \uc591\uc8fc in Hangul?" }, { "role": "assistant", "content": "SELECT \"capital\" FROM \"provinces_of_unified_silla\" WHERE \"hangul\"='\uc591\uc8fc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"provinces_of_unified_silla\" (\n \"former_kingdom\" text,\n \"province\" text,\n \"hangul\" text,\n \"hanja\" text,\n \"capital\" text,\n \"modern_equivalent\" text\n);\n\nQuestion: What is the capital of the province with \u6f22\u5dde in Hanja?" }, { "role": "assistant", "content": "SELECT \"capital\" FROM \"provinces_of_unified_silla\" WHERE \"hanja\"='\u6f22\u5dde';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"provinces_of_unified_silla\" (\n \"former_kingdom\" text,\n \"province\" text,\n \"hangul\" text,\n \"hanja\" text,\n \"capital\" text,\n \"modern_equivalent\" text\n);\n\nQuestion: What is the Hanja for the sakju province?" }, { "role": "assistant", "content": "SELECT \"hanja\" FROM \"provinces_of_unified_silla\" WHERE \"province\"='sakju';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the fewest number of top-25s for events with more than 0 wins?" }, { "role": "assistant", "content": "SELECT MIN(\"top_25\") FROM \"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 \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the highest number of top-10s in events with more than 0 wins?" }, { "role": "assistant", "content": "SELECT MAX(\"top_10\") FROM \"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 \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the number of top-25s in events under 13, cuts made under 3, and 1 top-10?" }, { "role": "assistant", "content": "SELECT \"top_25\" FROM \"summary\" WHERE \"events\"<13 AND \"cuts_made\"<3 AND \"top_10\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"last_place_couples_average_ranks\" (\n \"rank\" real,\n \"celebrity\" text,\n \"professional_partner\" text,\n \"season\" real,\n \"average\" real\n);\n\nQuestion: Which season had an average under 28, a rank under 10, and a partner of Janja Lesar?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"last_place_couples_average_ranks\" WHERE \"average\"<28 AND \"rank\"<10 AND \"professional_partner\"='janja lesar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"last_place_couples_average_ranks\" (\n \"rank\" real,\n \"celebrity\" text,\n \"professional_partner\" text,\n \"season\" real,\n \"average\" real\n);\n\nQuestion: What is the highest season that had rank under 1?" }, { "role": "assistant", "content": "SELECT MAX(\"season\") FROM \"last_place_couples_average_ranks\" WHERE \"rank\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"last_place_couples_average_ranks\" (\n \"rank\" real,\n \"celebrity\" text,\n \"professional_partner\" text,\n \"season\" real,\n \"average\" real\n);\n\nQuestion: Who was the professional partner in season 4?" }, { "role": "assistant", "content": "SELECT \"professional_partner\" FROM \"last_place_couples_average_ranks\" WHERE \"season\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the highest rebounds against detroit?" }, { "role": "assistant", "content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"team\"='detroit';" } ]
[ { "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 much gold received by nation of uzbekistan (uzb)?" }, { "role": "assistant", "content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"nation\"='uzbekistan (uzb)';" } ]
[ { "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: Which team has the lowest gold and 0 silver?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"silver\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much gold when silver, bronze and total is smaller than 1?" }, { "role": "assistant", "content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"silver\"<1 AND \"bronze\"=1 AND \"total\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"airline\" text,\n \"airline_in_arabic\" text,\n \"icao\" text,\n \"callsign\" text,\n \"commenced_operations\" real\n);\n\nQuestion: What is the ICAO with commenced operations before 1989?" }, { "role": "assistant", "content": "SELECT \"icao\" FROM \"see_also\" WHERE \"commenced_operations\"<1989;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"airline\" text,\n \"airline_in_arabic\" text,\n \"icao\" text,\n \"callsign\" text,\n \"commenced_operations\" real\n);\n\nQuestion: What is the lowest commenced operations that has a nouvelair callsign?" }, { "role": "assistant", "content": "SELECT MIN(\"commenced_operations\") FROM \"see_also\" WHERE \"callsign\"='nouvelair';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"airline\" text,\n \"airline_in_arabic\" text,\n \"icao\" text,\n \"callsign\" text,\n \"commenced_operations\" real\n);\n\nQuestion: What callsign has commenced operations in 2011?" }, { "role": "assistant", "content": "SELECT \"callsign\" FROM \"see_also\" WHERE \"commenced_operations\"=2011;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"primafila\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What language is used when the service is sky primafila 10 and the package/option is qualsiasi?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"primafila\" WHERE \"package_option\"='qualsiasi' AND \"television_service\"='sky primafila 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"primafila\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is the content when the package/option is qualsiasi and sky primafila 14 is the television service?" }, { "role": "assistant", "content": "SELECT \"content\" FROM \"primafila\" WHERE \"package_option\"='qualsiasi' AND \"television_service\"='sky primafila 14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"local_channels\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is the HDTV that has television service of tv 8 mont blanc and content is general television?" }, { "role": "assistant", "content": "SELECT \"hdtv\" FROM \"local_channels\" WHERE \"content\"='general television' AND \"television_service\"='tv 8 mont blanc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"province\" text,\n \"country\" text,\n \"iata\" text,\n \"airport\" text\n);\n\nQuestion: Which city's IATA is nkg?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"list\" WHERE \"iata\"='nkg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"province\" text,\n \"country\" text,\n \"iata\" text,\n \"airport\" text\n);\n\nQuestion: Which airport is in Xinjiang province in the city Kuqa?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"list\" WHERE \"province\"='xinjiang' AND \"city\"='kuqa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"province\" text,\n \"country\" text,\n \"iata\" text,\n \"airport\" text\n);\n\nQuestion: Which province's IATA is kix?" }, { "role": "assistant", "content": "SELECT \"province\" FROM \"list\" WHERE \"iata\"='kix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"city\" text,\n \"province\" text,\n \"country\" text,\n \"iata\" text,\n \"airport\" text\n);\n\nQuestion: Which airport's IATA is pen?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"list\" WHERE \"iata\"='pen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"record\" text,\n \"nation\" text,\n \"date\" text,\n \"venue\" text\n);\n\nQuestion: Which Event has a Record of 4:02.54?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"women\" WHERE \"record\"='4:02.54';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"record\" text,\n \"nation\" text,\n \"date\" text,\n \"venue\" text\n);\n\nQuestion: Whcih Date has an Event of 3000 m?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"women\" WHERE \"event\"='3000 m';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"record\" text,\n \"nation\" text,\n \"date\" text,\n \"venue\" text\n);\n\nQuestion: Which Record has a Date of 23 february 1986?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"women\" WHERE \"date\"='23 february 1986';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"record\" text,\n \"nation\" text,\n \"date\" text,\n \"venue\" text\n);\n\nQuestion: Which Date has a Record of 8:39.49?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"women\" WHERE \"record\"='8:39.49';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"record\" text,\n \"nation\" text,\n \"date\" text,\n \"venue\" text\n);\n\nQuestion: Which Record has a Date of 3 march 2013?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"women\" WHERE \"date\"='3 march 2013';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"record\" text,\n \"nation\" text,\n \"date\" text,\n \"venue\" text\n);\n\nQuestion: Which Nation has a Record of 15.16 m?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"women\" WHERE \"record\"='15.16 m';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_statistics\" (\n \"pos\" text,\n \"nationality\" text,\n \"player\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the Nationality of the Player with more than 8 Goals and Apps of 52?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"player_statistics\" WHERE \"goals\">8 AND \"apps\"=52;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_statistics\" (\n \"pos\" text,\n \"nationality\" text,\n \"player\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: How many Apps did Player Gilberto with more than 1 Goals have?" }, { "role": "assistant", "content": "SELECT AVG(\"apps\") FROM \"player_statistics\" WHERE \"player\"='gilberto' AND \"goals\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_three_matches\" (\n \"round\" text,\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text\n);\n\nQuestion: On what date was the 4th round, with home team Itabuna, played?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"second_three_matches\" WHERE \"round\"='4th' AND \"home_team\"='itabuna';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_three_matches\" (\n \"round\" text,\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text\n);\n\nQuestion: In the 6th round match with home team Bahia, who was the away team?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"second_three_matches\" WHERE \"round\"='6th' AND \"home_team\"='bahia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_three_matches\" (\n \"round\" text,\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text\n);\n\nQuestion: For the 5th round match with away team of Bahia, what was the final score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_three_matches\" WHERE \"round\"='5th' AND \"away_team\"='bahia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" text,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: Which League has a Regular Season of 2nd, southeast?" }, { "role": "assistant", "content": "SELECT \"league\" FROM \"year_by_year\" WHERE \"regular_season\"='2nd, southeast';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" text,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: Who Playoffs has a Regular Season of on hiatus.?" }, { "role": "assistant", "content": "SELECT \"playoffs\" FROM \"year_by_year\" WHERE \"regular_season\"='on hiatus.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"city_status_since_after_1996\" (\n \"city\" text,\n \"municipality\" text,\n \"county\" text,\n \"town_status\" text,\n \"population\" real\n);\n\nQuestion: What is the population of Krager\u00f8?" }, { "role": "assistant", "content": "SELECT MIN(\"population\") FROM \"city_status_since_after_1996\" WHERE \"city\"='krager\u00f8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"city_status_since_after_1996\" (\n \"city\" text,\n \"municipality\" text,\n \"county\" text,\n \"town_status\" text,\n \"population\" real\n);\n\nQuestion: What is the highest population of a city that has a town status of 2010?" }, { "role": "assistant", "content": "SELECT MAX(\"population\") FROM \"city_status_since_after_1996\" WHERE \"town_status\"='2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"city_status_since_after_1996\" (\n \"city\" text,\n \"municipality\" text,\n \"county\" text,\n \"town_status\" text,\n \"population\" real\n);\n\nQuestion: What is the highest population within the municipality of Porsgrunn?" }, { "role": "assistant", "content": "SELECT MAX(\"population\") FROM \"city_status_since_after_1996\" WHERE \"municipality\"='porsgrunn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_number\" real,\n \"name_v_t_e\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthplace\" text,\n \"2009_10_team\" text,\n \"nhl_rights_if_any\" text\n);\n\nQuestion: What is the birthplace of the player who is 190 CM tall, plays the D position, and wears number 11?" }, { "role": "assistant", "content": "SELECT \"birthplace\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"position\"='d' AND \"height_cm\"=190 AND \"jersey_number\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_number\" real,\n \"name_v_t_e\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthplace\" text,\n \"2009_10_team\" text,\n \"nhl_rights_if_any\" text\n);\n\nQuestion: What is the position of the player who played for the London Knights during 2009-2010?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"2009_10_team\"='london knights';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What's the total points that Scuderia Ferrari with a Ferrari V12 engine have before 1971?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"year\"<1971 AND \"entrant\"='scuderia ferrari' AND \"engine\"='ferrari v12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What's the least amount of points that Walter Wolf Racing had after 1974?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"year\">1974 AND \"entrant\"='walter wolf racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is the sum of Year(s), when Postion is 6th, and when Competition is Commonwealth Games?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"achievements\" WHERE \"position\"='6th' AND \"competition\"='commonwealth games';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is the highest Year, when the Venue is Beijing, PR China?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"achievements\" WHERE \"venue\"='beijing, pr china';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is the average Year, when Competition is Oceania Youth Championships?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"achievements\" WHERE \"competition\"='oceania youth championships';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is Event, when Position is 4th?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"achievements\" WHERE \"position\"='4th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Date with a Format that is cd?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"format\"='cd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Catalog with a Date that is march 13, 2002?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"date\"='march 13, 2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Label with a Catalog that is mhcl-20017?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"catalog\"='mhcl-20017';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Catalog with a Date that is february 20, 2002?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"date\"='february 20, 2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_num\" real,\n \"name\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthdate\" text,\n \"birthplace\" text,\n \"1999_2000_team\" text,\n \"nhl_rights\" text\n);\n\nQuestion: What is the lightest Weight (kg), when the Jersey # is greater than 22, when the Position is F, and when the Birthdate is March 19, 1980?" }, { "role": "assistant", "content": "SELECT MIN(\"weight_kg\") FROM \"list_of_united_states_national_ice_hocke\" WHERE \"jersey_num\">22 AND \"position\"='f' AND \"birthdate\"='march 19, 1980';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_num\" real,\n \"name\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthdate\" text,\n \"birthplace\" text,\n \"1999_2000_team\" text,\n \"nhl_rights\" text\n);\n\nQuestion: What is the Position, when the Birthplace is Buffalo, New York?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"birthplace\"='buffalo, new york';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_num\" real,\n \"name\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthdate\" text,\n \"birthplace\" text,\n \"1999_2000_team\" text,\n \"nhl_rights\" text\n);\n\nQuestion: What is the Birthplace, when the Jersey # is less than 18, when the Height (cm) is higher than 185, and when the Birthdate is March 3, 1980?" }, { "role": "assistant", "content": "SELECT \"birthplace\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"jersey_num\"<18 AND \"height_cm\">185 AND \"birthdate\"='march 3, 1980';" } ]
[ { "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 \"game_site\" text,\n \"final_score\" text,\n \"record\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What was the final score for the game with 65,309 people in attendance?" }, { "role": "assistant", "content": "SELECT \"final_score\" FROM \"schedule\" WHERE \"attendance\"='65,309';" } ]
[ { "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 \"game_site\" text,\n \"final_score\" text,\n \"record\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What average week number had the Chicago bears as the opponent?" }, { "role": "assistant", "content": "SELECT AVG(\"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 \"game_site\" text,\n \"final_score\" text,\n \"record\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What is the record for the game against New England Patriots at the Rich Stadium?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule\" WHERE \"game_site\"='rich stadium' AND \"opponent\"='new england patriots';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_500\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" text,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What did the Dallara chassis with a 5 start in 2006 finish?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"indianapolis_500\" WHERE \"chassis\"='dallara' AND \"start\"='5' AND \"year\"=2006;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_500\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" text,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What is the chassis of the Honda Engine from 2008?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"indianapolis_500\" WHERE \"engine\"='honda' AND \"year\"=2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_500\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" text,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What is the earliest year of the Honda Engine with a finish of 4?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"indianapolis_500\" WHERE \"engine\"='honda' AND \"finish\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was 2002, when 2008 was, \"career statistics\"?" }, { "role": "assistant", "content": "SELECT \"2002\" FROM \"singles_performance_timeline\" WHERE \"2008\"='career statistics';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was 2009, when 2001 was, \"not masters series\"?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2001\"='not masters series';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was 2011, when 2005 was 2R, and when 2003 was 2R?" }, { "role": "assistant", "content": "SELECT \"2011\" FROM \"singles_performance_timeline\" WHERE \"2005\"='2r' AND \"2003\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was 2009, when 2012 was A, when 2003 was A, and then the Tournament was the Madrid Masters?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2012\"='a' AND \"2003\"='a' AND \"tournament\"='madrid masters';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was 2002, when 2011 was, \"atp masters series\"?" }, { "role": "assistant", "content": "SELECT \"2002\" FROM \"singles_performance_timeline\" WHERE \"2011\"='atp masters series';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What was the lowest wins of Larry Nelson, who ranked less than 5?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"leaders\" WHERE \"player\"='larry nelson' AND \"rank\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the sum of the earnings for rank 3?" }, { "role": "assistant", "content": "SELECT SUM(\"earnings\") FROM \"leaders\" WHERE \"rank\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What was the lowest rank which earned 24,920,665?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"leaders\" WHERE \"earnings\"='24,920,665';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the sum of wins for a rank less than 3, and earnings more than 24,920,665?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"leaders\" WHERE \"rank\"<3 AND \"earnings\">'24,920,665';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the country is ranked more than 4?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"leaders\" WHERE \"rank\">4;" } ]
[ { "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\" text\n);\n\nQuestion: What the total of Week with attendance of 53,147" }, { "role": "assistant", "content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"attendance\"='53,147';" } ]
[ { "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\" text\n);\n\nQuestion: What is the lowest week for December 26, 1999" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"date\"='december 26, 1999';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real\n);\n\nQuestion: What season has 6 races and the team is Australia?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"career_summary\" WHERE \"races\"=6 AND \"team\"='australia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real\n);\n\nQuestion: What is the total number of Races when there were more than 8 wins?" }, { "role": "assistant", "content": "SELECT COUNT(\"races\") FROM \"career_summary\" WHERE \"wins\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1936_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"american_labor_ticket\" text,\n \"socialist_ticket\" text\n);\n\nQuestion: Who's the Socialist ticket with a Republican ticket of john a. may?" }, { "role": "assistant", "content": "SELECT \"socialist_ticket\" FROM \"1936_state_election_results\" WHERE \"republican_ticket\"='john a. may';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1936_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"american_labor_ticket\" text,\n \"socialist_ticket\" text\n);\n\nQuestion: Who's the Republican ticket with a Democratic ticket of m. william bray?" }, { "role": "assistant", "content": "SELECT \"republican_ticket\" FROM \"1936_state_election_results\" WHERE \"democratic_ticket\"='m. william bray';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1936_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"american_labor_ticket\" text,\n \"socialist_ticket\" text\n);\n\nQuestion: Who's the Socialist ticket with a Democratic ticket of herbert h. lehman?" }, { "role": "assistant", "content": "SELECT \"socialist_ticket\" FROM \"1936_state_election_results\" WHERE \"democratic_ticket\"='herbert h. lehman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1936_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"american_labor_ticket\" text,\n \"socialist_ticket\" text\n);\n\nQuestion: Who's the Republican ticket with a Socialist ticket of frank r. crosswaith?" }, { "role": "assistant", "content": "SELECT \"republican_ticket\" FROM \"1936_state_election_results\" WHERE \"socialist_ticket\"='frank r. crosswaith';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1936_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"american_labor_ticket\" text,\n \"socialist_ticket\" text\n);\n\nQuestion: Who's the Republican ticket with a Socialist ticket of edna mitchell blue?" }, { "role": "assistant", "content": "SELECT \"republican_ticket\" FROM \"1936_state_election_results\" WHERE \"socialist_ticket\"='edna mitchell blue';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"aces\" real,\n \"player\" text,\n \"opponent\" text,\n \"year\" real,\n \"event\" text,\n \"sets\" real,\n \"result\" text\n);\n\nQuestion: what's the earliest year that serena williams had more than 2 sets?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"women\" WHERE \"player\"='serena williams' AND \"sets\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"aces\" real,\n \"player\" text,\n \"opponent\" text,\n \"year\" real,\n \"event\" text,\n \"sets\" real,\n \"result\" text\n);\n\nQuestion: what's the earliest year that the wimbledon opponent was zheng jie?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"women\" WHERE \"event\"='wimbledon' AND \"opponent\"='zheng jie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"aces\" real,\n \"player\" text,\n \"opponent\" text,\n \"year\" real,\n \"event\" text,\n \"sets\" real,\n \"result\" text\n);\n\nQuestion: what year was the opponent caroline garcia?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"women\" WHERE \"opponent\"='caroline garcia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"aces\" real,\n \"player\" text,\n \"opponent\" text,\n \"year\" real,\n \"event\" text,\n \"sets\" real,\n \"result\" text\n);\n\nQuestion: what's the most recent year that samantha stosur was the opponent with 20 aces and having played more than 2 sets?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"women\" WHERE \"aces\"=20 AND \"opponent\"='samantha stosur' AND \"sets\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"aces\" real,\n \"player\" text,\n \"opponent\" text,\n \"year\" real,\n \"event\" text,\n \"sets\" real,\n \"result\" text\n);\n\nQuestion: what year was the memphis event?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"women\" WHERE \"event\"='memphis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" real,\n \"acquisition_via\" text\n);\n\nQuestion: What season did the player who had the number 26 play on who came from far eastern?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"a\" WHERE \"school_club_team\"='far eastern' AND \"number\"=26;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"a\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" real,\n \"acquisition_via\" text\n);\n\nQuestion: What season did the player who came from Cebu play in?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"a\" WHERE \"school_club_team\"='cebu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: How much did Champion jessica shepley share when she won?" }, { "role": "assistant", "content": "SELECT \"winner_s_share\" FROM \"winners\" WHERE \"champion\"='jessica shepley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: What was the country in the year 2012?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"winners\" WHERE \"year\"=2012;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: How many purses were there after 2012 that had a winner's share of less than 15,000?" }, { "role": "assistant", "content": "SELECT COUNT(\"purse\") FROM \"winners\" WHERE \"year\">2012 AND \"winner_s_share\"<'15,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"country\" text,\n \"automobile_name\" text,\n \"manufacturer\" text,\n \"engine_make_capacity\" text,\n \"year\" text\n);\n\nQuestion: In what year was Letecke Zavody N.P., Jinonice the manufacturer?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"list\" WHERE \"manufacturer\"='letecke zavody n.p., jinonice';" } ]