text stringlengths 310 1.28k |
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"district" real,
"incumbent" text,
"2008_status" text,
"democratic" text,
"republican" text
);
Question: Which Incumbent has a Republican of dan mansell?
<|assistant|>
SELECT "incumbent" FROM "summary" WHERE "republican"='dan mansell';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary" (
"district" real,
"incumbent" text,
"2008_status" text,
"democratic" text,
"republican" text
);
Question: Which Democratic has a District smaller than 7, and a Republican of dan mansell?
<|assistant|>
SELECT "democratic" FROM "summary" WHERE "district"<7 AND "republican"='dan mansell';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "playoffs" (
"date" text,
"opponent" text,
"result" text,
"score" text,
"record" text,
"streak" text
);
Question: Which record has a score of 135–134?
<|assistant|>
SELECT "record" FROM "playoffs" WHERE "score"='135–134';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_six_nations_championship_squads" (
"player" text,
"position" text,
"date_of_birth_age" text,
"caps" real,
"club_province" text
);
Question: Name the position for the player born 2 november 1987
<|assistant|>
SELECT "position" FROM "2008_six_nations_championship_squads" WHERE "date_of_birth_age"='2 november 1987';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_six_nations_championship_squads" (
"player" text,
"position" text,
"date_of_birth_age" text,
"caps" real,
"club_province" text
);
Question: Name the club/province for steve borthwick
<|assistant|>
SELECT "club_province" FROM "2008_six_nations_championship_squads" WHERE "player"='steve borthwick';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "apothecaries_system" (
"unit" text,
"russian" text,
"translation" text,
"ratio" real,
"metric_value" text,
"avoirdupois_value" text,
"ordinary_value" text
);
Question: What is the largest ration with an ordinary value of 84 zolotnik?
<|assistant|>
SELECT MAX("ratio") FROM "apothecaries_system" WHERE "ordinary_value"='84 zolotnik';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "apothecaries_system" (
"unit" text,
"russian" text,
"translation" text,
"ratio" real,
"metric_value" text,
"avoirdupois_value" text,
"ordinary_value" text
);
Question: What unit has an Avoirdupois value of 57.602 gr.?
<|assistant|>
SELECT "unit" FROM "apothecaries_system" WHERE "avoirdupois_value"='57.602 gr.';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "apothecaries_system" (
"unit" text,
"russian" text,
"translation" text,
"ratio" real,
"metric_value" text,
"avoirdupois_value" text,
"ordinary_value" text
);
Question: Which translation had a unit of Uncia?
<|assistant|>
SELECT "translation" FROM "apothecaries_system" WHERE "unit"='uncia';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "apothecaries_system" (
"unit" text,
"russian" text,
"translation" text,
"ratio" real,
"metric_value" text,
"avoirdupois_value" text,
"ordinary_value" text
);
Question: What ordinary value has a metric value of 29.861 g?
<|assistant|>
SELECT "ordinary_value" FROM "apothecaries_system" WHERE "metric_value"='29.861 g';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "apothecaries_system" (
"unit" text,
"russian" text,
"translation" text,
"ratio" real,
"metric_value" text,
"avoirdupois_value" text,
"ordinary_value" text
);
Question: Which ordinary value has a Russian value of унция?
<|assistant|>
SELECT "ordinary_value" FROM "apothecaries_system" WHERE "russian"='унция';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "apothecaries_system" (
"unit" text,
"russian" text,
"translation" text,
"ratio" real,
"metric_value" text,
"avoirdupois_value" text,
"ordinary_value" text
);
Question: Which Avoirdupois value is translated to grain?
<|assistant|>
SELECT "avoirdupois_value" FROM "apothecaries_system" WHERE "translation"='grain';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_auto_racing_tracks_in_the_united" (
"track" text,
"city" text,
"state" text,
"opened" text,
"major_series" text,
"turns" text
);
Question: What is the number of turns for the City of san antonio?
<|assistant|>
SELECT "turns" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "city"='san antonio';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_auto_racing_tracks_in_the_united" (
"track" text,
"city" text,
"state" text,
"opened" text,
"major_series" text,
"turns" text
);
Question: What is the State with the imsa gt as the Major Series and a track in new orleans?
<|assistant|>
SELECT "state" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "major_series"='imsa gt' AND "track"='new orleans';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_auto_racing_tracks_in_the_united" (
"track" text,
"city" text,
"state" text,
"opened" text,
"major_series" text,
"turns" text
);
Question: Where is the track located with 18 turns?
<|assistant|>
SELECT "track" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "turns"='18';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_auto_racing_tracks_in_the_united" (
"track" text,
"city" text,
"state" text,
"opened" text,
"major_series" text,
"turns" text
);
Question: What is the State with the trans-am Major Series in Grand Rapids?
<|assistant|>
SELECT "state" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "major_series"='trans-am' AND "city"='grand rapids';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_auto_racing_tracks_in_the_united" (
"track" text,
"city" text,
"state" text,
"opened" text,
"major_series" text,
"turns" text
);
Question: Where is the track located that opened in 1992?
<|assistant|>
SELECT "track" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "opened"='1992';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_auto_racing_tracks_in_the_united" (
"track" text,
"city" text,
"state" text,
"opened" text,
"major_series" text,
"turns" text
);
Question: What shows for opened for the Nascar Major Series?
<|assistant|>
SELECT "opened" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "major_series"='nascar';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scorers" (
"player" text,
"league" real,
"malaysia_cup" real,
"fa_cup" real,
"total" real
);
Question: What is the lowest number of FA cups associated with 0 malaysia cups?
<|assistant|>
SELECT MIN("fa_cup") FROM "scorers" WHERE "malaysia_cup"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scorers" (
"player" text,
"league" real,
"malaysia_cup" real,
"fa_cup" real,
"total" real
);
Question: How many league cups for m patrick maria with 0 total?
<|assistant|>
SELECT SUM("league") FROM "scorers" WHERE "player"='m patrick maria' AND "total"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "scorers" (
"player" text,
"league" real,
"malaysia_cup" real,
"fa_cup" real,
"total" real
);
Question: What is the highest number of Malaysia Cups for a player with over 0 leagues and under 0 FA cups?
<|assistant|>
SELECT MAX("malaysia_cup") FROM "scorers" WHERE "league">0 AND "fa_cup"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"date" text,
"host" text,
"agg" text,
"visitor" text,
"ground" text,
"attendance" real,
"tournament" text
);
Question: What is the tournament on July 29 hosted by SK Brann?
<|assistant|>
SELECT "tournament" FROM "results" WHERE "host"='sk brann' AND "date"='july 29';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"date" text,
"host" text,
"agg" text,
"visitor" text,
"ground" text,
"attendance" real,
"tournament" text
);
Question: Who is the visitor of the match on July 29?
<|assistant|>
SELECT "visitor" FROM "results" WHERE "date"='july 29';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_schedule" (
"date" text,
"opponent" text,
"result" text,
"score" text,
"record" text,
"streak" text
);
Question: What is the game that has the phoenix suns as the opponent played against?
<|assistant|>
SELECT "result" FROM "season_schedule" WHERE "opponent"='phoenix suns';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "april" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" real,
"record" text
);
Question: What is the attendance of the game on 2007-04-07 with the Warriors as the visitor team?
<|assistant|>
SELECT "attendance" FROM "april" WHERE "visitor"='warriors' AND "date"='2007-04-07';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What day is their record 13-15?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "record"='13-15';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: Who did they play when dickey (0-1) recorded the loss?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "loss"='dickey (0-1)';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"time_et" text,
"game_site" text,
"result" text,
"record" text
);
Question: What is the result of the game of heinz field with a record of 2-5?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "game_site"='heinz field' AND "record"='2-5';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"time_et" text,
"game_site" text,
"result" text,
"record" text
);
Question: What opponent has a record of 6-9?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "record"='6-9';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"time_et" text,
"game_site" text,
"result" text,
"record" text
);
Question: What is the week with a record of 2-1?
<|assistant|>
SELECT COUNT("week") FROM "schedule" WHERE "record"='2-1';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: What City of license has a Frequency MHz smaller than 95.9 with w223au as the call sign?
<|assistant|>
SELECT "city_of_license" FROM "translators" WHERE "frequency_m_hz"<95.9 AND "call_sign"='w223au';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: What is the Call sign for the ERP W 19?
<|assistant|>
SELECT "call_sign" FROM "translators" WHERE "erp_w"=19;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: What FCC info is listed for the ERP W of 2?
<|assistant|>
SELECT "fcc_info" FROM "translators" WHERE "erp_w"=2;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: What Call sign shows an ERP W of 80?
<|assistant|>
SELECT "call_sign" FROM "translators" WHERE "erp_w"=80;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_of_license" text,
"erp_w" real,
"class" text,
"fcc_info" text
);
Question: What is the Class for the ERP W of more than 2 and the call sign of w223au?
<|assistant|>
SELECT "class" FROM "translators" WHERE "erp_w">2 AND "call_sign"='w223au';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"time" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
Question: what team lost on july 30
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "date"='july 30';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2010_2011" (
"date" text,
"site" text,
"sport" text,
"winning_team" text,
"series" text
);
Question: What sport was played on February 25, 2011?
<|assistant|>
SELECT "sport" FROM "2010_2011" WHERE "date"='february 25, 2011';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2010_2011" (
"date" text,
"site" text,
"sport" text,
"winning_team" text,
"series" text
);
Question: Where was the sport played on September 10, 2010?
<|assistant|>
SELECT "site" FROM "2010_2011" WHERE "date"='september 10, 2010';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_wins_38" (
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponent_in_the_final" text,
"score" text
);
Question: What type of surface was played on when julie halard-decugis was the partner on October 8, 2000?
<|assistant|>
SELECT "surface" FROM "doubles_wins_38" WHERE "partner"='julie halard-decugis' AND "date"='october 8, 2000';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary_of_results_by_season" (
"year" text,
"played" real,
"wins" real,
"losses" real,
"no_result" real,
"pct_win" text
);
Question: How many Played has a % Win of 50.00%, and Losses of 1, and Wins smaller than 1?
<|assistant|>
SELECT COUNT("played") FROM "summary_of_results_by_season" WHERE "pct_win"='50.00%' AND "losses"=1 AND "wins"<1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary_of_results_by_season" (
"year" text,
"played" real,
"wins" real,
"losses" real,
"no_result" real,
"pct_win" text
);
Question: WHAT kind of No Result has Wins smaller than 2, and Losses larger than 1?
<|assistant|>
SELECT "no_result" FROM "summary_of_results_by_season" WHERE "wins"<2 AND "losses">1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary_of_results_by_season" (
"year" text,
"played" real,
"wins" real,
"losses" real,
"no_result" real,
"pct_win" text
);
Question: How many Played that has Losses of 6, and Wins larger than 33?
<|assistant|>
SELECT AVG("played") FROM "summary_of_results_by_season" WHERE "losses"=6 AND "wins">33;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary_of_results_by_season" (
"year" text,
"played" real,
"wins" real,
"losses" real,
"no_result" real,
"pct_win" text
);
Question: What kind of No Result has a % Win of 100.00% and a Played larger than 4 in 2012?
<|assistant|>
SELECT MIN("no_result") FROM "summary_of_results_by_season" WHERE "pct_win"='100.00%' AND "played">4 AND "year"='2012';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What is the Loss has an Attendance more than 43,095 and a Record of 31–29?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "attendance">'43,095' AND "record"='31–29';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: Which Loss has a Score of 6–5?
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "score"='6–5';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"record" text
);
Question: Date of wed. nov. 13 had how many number of games?
<|assistant|>
SELECT COUNT("game") FROM "game_log" WHERE "date"='wed. nov. 13';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"record" text
);
Question: Record of 6–1 had what score?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "record"='6–1';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
"record" text
);
Question: Score of 118–114, and a Record of 8–1 is what lowest game?
<|assistant|>
SELECT MIN("game") FROM "game_log" WHERE "score"='118–114' AND "record"='8–1';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_calendar" (
"date" text,
"country" text,
"circuit" text,
"sprint_winner" text,
"feature_winner" text,
"report" text
);
Question: Which circuit was in Great Britain with Ireland as the winner?
<|assistant|>
SELECT "circuit" FROM "season_calendar" WHERE "feature_winner"='ireland' AND "country"='great britain';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "match_details" (
"date" text,
"league_position" text,
"opponents" text,
"venue" text,
"result" text,
"score_f_a" text,
"attendance" real
);
Question: How many were in attendance when the league position was 16th and the score was F–A of 0–3?
<|assistant|>
SELECT COUNT("attendance") FROM "match_details" WHERE "league_position"='16th' AND "score_f_a"='0–3';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "match_details" (
"date" text,
"league_position" text,
"opponents" text,
"venue" text,
"result" text,
"score_f_a" text,
"attendance" real
);
Question: How many were in attendance for a result of D, at H venue, and Arsenal as an opponent?
<|assistant|>
SELECT "attendance" FROM "match_details" WHERE "result"='d' AND "venue"='h' AND "opponents"='arsenal';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "match_details" (
"date" text,
"league_position" text,
"opponents" text,
"venue" text,
"result" text,
"score_f_a" text,
"attendance" real
);
Question: What is the largest number in attendance at H venue opposing Liverpool with a result of D?
<|assistant|>
SELECT MAX("attendance") FROM "match_details" WHERE "venue"='h' AND "result"='d' AND "opponents"='liverpool';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "norfolk_state" (
"position" text,
"number" real,
"name" text,
"height" text,
"weight" real,
"class" text,
"hometown" text,
"games" real
);
Question: What is the number of Justin Jeffries?
<|assistant|>
SELECT COUNT("number") FROM "norfolk_state" WHERE "name"='justin jeffries';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "norfolk_state" (
"position" text,
"number" real,
"name" text,
"height" text,
"weight" real,
"class" text,
"hometown" text,
"games" real
);
Question: How many games has number 61 played in?
<|assistant|>
SELECT MIN("games") FROM "norfolk_state" WHERE "number"=61;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "norfolk_state" (
"position" text,
"number" real,
"name" text,
"height" text,
"weight" real,
"class" text,
"hometown" text,
"games" real
);
Question: What is the name of the player who is a wr and has a weight of 197?
<|assistant|>
SELECT "name" FROM "norfolk_state" WHERE "position"='wr' AND "weight"=197;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "norfolk_state" (
"position" text,
"number" real,
"name" text,
"height" text,
"weight" real,
"class" text,
"hometown" text,
"games" real
);
Question: What is the hometown of number 40?
<|assistant|>
SELECT "hometown" FROM "norfolk_state" WHERE "number"=40;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "october" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: What date is the visitor Ottawa?
<|assistant|>
SELECT "date" FROM "october" WHERE "visitor"='ottawa';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "expulsion_proceedings_not_resulting_in_e" (
"year" real,
"senator" text,
"party" text,
"state" text,
"result" text
);
Question: what is the sum of the year in rhode island
<|assistant|>
SELECT SUM("year") FROM "expulsion_proceedings_not_resulting_in_e" WHERE "state"='rhode island';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "expulsion_proceedings_not_resulting_in_e" (
"year" real,
"senator" text,
"party" text,
"state" text,
"result" text
);
Question: what is the senator in kentucky
<|assistant|>
SELECT "senator" FROM "expulsion_proceedings_not_resulting_in_e" WHERE "state"='kentucky';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rail" (
"train_number" text,
"train_name" text,
"origin" text,
"destination" text,
"frequency_inbound_outbound" text
);
Question: What is the destination of the rail with Dhanbad as the origin?
<|assistant|>
SELECT "destination" FROM "rail" WHERE "origin"='dhanbad';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rail" (
"train_number" text,
"train_name" text,
"origin" text,
"destination" text,
"frequency_inbound_outbound" text
);
Question: What is the destination of the Garib nwaz exp train?
<|assistant|>
SELECT "destination" FROM "rail" WHERE "train_name"='garib nwaz exp';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rail" (
"train_number" text,
"train_name" text,
"origin" text,
"destination" text,
"frequency_inbound_outbound" text
);
Question: What is the train name of the rail with a daily frequency and a destination of Rajgir?
<|assistant|>
SELECT "train_name" FROM "rail" WHERE "frequency_inbound_outbound"='daily' AND "destination"='rajgir';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rail" (
"train_number" text,
"train_name" text,
"origin" text,
"destination" text,
"frequency_inbound_outbound" text
);
Question: What is the train name of the rail with a daily frequency and Jammutawi as the destination?
<|assistant|>
SELECT "train_name" FROM "rail" WHERE "frequency_inbound_outbound"='daily' AND "destination"='jammutawi';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rail" (
"train_number" text,
"train_name" text,
"origin" text,
"destination" text,
"frequency_inbound_outbound" text
);
Question: What is the frequency of the rail with an origin of Ranchi?
<|assistant|>
SELECT "frequency_inbound_outbound" FROM "rail" WHERE "origin"='ranchi';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rail" (
"train_number" text,
"train_name" text,
"origin" text,
"destination" text,
"frequency_inbound_outbound" text
);
Question: What is the frequency of the train named Garib nwaz exp?
<|assistant|>
SELECT "frequency_inbound_outbound" FROM "rail" WHERE "train_name"='garib nwaz exp';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_14_2009_2010" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
Question: Name the segment c with episode less than 179 and segment b of s sticker
<|assistant|>
SELECT "segment_c" FROM "season_14_2009_2010" WHERE "episode"<179 AND "segment_b"='s sticker';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_14_2009_2010" (
"series_ep" text,
"episode" real,
"netflix" text,
"segment_a" text,
"segment_b" text,
"segment_c" text,
"segment_d" text
);
Question: Name the segment c for ski goggles
<|assistant|>
SELECT "segment_c" FROM "season_14_2009_2010" WHERE "segment_a"='ski goggles';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_roster" (
"surname" text,
"first" text,
"d_o_b" text,
"bats" text,
"throws" text,
"position" text
);
Question: In which position did Steve play first?
<|assistant|>
SELECT "position" FROM "player_roster" WHERE "first"='steve';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_roster" (
"surname" text,
"first" text,
"d_o_b" text,
"bats" text,
"throws" text,
"position" text
);
Question: Which bats did mitchell play first?
<|assistant|>
SELECT "bats" FROM "player_roster" WHERE "first"='mitchell';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_roster" (
"surname" text,
"first" text,
"d_o_b" text,
"bats" text,
"throws" text,
"position" text
);
Question: When is mr. ryan's DOB?
<|assistant|>
SELECT "d_o_b" FROM "player_roster" WHERE "surname"='ryan';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_roster" (
"surname" text,
"first" text,
"d_o_b" text,
"bats" text,
"throws" text,
"position" text
);
Question: Which Throws have a Position of 3b/rhp?
<|assistant|>
SELECT "throws" FROM "player_roster" WHERE "position"='3b/rhp';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_roster" (
"surname" text,
"first" text,
"d_o_b" text,
"bats" text,
"throws" text,
"position" text
);
Question: When is Collins' DOB?
<|assistant|>
SELECT "d_o_b" FROM "player_roster" WHERE "surname"='collins';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_roster" (
"surname" text,
"first" text,
"d_o_b" text,
"bats" text,
"throws" text,
"position" text
);
Question: Which Position has a D.O.B. of 3 june 1989?
<|assistant|>
SELECT "position" FROM "player_roster" WHERE "d_o_b"='3 june 1989';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_competitions" (
"years" text,
"competition" text,
"vehicle_name" text,
"original_vehicle" text,
"architecture" text
);
Question: What type of architecture does the Saturn Vue have?
<|assistant|>
SELECT "architecture" FROM "past_competitions" WHERE "vehicle_name"='saturn vue';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_competitions" (
"years" text,
"competition" text,
"vehicle_name" text,
"original_vehicle" text,
"architecture" text
);
Question: What architecture type does the Ford Escort Wagon have?
<|assistant|>
SELECT "architecture" FROM "past_competitions" WHERE "original_vehicle"='ford escort wagon';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_competitions" (
"years" text,
"competition" text,
"vehicle_name" text,
"original_vehicle" text,
"architecture" text
);
Question: What original vehicle has uwhvt homepage architecture?
<|assistant|>
SELECT "original_vehicle" FROM "past_competitions" WHERE "architecture"='uwhvt homepage';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "prize_money" (
"year" text,
"winner" text,
"runner_up" text,
"semi_finalists" text,
"quarter_finalists" text,
"last_16" text,
"last_32" text,
"last_64" text,
"total" text
);
Question: Which Winner has a Last 16 of £400?
<|assistant|>
SELECT "winner" FROM "prize_money" WHERE "last_16"='£400';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "prize_money" (
"year" text,
"winner" text,
"runner_up" text,
"semi_finalists" text,
"quarter_finalists" text,
"last_16" text,
"last_32" text,
"last_64" text,
"total" text
);
Question: Which Runner-Up has a Total of £31,200?
<|assistant|>
SELECT "runner_up" FROM "prize_money" WHERE "total"='£31,200';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "prize_money" (
"year" text,
"winner" text,
"runner_up" text,
"semi_finalists" text,
"quarter_finalists" text,
"last_16" text,
"last_32" text,
"last_64" text,
"total" text
);
Question: Which Runner-Up has a Last 16 of £300?
<|assistant|>
SELECT "runner_up" FROM "prize_money" WHERE "last_16"='£300';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "prize_money" (
"year" text,
"winner" text,
"runner_up" text,
"semi_finalists" text,
"quarter_finalists" text,
"last_16" text,
"last_32" text,
"last_64" text,
"total" text
);
Question: Which Last 64 has a Total of £34,600?
<|assistant|>
SELECT "last_64" FROM "prize_money" WHERE "total"='£34,600';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "prize_money" (
"year" text,
"winner" text,
"runner_up" text,
"semi_finalists" text,
"quarter_finalists" text,
"last_16" text,
"last_32" text,
"last_64" text,
"total" text
);
Question: Which Winner has Semi-Finalists of £2,000?
<|assistant|>
SELECT "winner" FROM "prize_money" WHERE "semi_finalists"='£2,000';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "prize_money" (
"year" text,
"winner" text,
"runner_up" text,
"semi_finalists" text,
"quarter_finalists" text,
"last_16" text,
"last_32" text,
"last_64" text,
"total" text
);
Question: Which Year has a Quarter-Finalists of £1,000, and Semi-Finalists of £1,500?
<|assistant|>
SELECT "year" FROM "prize_money" WHERE "quarter_finalists"='£1,000' AND "semi_finalists"='£1,500';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "athletes" (
"nationality" text,
"height" text,
"name" text,
"sport" text,
"lifespan" text
);
Question: How tall is Dylan Postl?
<|assistant|>
SELECT "height" FROM "athletes" WHERE "name"='dylan postl';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_squad" (
"squad_no" real,
"player" text,
"position" text,
"tries" real,
"goals" real,
"points" real
);
Question: What is the largest amount of goals when the points are less than 0?
<|assistant|>
SELECT MAX("goals") FROM "2008_squad" WHERE "points"<0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_squad" (
"squad_no" real,
"player" text,
"position" text,
"tries" real,
"goals" real,
"points" real
);
Question: Which player has more than 0 goals and less than 12 tries?
<|assistant|>
SELECT "player" FROM "2008_squad" WHERE "goals">0 AND "tries"<12;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_squad" (
"squad_no" real,
"player" text,
"position" text,
"tries" real,
"goals" real,
"points" real
);
Question: What is the smallest number of tries when Matt Diskin is the player and there are more than 16 points?
<|assistant|>
SELECT MIN("tries") FROM "2008_squad" WHERE "player"='matt diskin' AND "points">16;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_squad" (
"squad_no" real,
"player" text,
"position" text,
"tries" real,
"goals" real,
"points" real
);
Question: Which position has more than 4 points, less than 12 tries, a squad number of more than 1, and where Ali Lauitiiti is a player?
<|assistant|>
SELECT "position" FROM "2008_squad" WHERE "points">4 AND "tries"<12 AND "squad_no">1 AND "player"='ali lauitiiti';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2008_squad" (
"squad_no" real,
"player" text,
"position" text,
"tries" real,
"goals" real,
"points" real
);
Question: What is the total number of squad no when there are more than 8 points, Danny Mcguire is a player, and there are more than 0 goals?
<|assistant|>
SELECT SUM("squad_no") FROM "2008_squad" WHERE "points">8 AND "player"='danny mcguire' AND "goals">0;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championship_group_b_yugoslavia" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
Question: What is the lowest lost from drawn of 1 or greater?
<|assistant|>
SELECT MIN("lost") FROM "world_championship_group_b_yugoslavia" WHERE "drawn">1;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championship_group_b_yugoslavia" (
"games" real,
"drawn" real,
"lost" real,
"points_difference" text,
"points" real
);
Question: What is the highest games from a game with points less than 4, drawn of 1 and a lost less than 6?
<|assistant|>
SELECT MAX("games") FROM "world_championship_group_b_yugoslavia" WHERE "points"<4 AND "drawn"=1 AND "lost"<6;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: What is the score of the game on January 18?
<|assistant|>
SELECT "score" FROM "regular_season" WHERE "date"='january 18';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: What is the score of the game on January 10?
<|assistant|>
SELECT "score" FROM "regular_season" WHERE "date"='january 10';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
Question: What is the score of the game on November 12 with the Chicago Black Hawks as the visitor team?
<|assistant|>
SELECT "score" FROM "regular_season" WHERE "visitor"='chicago black hawks' AND "date"='november 12';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" real,
"date" text,
"team" text,
"score" text,
"high_rebounds" text,
"high_assists" text,
"location_attendance" text,
"series" text
);
Question: What is the series score of the game on May 6?
<|assistant|>
SELECT "series" FROM "game_log" WHERE "date"='may 6';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_boats" (
"ship" text,
"builder" text,
"laid_down" text,
"launched" text,
"commissioned" text
);
Question: The Zeehond was built by whom?
<|assistant|>
SELECT "builder" FROM "the_boats" WHERE "ship"='zeehond';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nhl_entry_draft" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team" text
);
Question: What college, junior, or club team did Victor Ignatjev play for?
<|assistant|>
SELECT "college_junior_club_team" FROM "nhl_entry_draft" WHERE "player"='victor ignatjev';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nhl_entry_draft" (
"round" real,
"player" text,
"position" text,
"nationality" text,
"college_junior_club_team" text
);
Question: Which player is from Sweden?
<|assistant|>
SELECT "player" FROM "nhl_entry_draft" WHERE "nationality"='sweden';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"attendance" real,
"record" text
);
Question: What was the score on April 22?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "date"='april 22';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"attendance" real,
"record" text
);
Question: What opponent has a score of 1-3?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "score"='1-3';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"attendance" real,
"record" text
);
Question: What is the record for April 21?
<|assistant|>
SELECT "record" FROM "game_log" WHERE "date"='april 21';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "nfl_draft" (
"round" real,
"pick" real,
"player" text,
"position" text,
"school_club_team" text
);
Question: Which Player has a Round larger than 5, and a School/Club Team of bethune-cookman?
<|assistant|>
SELECT "player" FROM "nfl_draft" WHERE "round">5 AND "school_club_team"='bethune-cookman';<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.