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 \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What number of Points are shown for Team Paulistano where the Drawn is less than 2 and the Against is less than 15?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"campeonato_paulista\" WHERE \"drawn\"<2 AND \"team\"='paulistano' AND \"against\"<15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the Lowest lost for Team Ypiranga-SP where the games Played is more than 10 and the goals Against is greater than 50?" }, { "role": "assistant", "content": "SELECT MIN(\"lost\") FROM \"campeonato_paulista\" WHERE \"played\">10 AND \"team\"='ypiranga-sp' AND \"against\">50;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest number of Played games with a Position smaller than 2 and Drawn games less than 4?" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"campeonato_paulista\" WHERE \"position\"<2 AND \"drawn\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"number_of_championships_by_school\" (\n \"university\" text,\n \"men_s\" real,\n \"women_s\" real,\n \"runner_up\" real,\n \"total_championships\" real\n);\n\nQuestion: What is the average number of runner-up that National University, which has more than 2 total championships, has?" }, { "role": "assistant", "content": "SELECT AVG(\"runner_up\") FROM \"number_of_championships_by_school\" WHERE \"university\"='national university' AND \"total_championships\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"number_of_championships_by_school\" (\n \"university\" text,\n \"men_s\" real,\n \"women_s\" real,\n \"runner_up\" real,\n \"total_championships\" real\n);\n\nQuestion: What is the lowest number of total championships of the university with 2 men's and more than 2 women's?" }, { "role": "assistant", "content": "SELECT MIN(\"total_championships\") FROM \"number_of_championships_by_school\" WHERE \"men_s\"=2 AND \"women_s\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"number_of_championships_by_school\" (\n \"university\" text,\n \"men_s\" real,\n \"women_s\" real,\n \"runner_up\" real,\n \"total_championships\" real\n);\n\nQuestion: How many runner-ups does the university with more than 0 men's and less than 4 total championships have?" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"number_of_championships_by_school\" WHERE \"men_s\">0 AND \"total_championships\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"number_of_championships_by_school\" (\n \"university\" text,\n \"men_s\" real,\n \"women_s\" real,\n \"runner_up\" real,\n \"total_championships\" real\n);\n\nQuestion: What is the average total championships of the university with more than 0 women's, less than 4 runner-ups, and less than 0 men's?" }, { "role": "assistant", "content": "SELECT AVG(\"total_championships\") FROM \"number_of_championships_by_school\" WHERE \"women_s\">0 AND \"runner_up\"<4 AND \"men_s\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"number_of_championships_by_school\" (\n \"university\" text,\n \"men_s\" real,\n \"women_s\" real,\n \"runner_up\" real,\n \"total_championships\" real\n);\n\nQuestion: What is the lowest number of total championships of the University of Santo Tomas, which has less than 2 men's?" }, { "role": "assistant", "content": "SELECT MIN(\"total_championships\") FROM \"number_of_championships_by_school\" WHERE \"university\"='university of santo tomas' AND \"men_s\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1916_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"socialist_ticket\" text,\n \"prohibition_ticket\" text,\n \"progressive_ticket\" text,\n \"independence_league_ticket\" text\n);\n\nQuestion: Who was on the Progressive ticket when John T. Norton was on the Democratic ticket?" }, { "role": "assistant", "content": "SELECT \"progressive_ticket\" FROM \"1916_state_election_results\" WHERE \"democratic_ticket\"='john t. norton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1916_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"socialist_ticket\" text,\n \"prohibition_ticket\" text,\n \"progressive_ticket\" text,\n \"independence_league_ticket\" text\n);\n\nQuestion: What name is under the Socialist ticket when Thomas J. Kreuzer was on the Democratic ticket?" }, { "role": "assistant", "content": "SELECT \"socialist_ticket\" FROM \"1916_state_election_results\" WHERE \"democratic_ticket\"='thomas j. kreuzer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1916_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"socialist_ticket\" text,\n \"prohibition_ticket\" text,\n \"progressive_ticket\" text,\n \"independence_league_ticket\" text\n);\n\nQuestion: Who ran under the Republican ticket when Frank H. Hiscock ran under the Progressive ticket?" }, { "role": "assistant", "content": "SELECT \"republican_ticket\" FROM \"1916_state_election_results\" WHERE \"progressive_ticket\"='frank h. hiscock';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1916_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"socialist_ticket\" text,\n \"prohibition_ticket\" text,\n \"progressive_ticket\" text,\n \"independence_league_ticket\" text\n);\n\nQuestion: What name ran for the Prohibition ticket when the Progressive ticket was Eugene M. Travis?" }, { "role": "assistant", "content": "SELECT \"prohibition_ticket\" FROM \"1916_state_election_results\" WHERE \"progressive_ticket\"='eugene m. travis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1916_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"socialist_ticket\" text,\n \"prohibition_ticket\" text,\n \"progressive_ticket\" text,\n \"independence_league_ticket\" text\n);\n\nQuestion: When Coleridge A. Hart ran under the Prohibition ticket who ran under the Independence League ticket?" }, { "role": "assistant", "content": "SELECT \"independence_league_ticket\" FROM \"1916_state_election_results\" WHERE \"prohibition_ticket\"='coleridge a. hart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1916_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"socialist_ticket\" text,\n \"prohibition_ticket\" text,\n \"progressive_ticket\" text,\n \"independence_league_ticket\" text\n);\n\nQuestion: With the Republican ticket of Frank M. Williams who was the Progressive ticket?" }, { "role": "assistant", "content": "SELECT \"progressive_ticket\" FROM \"1916_state_election_results\" WHERE \"republican_ticket\"='frank m. williams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1898_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"socialist_labor_ticket\" text,\n \"prohibition_ticket\" text,\n \"independent_citizens_ticket\" text\n);\n\nQuestion: What kind of Prohibition ticket that has a Office of lieutenant governor?" }, { "role": "assistant", "content": "SELECT \"prohibition_ticket\" FROM \"1898_state_election_results\" WHERE \"office\"='lieutenant governor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1898_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"socialist_labor_ticket\" text,\n \"prohibition_ticket\" text,\n \"independent_citizens_ticket\" text\n);\n\nQuestion: Which Socialist Labor ticket has a Office of secretary of state?" }, { "role": "assistant", "content": "SELECT \"socialist_labor_ticket\" FROM \"1898_state_election_results\" WHERE \"office\"='secretary of state';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1898_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"socialist_labor_ticket\" text,\n \"prohibition_ticket\" text,\n \"independent_citizens_ticket\" text\n);\n\nQuestion: What kind of Independent Citizens' ticket that has a Republican ticket of william j. morgan?" }, { "role": "assistant", "content": "SELECT \"independent_citizens_ticket\" FROM \"1898_state_election_results\" WHERE \"republican_ticket\"='william j. morgan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1898_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"socialist_labor_ticket\" text,\n \"prohibition_ticket\" text,\n \"independent_citizens_ticket\" text\n);\n\nQuestion: What kind of Republican ticket has a Prohibition ticket of stephen mead wing?" }, { "role": "assistant", "content": "SELECT \"republican_ticket\" FROM \"1898_state_election_results\" WHERE \"prohibition_ticket\"='stephen mead wing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1898_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"socialist_labor_ticket\" text,\n \"prohibition_ticket\" text,\n \"independent_citizens_ticket\" text\n);\n\nQuestion: What is the kind of Democratic ticket has a Office of comptroller?" }, { "role": "assistant", "content": "SELECT \"democratic_ticket\" FROM \"1898_state_election_results\" WHERE \"office\"='comptroller';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1898_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"socialist_labor_ticket\" text,\n \"prohibition_ticket\" text,\n \"independent_citizens_ticket\" text\n);\n\nQuestion: Which Prohibition ticket has a Socialist Labor ticket of joseph smith?" }, { "role": "assistant", "content": "SELECT \"prohibition_ticket\" FROM \"1898_state_election_results\" WHERE \"socialist_labor_ticket\"='joseph smith';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the lowest grid number when Colin Edwards is the rider?" }, { "role": "assistant", "content": "SELECT MIN(\"grid\") FROM \"moto_gp_classification\" WHERE \"rider\"='colin edwards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the time/retired when there are less than 22 laps and honda is the manufacturer?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"moto_gp_classification\" WHERE \"laps\"<22 AND \"manufacturer\"='honda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the average number of laps when the grid number is 9?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"moto_gp_classification\" WHERE \"grid\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest number of laps when honda is the manufacturer and the grid number is 12?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"moto_gp_classification\" WHERE \"manufacturer\"='honda' AND \"grid\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who is the rider when the grid number is 3?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"moto_gp_classification\" WHERE \"grid\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps were driven when the time/retired is +44.284?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"moto_gp_classification\" WHERE \"time_retired\"='+44.284';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coins\" (\n \"value\" text,\n \"equiv\" text,\n \"diameter\" text,\n \"weight\" text,\n \"composition\" text\n);\n\nQuestion: What is the value of the coin weighing 10.5 g and made of cupronickel?" }, { "role": "assistant", "content": "SELECT \"value\" FROM \"coins\" WHERE \"composition\"='cupronickel' AND \"weight\"='10.5 g';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coins\" (\n \"value\" text,\n \"equiv\" text,\n \"diameter\" text,\n \"weight\" text,\n \"composition\" text\n);\n\nQuestion: What is the coin with a \u20ac equivalency of 0.30 made of?" }, { "role": "assistant", "content": "SELECT \"composition\" FROM \"coins\" WHERE \"equiv\"='0.30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coins\" (\n \"value\" text,\n \"equiv\" text,\n \"diameter\" text,\n \"weight\" text,\n \"composition\" text\n);\n\nQuestion: What is the coin that weighs 3 g made of?" }, { "role": "assistant", "content": "SELECT \"composition\" FROM \"coins\" WHERE \"weight\"='3 g';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coins\" (\n \"value\" text,\n \"equiv\" text,\n \"diameter\" text,\n \"weight\" text,\n \"composition\" text\n);\n\nQuestion: What is the diameter of the coin with a \u20ac equivalence of 0.60?" }, { "role": "assistant", "content": "SELECT \"diameter\" FROM \"coins\" WHERE \"equiv\"='0.60';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coins\" (\n \"value\" text,\n \"equiv\" text,\n \"diameter\" text,\n \"weight\" text,\n \"composition\" text\n);\n\nQuestion: How much does the coin with a 14mm diameter weigh?" }, { "role": "assistant", "content": "SELECT \"weight\" FROM \"coins\" WHERE \"diameter\"='14mm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monster_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"coverage\" text\n);\n\nQuestion: What is the coverage for the 99.5mhz frequency?" }, { "role": "assistant", "content": "SELECT \"coverage\" FROM \"monster_radio_stations\" WHERE \"frequency\"='99.5mhz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monster_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"coverage\" text\n);\n\nQuestion: What is the power in kW corresponding to the station that covers General Santos?" }, { "role": "assistant", "content": "SELECT \"power_k_w\" FROM \"monster_radio_stations\" WHERE \"coverage\"='general santos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monster_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"coverage\" text\n);\n\nQuestion: What is the branding for the station with a frequency of 93.1mhz and a coverage of Zamboanga?" }, { "role": "assistant", "content": "SELECT \"branding\" FROM \"monster_radio_stations\" WHERE \"frequency\"='93.1mhz' AND \"coverage\"='zamboanga';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monster_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"coverage\" text\n);\n\nQuestion: What is the frequency for the 10kw station with DXEZ as its callsign?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"monster_radio_stations\" WHERE \"power_k_w\"='10kw' AND \"callsign\"='dxez';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monster_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"coverage\" text\n);\n\nQuestion: What is the frequency for the station with DYBT as its callsign?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"monster_radio_stations\" WHERE \"callsign\"='dybt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monster_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"coverage\" text\n);\n\nQuestion: What is the branding for the station with a frequency of 93.1mhz and a callsign of DWRX?" }, { "role": "assistant", "content": "SELECT \"branding\" FROM \"monster_radio_stations\" WHERE \"frequency\"='93.1mhz' AND \"callsign\"='dwrx';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What is Women's Doubles, when Year is 2007?" }, { "role": "assistant", "content": "SELECT \"women_s_doubles\" FROM \"past_winners\" WHERE \"year\"=2007;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_s_15_busiest_airports_by_passenge\" (\n \"rank\" real,\n \"location\" text,\n \"total_passengers\" real,\n \"annual_change\" text,\n \"capacity_in_use\" text\n);\n\nQuestion: Can you tell me lowest Rank that has the Capacity in use of 93.6%, and the Total Passengers larger than 4,679,457?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"brazil_s_15_busiest_airports_by_passenge\" WHERE \"capacity_in_use\"='93.6%' AND \"total_passengers\">'4,679,457';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_s_15_busiest_airports_by_passenge\" (\n \"rank\" real,\n \"location\" text,\n \"total_passengers\" real,\n \"annual_change\" text,\n \"capacity_in_use\" text\n);\n\nQuestion: Can you tell me the lowest Total Passengers than has the Location of salvador, and the Rank larger than 5?" }, { "role": "assistant", "content": "SELECT MIN(\"total_passengers\") FROM \"brazil_s_15_busiest_airports_by_passenge\" WHERE \"location\"='salvador' AND \"rank\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_s_15_busiest_airports_by_passenge\" (\n \"rank\" real,\n \"location\" text,\n \"total_passengers\" real,\n \"annual_change\" text,\n \"capacity_in_use\" text\n);\n\nQuestion: Can you tell me the Annual change that has the Location of manaus?" }, { "role": "assistant", "content": "SELECT \"annual_change\" FROM \"brazil_s_15_busiest_airports_by_passenge\" WHERE \"location\"='manaus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"best_finish\" text,\n \"earnings\" text,\n \"scoring_average\" real\n);\n\nQuestion: What is the average number of cuts made when there were more than 2 tournaments played in 2011?" }, { "role": "assistant", "content": "SELECT AVG(\"cuts_made\") FROM \"lpga_tour_career_summary\" WHERE \"tournaments_played\">2 AND \"year\"=2011;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"best_finish\" text,\n \"earnings\" text,\n \"scoring_average\" real\n);\n\nQuestion: What is the total number of wins with 10 cuts made and a score average under 74.09?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"lpga_tour_career_summary\" WHERE \"cuts_made\"=10 AND \"scoring_average\"<74.09;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"locale\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" text\n);\n\nQuestion: What is Madeleine Dupont's shot pct.?" }, { "role": "assistant", "content": "SELECT \"shot_pct\" FROM \"standings\" WHERE \"skip\"='madeleine dupont';" } ]
[ { "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: Can you tell me the Score that has the High assists of rafer alston (8)?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"high_assists\"='rafer alston (8)';" } ]
[ { "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: Can you tell me the High points that has the High rebounds of rafer alston (9)?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"high_rebounds\"='rafer alston (9)';" } ]
[ { "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: Can you tell me the Score that has the Date of april 8?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='april 8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"member_schools\" (\n \"school\" text,\n \"location\" text,\n \"enrolment\" real,\n \"founded\" real,\n \"denomination\" text,\n \"boys_girls\" text,\n \"day_boarding\" text,\n \"year_entered_competition\" real,\n \"school_colors\" text\n);\n\nQuestion: Which boys' school wears Royal Blue and Gold and entered the competition in 1929?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"member_schools\" WHERE \"boys_girls\"='boys' AND \"year_entered_competition\"=1929 AND \"school_colors\"='royal blue and gold';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preseason\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What's the highest attendance for a game the Texan's played at Arrowhead Stadium?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"preseason\" WHERE \"game_site\"='arrowhead stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preseason\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Who did the Texan's play on Week 4?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"preseason\" WHERE \"week\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preseason\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What's the date for HOF week?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"preseason\" WHERE \"week\"='hof';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"name\" text,\n \"league\" text,\n \"fa_cup\" text,\n \"league_cup\" text,\n \"football_league_trophy\" text,\n \"watney_cup\" text,\n \"welsh_cup\" text,\n \"total\" text\n);\n\nQuestion: What is Total, when FA Cup is 1 0 (3)?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"top_goalscorers\" WHERE \"fa_cup\"='1 0 (3)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"candidate\" text,\n \"votes\" real,\n \"percentage\" text,\n \"counties\" real,\n \"delegates\" real\n);\n\nQuestion: What is the lowest number of delegates when John McCain was the candidate with less than 45 candidates?" }, { "role": "assistant", "content": "SELECT MIN(\"delegates\") FROM \"results\" WHERE \"candidate\"='john mccain' AND \"counties\"<45;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"candidate\" text,\n \"votes\" real,\n \"percentage\" text,\n \"counties\" real,\n \"delegates\" real\n);\n\nQuestion: What is the sum of Counties when there were 701,761 votes and less than 57 delegates?" }, { "role": "assistant", "content": "SELECT SUM(\"counties\") FROM \"results\" WHERE \"votes\"='701,761' AND \"delegates\"<57;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"candidate\" text,\n \"votes\" real,\n \"percentage\" text,\n \"counties\" real,\n \"delegates\" real\n);\n\nQuestion: What is the highest Counties when Mitt Romney was the candidate with less than 0 delegates?" }, { "role": "assistant", "content": "SELECT MAX(\"counties\") FROM \"results\" WHERE \"candidate\"='mitt romney' AND \"delegates\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"candidate\" text,\n \"votes\" real,\n \"percentage\" text,\n \"counties\" real,\n \"delegates\" real\n);\n\nQuestion: What is the name of the candidate with more than 4,060 votes and more than 0 delegates?" }, { "role": "assistant", "content": "SELECT \"candidate\" FROM \"results\" WHERE \"votes\">'4,060' AND \"delegates\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"candidate\" text,\n \"votes\" real,\n \"percentage\" text,\n \"counties\" real,\n \"delegates\" real\n);\n\nQuestion: What is the number of votes when Ron Paul is the candidate with less than 0 counties?" }, { "role": "assistant", "content": "SELECT COUNT(\"votes\") FROM \"results\" WHERE \"candidate\"='ron paul' AND \"counties\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"player\" text,\n \"position\" text,\n \"premier_league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of totals associated with a UEFA Cup score of 4?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"top_scorers\" WHERE \"uefa_cup\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"player\" text,\n \"position\" text,\n \"premier_league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of totals for FA Cup values of 0?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"top_scorers\" WHERE \"fa_cup\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"hometown_previous_school\" text\n);\n\nQuestion: What is the Hometown of the person with a height of 5'8\"?" }, { "role": "assistant", "content": "SELECT \"hometown_previous_school\" FROM \"roster\" WHERE \"height\"='5''8\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"hometown_previous_school\" text\n);\n\nQuestion: What is the average Weight of the person who is 6'9\"?" }, { "role": "assistant", "content": "SELECT AVG(\"weight\") FROM \"roster\" WHERE \"height\"='6''9\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"hometown_previous_school\" text\n);\n\nQuestion: What is the Hometown of Tim Williams?" }, { "role": "assistant", "content": "SELECT \"hometown_previous_school\" FROM \"roster\" WHERE \"name\"='tim williams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"hometown_previous_school\" text\n);\n\nQuestion: What is the Year of the person who is 6'1\", and weighs more than 165?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"roster\" WHERE \"height\"='6''1\\\"' AND \"weight\">165;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fide_april_2008_top_ten\" (\n \"rank\" real,\n \"prev\" real,\n \"player\" text,\n \"rating\" real,\n \"chng\" text\n);\n\nQuestion: What player has a rating greater than 2746, with a prev less than 4, and +4 as the chng?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"fide_april_2008_top_ten\" WHERE \"rating\">2746 AND \"prev\"<4 AND \"chng\"='+4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fide_april_2008_top_ten\" (\n \"rank\" real,\n \"prev\" real,\n \"player\" text,\n \"rating\" real,\n \"chng\" text\n);\n\nQuestion: What chng has a rank greater than 6, with 12 as a prev?" }, { "role": "assistant", "content": "SELECT \"chng\" FROM \"fide_april_2008_top_ten\" WHERE \"rank\">6 AND \"prev\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fide_april_2008_top_ten\" (\n \"rank\" real,\n \"prev\" real,\n \"player\" text,\n \"rating\" real,\n \"chng\" text\n);\n\nQuestion: What is the highest prev that has 9 as the rank, with a rating less than 2746?" }, { "role": "assistant", "content": "SELECT MAX(\"prev\") FROM \"fide_april_2008_top_ten\" WHERE \"rank\"=9 AND \"rating\"<2746;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2004_summer_olympics_m\" (\n \"name\" text,\n \"date_of_birth\" text,\n \"height\" real,\n \"weight\" real,\n \"spike\" real,\n \"block\" real\n);\n\nQuestion: How many blocks have a weight greater than 82, and a height less than 199?" }, { "role": "assistant", "content": "SELECT SUM(\"block\") FROM \"volleyball_at_the_2004_summer_olympics_m\" WHERE \"weight\">82 AND \"height\"<199;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2004_summer_olympics_m\" (\n \"name\" text,\n \"date_of_birth\" text,\n \"height\" real,\n \"weight\" real,\n \"spike\" real,\n \"block\" real\n);\n\nQuestion: What is the lowest block that has 328 as the spike, and a height less than 186?" }, { "role": "assistant", "content": "SELECT MIN(\"block\") FROM \"volleyball_at_the_2004_summer_olympics_m\" WHERE \"spike\"=328 AND \"height\"<186;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2004_summer_olympics_m\" (\n \"name\" text,\n \"date_of_birth\" text,\n \"height\" real,\n \"weight\" real,\n \"spike\" real,\n \"block\" real\n);\n\nQuestion: What is the lowest block that has a height less than 202, 19.06.1980 as the date of birth, and a weight greater than 76?" }, { "role": "assistant", "content": "SELECT MIN(\"block\") FROM \"volleyball_at_the_2004_summer_olympics_m\" WHERE \"height\"<202 AND \"date_of_birth\"='19.06.1980' AND \"weight\">76;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2004_summer_olympics_m\" (\n \"name\" text,\n \"date_of_birth\" text,\n \"height\" real,\n \"weight\" real,\n \"spike\" real,\n \"block\" real\n);\n\nQuestion: What is the highest block that has 15.09.1981 as the date, and a height greater than 202?" }, { "role": "assistant", "content": "SELECT MAX(\"block\") FROM \"volleyball_at_the_2004_summer_olympics_m\" WHERE \"date_of_birth\"='15.09.1981' AND \"height\">202;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_11_teams\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"2009_season\" text,\n \"group\" text\n);\n\nQuestion: Which City has a Stadium of estadio san crist\u00f3bal?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"2010_11_teams\" WHERE \"stadium\"='estadio san crist\u00f3bal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_11_teams\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"2009_season\" text,\n \"group\" text\n);\n\nQuestion: When in 2009 season has a Group of group b, and cancha del mystic with a Club of el tecal?" }, { "role": "assistant", "content": "SELECT \"2009_season\" FROM \"2010_11_teams\" WHERE \"group\"='group b' AND \"stadium\"='cancha del mystic' AND \"club\"='el tecal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_11_teams\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"2009_season\" text,\n \"group\" text\n);\n\nQuestion: WHich Club has a City of col\u00f3n?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"2010_11_teams\" WHERE \"city\"='col\u00f3n';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_11_teams\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"2009_season\" text,\n \"group\" text\n);\n\nQuestion: WHat kind of 2009 season has a City of panama city, and a Group of group b?" }, { "role": "assistant", "content": "SELECT \"2009_season\" FROM \"2010_11_teams\" WHERE \"city\"='panama city' AND \"group\"='group b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_11_teams\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"2009_season\" text,\n \"group\" text\n);\n\nQuestion: Which City has a Club of suntracs f.c.?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"2010_11_teams\" WHERE \"club\"='suntracs f.c.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_11_teams\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"2009_season\" text,\n \"group\" text\n);\n\nQuestion: Which Stadium has a City of panama city, and a Group of group a, and a 2009 season of 1st in lna (champion)?" }, { "role": "assistant", "content": "SELECT \"stadium\" FROM \"2010_11_teams\" WHERE \"city\"='panama city' AND \"group\"='group a' AND \"2009_season\"='1st in lna (champion)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"date\" text,\n \"matches\" real,\n \"clubs\" text,\n \"prize_money\" text\n);\n\nQuestion: What is the highest Matches, when Prize Money is \u00a35,000?" }, { "role": "assistant", "content": "SELECT MAX(\"matches\") FROM \"calendar\" WHERE \"prize_money\"='\u00a35,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"date\" text,\n \"matches\" real,\n \"clubs\" text,\n \"prize_money\" text\n);\n\nQuestion: What is Date, when Matches is less than 32, and when Round is Fifth Round Proper?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"calendar\" WHERE \"matches\"<32 AND \"round\"='fifth round proper';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"date\" text,\n \"matches\" real,\n \"clubs\" text,\n \"prize_money\" text\n);\n\nQuestion: What is the average Matches, when Round is Third Qualifying Round?" }, { "role": "assistant", "content": "SELECT AVG(\"matches\") FROM \"calendar\" WHERE \"round\"='third qualifying round';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"date\" text,\n \"matches\" real,\n \"clubs\" text,\n \"prize_money\" text\n);\n\nQuestion: What is the total number of Matches, when Clubs is 588 \u2192 406?" }, { "role": "assistant", "content": "SELECT COUNT(\"matches\") FROM \"calendar\" WHERE \"clubs\"='588 \u2192 406';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"date\" text,\n \"matches\" real,\n \"clubs\" text,\n \"prize_money\" text\n);\n\nQuestion: What is Prize Money, when Matches is less than 73, and when Round is Third Round Proper?" }, { "role": "assistant", "content": "SELECT \"prize_money\" FROM \"calendar\" WHERE \"matches\"<73 AND \"round\"='third round proper';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: For the tournament played on a hard surface and ending with a score of Walkover, who was the Finals opponent?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"singles_wins_5\" WHERE \"surface\"='hard' AND \"score\"='walkover';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: For the tournament played on September 25, 1995, who was the Finals opponent?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"singles_wins_5\" WHERE \"date\"='september 25, 1995';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which tournament was played on September 25, 1995?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_wins_5\" WHERE \"date\"='september 25, 1995';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the time for the bout against Amanda Lavoy, which went under 3 rounds?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"round\"<3 AND \"opponent\"='amanda lavoy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_out_on_loan\" (\n \"nat\" text,\n \"name\" text,\n \"since\" real,\n \"app_l_c_e\" text,\n \"goals_l_c_e\" text,\n \"ends\" real,\n \"transfer_fee\" text,\n \"notes\" text\n);\n\nQuestion: What is Notes, when App(L/C/E) is 13 (7/2/4)?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"players_out_on_loan\" WHERE \"app_l_c_e\"='13 (7/2/4)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_out_on_loan\" (\n \"nat\" text,\n \"name\" text,\n \"since\" real,\n \"app_l_c_e\" text,\n \"goals_l_c_e\" text,\n \"ends\" real,\n \"transfer_fee\" text,\n \"notes\" text\n);\n\nQuestion: What is Nat., when Ends is greater than 2010, when Since is 2006, and when Name is Paligeorgos?" }, { "role": "assistant", "content": "SELECT \"nat\" FROM \"players_out_on_loan\" WHERE \"ends\">2010 AND \"since\"=2006 AND \"name\"='paligeorgos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_out_on_loan\" (\n \"nat\" text,\n \"name\" text,\n \"since\" real,\n \"app_l_c_e\" text,\n \"goals_l_c_e\" text,\n \"ends\" real,\n \"transfer_fee\" text,\n \"notes\" text\n);\n\nQuestion: What is the lowest Since, when Notes is To Anagennisi Karditsa, and when App(L/C/E) is 0 (0/0/0)?" }, { "role": "assistant", "content": "SELECT MIN(\"since\") FROM \"players_out_on_loan\" WHERE \"notes\"='to anagennisi karditsa' AND \"app_l_c_e\"='0 (0/0/0)';" } ]
[ { "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);\n\nQuestion: What is the Time/Retired of the Newman-Haas Racing team in under 51 laps?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"race\" WHERE \"laps\"<51 AND \"team\"='newman-haas racing';" } ]
[ { "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);\n\nQuestion: What are the lowest laps Alex Tagliani did for the Forsythe Racing team?" }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"race\" WHERE \"team\"='forsythe racing' AND \"driver\"='alex tagliani';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text\n);\n\nQuestion: What is the Event when DNP shows for 2007\u201308?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"grand_slam_record\" WHERE \"2007_08\"='dnp';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text\n);\n\nQuestion: What is the 2008\u201309 when the 2009\u201310 shows q?" }, { "role": "assistant", "content": "SELECT \"2008_09\" FROM \"grand_slam_record\" WHERE \"2009_10\"='q';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text\n);\n\nQuestion: What is the 2009\u201310 when the 2007\u201308 shows n/a, and an Event of colonial square ladies classic?" }, { "role": "assistant", "content": "SELECT \"2009_10\" FROM \"grand_slam_record\" WHERE \"2007_08\"='n/a' AND \"event\"='colonial square ladies classic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text\n);\n\nQuestion: What is the Event when the 2008\u201309 is sf?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"grand_slam_record\" WHERE \"2008_09\"='sf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text\n);\n\nQuestion: What is the 2010\u201311 when the Event is colonial square ladies classic?" }, { "role": "assistant", "content": "SELECT \"2010_11\" FROM \"grand_slam_record\" WHERE \"event\"='colonial square ladies classic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text\n);\n\nQuestion: What is the 2007\u201308 when the event was autumn gold?" }, { "role": "assistant", "content": "SELECT \"2007_08\" FROM \"grand_slam_record\" WHERE \"event\"='autumn gold';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_15th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: Which Cultural and Educational Panel has a Labour Panel larger than 5, and an Industrial and Commercial Panel larger than 9?" }, { "role": "assistant", "content": "SELECT COUNT(\"cultural_and_educational_panel\") FROM \"composition_of_the_15th_seanad\" WHERE \"labour_panel\">5 AND \"industrial_and_commercial_panel\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_15th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: Which Administrative Panel has a Nominated by the Taoiseach smaller than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"administrative_panel\") FROM \"composition_of_the_15th_seanad\" WHERE \"nominated_by_the_taoiseach\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_15th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: Which Labour Panel has an Industrial and Commercial Panel of 9, and a University of Dublin smaller than 3?" }, { "role": "assistant", "content": "SELECT AVG(\"labour_panel\") FROM \"composition_of_the_15th_seanad\" WHERE \"industrial_and_commercial_panel\"=9 AND \"university_of_dublin\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition_of_the_15th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: Which Total has a Labour Panel smaller than 5, an Administrative Panel smaller than 1, and a National University of Ireland smaller than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"composition_of_the_15th_seanad\" WHERE \"labour_panel\"<5 AND \"administrative_panel\"<1 AND \"national_university_of_ireland\"<2;" } ]