text stringlengths 310 1.28k |
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "critical_temperature_t_c_crystal_structu" (
"formula" text,
"notation" text,
"t_c_k" real,
"no_of_cu_o_planes_in_unit_cell" real,
"crystal_structure" text
);
Question: Which crystal structures has a Tc(K) of 110 and the number of Cu-O planes in the unit cell is 3?
<|assistant|>
SELECT "crystal_structure" FROM "critical_temperature_t_c_crystal_structu" WHERE "no_of_cu_o_planes_in_unit_cell"=3 AND "t_c_k"=110;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Name the gold with total larger than 33
<|assistant|>
SELECT "gold" FROM "medal_table" WHERE "total">33;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Name the fewest gold for tanzania with bronze less than 0
<|assistant|>
SELECT MIN("gold") FROM "medal_table" WHERE "nation"='tanzania' AND "bronze"<0;<|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,
"result" text,
"attendance" real
);
Question: Who is the opponent for week 10?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "week"=10;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: For countries that won more than 32 gold medals, what was the highest number of golds?
<|assistant|>
SELECT MAX("gold") FROM "medal_table" WHERE "total">32;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "australasian_championships" (
"year" real,
"host" text,
"winners" text,
"runners_up" text,
"third_place" text,
"fourth_place" text
);
Question: Tell me fourth place for year of 2010
<|assistant|>
SELECT "fourth_place" FROM "australasian_championships" WHERE "year"=2010;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"score" text,
"result" text,
"competition" text
);
Question: Tell me the result for 2010 fifa world cup qualification
<|assistant|>
SELECT "result" FROM "international_goals" WHERE "competition"='2010 fifa world cup qualification';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"score" text,
"result" text,
"competition" text
);
Question: Tell me the date for 2010 fifa world cup qualification
<|assistant|>
SELECT "date" FROM "international_goals" WHERE "competition"='2010 fifa world cup qualification';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_8_1" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
Question: Tell me the surface for november 28, 2010
<|assistant|>
SELECT "surface" FROM "singles_8_1" WHERE "date"='november 28, 2010';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_8_1" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
Question: Tell me the tournament with a hard surface for 6–1, 6–2
<|assistant|>
SELECT "tournament" FROM "singles_8_1" WHERE "surface"='hard' AND "score"='6–1, 6–2';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_8_1" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
Question: Tell me the date for 6–3, 6–2
<|assistant|>
SELECT "date" FROM "singles_8_1" WHERE "score"='6–3, 6–2';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_8_1" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
Question: Tell me the date for johanna konta
<|assistant|>
SELECT "date" FROM "singles_8_1" WHERE "opponent_in_the_final"='johanna konta';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1970_isle_of_man_production_500_cc_tt_fi" (
"rank" real,
"rider" text,
"team" text,
"speed" text,
"time" text
);
Question: What is the time value for the rider Brian Finch and a rank greater than 3?
<|assistant|>
SELECT "time" FROM "1970_isle_of_man_production_500_cc_tt_fi" WHERE "rank">3 AND "rider"='brian finch';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "prizes_and_awards" (
"year" real,
"director" text,
"project" text,
"category" text,
"result" text
);
Question: What result does the project Once Upon A Time In The West, directed by Sergio Leone have?
<|assistant|>
SELECT "result" FROM "prizes_and_awards" WHERE "director"='sergio leone' AND "project"='once upon a time in the west';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "prizes_and_awards" (
"year" real,
"director" text,
"project" text,
"category" text,
"result" text
);
Question: What year was Bulworth nominated?
<|assistant|>
SELECT "year" FROM "prizes_and_awards" WHERE "project"='bulworth';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "prizes_and_awards" (
"year" real,
"director" text,
"project" text,
"category" text,
"result" text
);
Question: What is the average Year for the project The Untouchables?
<|assistant|>
SELECT AVG("year") FROM "prizes_and_awards" WHERE "project"='the untouchables';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_to_season" (
"season" text,
"level" text,
"division" text,
"section" text,
"position" text
);
Question: Tell me the section for position of 8th and season of 2003
<|assistant|>
SELECT "section" FROM "season_to_season" WHERE "position"='8th' AND "season"='2003';<|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,
"result" text,
"attendance" text
);
Question: What is the date of week 17?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "week"=17;<|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,
"result" text,
"attendance" text
);
Question: What was the latest week that the Tampa Bay Buccaneers were an opponent?
<|assistant|>
SELECT MAX("week") FROM "schedule" WHERE "opponent"='tampa bay buccaneers';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "points" (
"points" real,
"name" text,
"club" text,
"tries" real,
"drop" real
);
Question: Name the fewest tries for leicester tigers with points less than 207
<|assistant|>
SELECT MIN("tries") FROM "points" WHERE "club"='leicester tigers' AND "points"<207;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_07_york_city_f_c_season" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
Question: Name the date of st albans city for result of drew 0-0
<|assistant|>
SELECT "date" FROM "2006_07_york_city_f_c_season" WHERE "opponent"='st albans city' AND "result"='drew 0-0';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_07_york_city_f_c_season" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
Question: Name the venue for 15 august 2006
<|assistant|>
SELECT "venue" FROM "2006_07_york_city_f_c_season" WHERE "date"='15 august 2006';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_07_york_city_f_c_season" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
Question: Name the most attendance for tamworth with home venue
<|assistant|>
SELECT MAX("attendance") FROM "2006_07_york_city_f_c_season" WHERE "opponent"='tamworth' AND "venue"='home';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2006_07_york_city_f_c_season" (
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" real
);
Question: Name the least attendance for 10 october 2006
<|assistant|>
SELECT MIN("attendance") FROM "2006_07_york_city_f_c_season" WHERE "date"='10 october 2006';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: I want the average bronze for total of 19 and silver of 8 with rank of 31
<|assistant|>
SELECT AVG("bronze") FROM "medal_table" WHERE "total"=19 AND "silver"=8 AND "rank"='31';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Tell me the average bronze for rank of 43 and total less than 11
<|assistant|>
SELECT AVG("bronze") FROM "medal_table" WHERE "rank"='43' AND "total"<11;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "affiliates" (
"calls" text,
"frequency" text,
"branding" text,
"format" text,
"timeslot" text,
"group_owner" text
);
Question: Say the frequency of 1290 khz
<|assistant|>
SELECT "format" FROM "affiliates" WHERE "frequency"='1290 khz';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "affiliates" (
"calls" text,
"frequency" text,
"branding" text,
"format" text,
"timeslot" text,
"group_owner" text
);
Question: Tell me the timeslot of calls of wrko
<|assistant|>
SELECT "timeslot" FROM "affiliates" WHERE "calls"='wrko';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "affiliates" (
"calls" text,
"frequency" text,
"branding" text,
"format" text,
"timeslot" text,
"group_owner" text
);
Question: Tell me the format for calls of wrko
<|assistant|>
SELECT "format" FROM "affiliates" WHERE "calls"='wrko';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "affiliates" (
"calls" text,
"frequency" text,
"branding" text,
"format" text,
"timeslot" text,
"group_owner" text
);
Question: Tell me the calls for frequency of 1290 khz
<|assistant|>
SELECT "calls" FROM "affiliates" WHERE "frequency"='1290 khz';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "affiliates" (
"calls" text,
"frequency" text,
"branding" text,
"format" text,
"timeslot" text,
"group_owner" text
);
Question: Tell me the branding for frequency of 680 khz
<|assistant|>
SELECT "branding" FROM "affiliates" WHERE "frequency"='680 khz';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "affiliates" (
"calls" text,
"frequency" text,
"branding" text,
"format" text,
"timeslot" text,
"group_owner" text
);
Question: Tell me the timeslot for calls of whyn
<|assistant|>
SELECT "timeslot" FROM "affiliates" WHERE "calls"='whyn';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat_rank" real,
"lane" real,
"swimmer" text,
"country" text,
"time" real,
"overall_rank" text
);
Question: For how long did Bolivia have a lane greater than 6?
<|assistant|>
SELECT COUNT("time") FROM "heats" WHERE "country"='bolivia' AND "lane">6;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat_rank" real,
"lane" real,
"swimmer" text,
"country" text,
"time" real,
"overall_rank" text
);
Question: In heat rank 7, what is the sum of lanes?
<|assistant|>
SELECT SUM("lane") FROM "heats" WHERE "heat_rank"=7;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat_rank" real,
"lane" real,
"swimmer" text,
"country" text,
"time" real,
"overall_rank" text
);
Question: Which country is ranked 56 overall and has a heat rank smaller than 8?
<|assistant|>
SELECT "country" FROM "heats" WHERE "heat_rank"<8 AND "overall_rank"='56';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat_rank" real,
"lane" real,
"swimmer" text,
"country" text,
"time" real,
"overall_rank" text
);
Question: What is the greatest lane with an overall rank of 79 and a time larger than 26.1?
<|assistant|>
SELECT MAX("lane") FROM "heats" WHERE "overall_rank"='79' AND "time">26.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,
"result" text,
"venue" text,
"attendance" real
);
Question: Tell me the highest week for metropolitan stadium for attendance more than 47,644
<|assistant|>
SELECT MAX("week") FROM "schedule" WHERE "venue"='metropolitan stadium' AND "attendance">'47,644';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "coaches" (
"manager" text,
"period" text,
"played" real,
"drawn" real,
"lost" real,
"win_pct" text
);
Question: Name the sum of played for serik berdalin and drawn more than 4
<|assistant|>
SELECT SUM("played") FROM "coaches" WHERE "manager"='serik berdalin' AND "drawn">4;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"party" text,
"pr_seats" real,
"district_seats" real,
"total_elected_2001" text,
"total_seats" real
);
Question: Who had the highest total PR seats of 48 with a District seat larger than than 73?
<|assistant|>
SELECT MAX("total_seats") FROM "results" WHERE "pr_seats"=48 AND "district_seats">73;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "since_1945" (
"candidate" text,
"party" text,
"constituency" text,
"year" text,
"days" text
);
Question: In 1955 which party did Thomas Mitchell belong to?
<|assistant|>
SELECT "party" FROM "since_1945" WHERE "year"='1955' AND "candidate"='thomas mitchell';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "since_1945" (
"candidate" text,
"party" text,
"constituency" text,
"year" text,
"days" text
);
Question: What are the number of days did the ulster unionist Party have the constituate fermanagh and south tyrone?
<|assistant|>
SELECT "days" FROM "since_1945" WHERE "party"='ulster unionist' AND "constituency"='fermanagh and south tyrone';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "since_1945" (
"candidate" text,
"party" text,
"constituency" text,
"year" text,
"days" text
);
Question: What are the number of days in 1945 where the constituent was heywood and radcliffe?
<|assistant|>
SELECT "days" FROM "since_1945" WHERE "year"='1945' AND "constituency"='heywood and radcliffe';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "since_1945" (
"candidate" text,
"party" text,
"constituency" text,
"year" text,
"days" text
);
Question: What year was Hazel Grove the constituent for the liberal party?
<|assistant|>
SELECT "year" FROM "since_1945" WHERE "party"='liberal' AND "constituency"='hazel grove';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
Question: Tell me the average Laps for grid larger than 12 and bikes of ducati 999rs for dean ellison
<|assistant|>
SELECT AVG("laps") FROM "superbike_race_2_classification" WHERE "grid">12 AND "bike"='ducati 999rs' AND "rider"='dean ellison';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
Question: Tell me the highest Laps for grid less than 22 and riderS of ruben xaus
<|assistant|>
SELECT MAX("laps") FROM "superbike_race_2_classification" WHERE "grid"<22 AND "rider"='ruben xaus';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
Question: Tell me the total number of grid for rider of james toseland
<|assistant|>
SELECT COUNT("grid") FROM "superbike_race_2_classification" WHERE "rider"='james toseland';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "superbike_race_2_classification" (
"rider" text,
"bike" text,
"laps" real,
"time" text,
"grid" real
);
Question: Tell me the least Laps for grid larger than 2 with 35:26.734
<|assistant|>
SELECT MIN("laps") FROM "superbike_race_2_classification" WHERE "time"='35:26.734' AND "grid">2;<|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,
"result" text,
"attendance" text
);
Question: Tell me the date with week of 13
<|assistant|>
SELECT "date" FROM "schedule" WHERE "week"=13;<|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,
"result" text,
"attendance" text
);
Question: Tell me the average week for attendance of 48,113
<|assistant|>
SELECT AVG("week") FROM "schedule" WHERE "attendance"='48,113';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "albums" (
"year" real,
"album" text,
"song" text,
"label" text,
"catalognum" text,
"format" text,
"country" text
);
Question: Which Album had a year less than 2005 with a Label by Ministry of Sound?
<|assistant|>
SELECT "album" FROM "albums" WHERE "year"<2005 AND "label"='ministry of sound';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "albums" (
"year" real,
"album" text,
"song" text,
"label" text,
"catalognum" text,
"format" text,
"country" text
);
Question: Which Album had a bigger year than 2005 and whose country was Australia?
<|assistant|>
SELECT "album" FROM "albums" WHERE "year">2005 AND "country"='australia';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "albums" (
"year" real,
"album" text,
"song" text,
"label" text,
"catalognum" text,
"format" text,
"country" text
);
Question: Which song had Central Station as a label and whose album was Various - Wild Nights 4?
<|assistant|>
SELECT "song" FROM "albums" WHERE "label"='central station' AND "album"='various - wild nights 4';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "in_a_match" (
"sixes" text,
"player" text,
"opponent" text,
"venue" text,
"date" text
);
Question: Where did Zimbabwe play?
<|assistant|>
SELECT "venue" FROM "in_a_match" WHERE "opponent"='zimbabwe';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "in_a_match" (
"sixes" text,
"player" text,
"opponent" text,
"venue" text,
"date" text
);
Question: What is the date when Canada played?
<|assistant|>
SELECT "date" FROM "in_a_match" WHERE "opponent"='canada';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Tell me the lowest silver for rank of 9 and bronze less than 2
<|assistant|>
SELECT MIN("silver") FROM "medal_table" WHERE "rank"=9 AND "bronze"<2;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "non_championship_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
Question: Name the report for raymond sommer
<|assistant|>
SELECT "report" FROM "non_championship_grands_prix" WHERE "winning_driver"='raymond sommer';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "non_championship_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
Question: Name the winning driver for monaco grand prix
<|assistant|>
SELECT "winning_driver" FROM "non_championship_grands_prix" WHERE "name"='monaco grand prix';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "non_championship_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
Question: Name the circuit for marcel lehoux
<|assistant|>
SELECT "circuit" FROM "non_championship_grands_prix" WHERE "winning_driver"='marcel lehoux';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "non_championship_grands_prix" (
"name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"winning_constructor" text,
"report" text
);
Question: Name the report for per-viktor widengren and alfa romeo
<|assistant|>
SELECT "report" FROM "non_championship_grands_prix" WHERE "winning_driver"='per-viktor widengren' AND "winning_constructor"='alfa romeo';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1925_1929" (
"year" real,
"competition" text,
"date" text,
"location" text,
"score" text,
"result" text
);
Question: Tell me the date for warsaw 1929
<|assistant|>
SELECT "date" FROM "1925_1929" WHERE "location"='warsaw' AND "year"=1929;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1925_1929" (
"year" real,
"competition" text,
"date" text,
"location" text,
"score" text,
"result" text
);
Question: Tell me the result for warsaw 1929
<|assistant|>
SELECT "result" FROM "1925_1929" WHERE "location"='warsaw' AND "year"=1929;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1925_1929" (
"year" real,
"competition" text,
"date" text,
"location" text,
"score" text,
"result" text
);
Question: Tell me the result for harrogate
<|assistant|>
SELECT "result" FROM "1925_1929" WHERE "location"='harrogate';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "honorifics" (
"stem_meaning" text,
"2nd_person_sg" text,
"2nd_person_sg_honorific" text,
"3rd_person_sg" text,
"3rd_person_sg_honorific" text
);
Question: Tell me the Stem Meaning of ical
<|assistant|>
SELECT "stem_meaning" FROM "honorifics" WHERE "3rd_person_sg"='ical';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "honorifics" (
"stem_meaning" text,
"2nd_person_sg" text,
"2nd_person_sg_honorific" text,
"3rd_person_sg" text,
"3rd_person_sg_honorific" text
);
Question: Tell me the 3rd person sg for tiecal, tiecaltzi
<|assistant|>
SELECT "3rd_person_sg" FROM "honorifics" WHERE "3rd_person_sg_honorific"='tiecal, tiecaltzi';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat_rank" real,
"lane" real,
"swimmer" text,
"country" text,
"time" real,
"overall_rank" text
);
Question: Tell me the overall rank for roland schoeman
<|assistant|>
SELECT "overall_rank" FROM "heats" WHERE "swimmer"='roland schoeman';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many Silver medals did nation who is ranked greater than 1 and has 4 Gold medals have?
<|assistant|>
SELECT SUM("silver") FROM "medal_table" WHERE "rank">1 AND "gold"=4;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Which nation has more than 6 Silver medals and fewer than 8 Gold medals?
<|assistant|>
SELECT AVG("total") FROM "medal_table" WHERE "silver">6 AND "gold"<8;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the rank of the Nation that has fewer than 24 total medals are more than 7 Gold medals?
<|assistant|>
SELECT AVG("rank") FROM "medal_table" WHERE "total"<24 AND "gold">7;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the rank of the nation that has more than 1 Bronze medals and fewer than 4 Gold medals?
<|assistant|>
SELECT MIN("rank") FROM "medal_table" WHERE "bronze">1 AND "gold"<4;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many silver medals does Belarus (blr) along with 4 gold and 4 bronze?
<|assistant|>
SELECT SUM("silver") FROM "medal_table" WHERE "gold"=4 AND "nation"='belarus (blr)' AND "bronze">4;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What rank is Belarus (BLR), which earned 15 medals total?
<|assistant|>
SELECT MAX("rank") FROM "medal_table" WHERE "nation"='belarus (blr)' AND "total"<15;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grandes_preuves" (
"name" text,
"circuit" text,
"date" text,
"winning_drivers" text,
"winning_constructor" text,
"report" text
);
Question: What was the name of the race on 24 September?
<|assistant|>
SELECT "name" FROM "grandes_preuves" WHERE "date"='24 september';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grandes_preuves" (
"name" text,
"circuit" text,
"date" text,
"winning_drivers" text,
"winning_constructor" text,
"report" text
);
Question: What is the name of the race on 9 July?
<|assistant|>
SELECT "name" FROM "grandes_preuves" WHERE "date"='9 july';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grandes_preuves" (
"name" text,
"circuit" text,
"date" text,
"winning_drivers" text,
"winning_constructor" text,
"report" text
);
Question: What was the race that was won by a Maserati being driven by Giuseppe Campari?
<|assistant|>
SELECT "circuit" FROM "grandes_preuves" WHERE "winning_constructor"='maserati' AND "winning_drivers"='giuseppe campari';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grandes_preuves" (
"name" text,
"circuit" text,
"date" text,
"winning_drivers" text,
"winning_constructor" text,
"report" text
);
Question: What date was the race won by Louis Chiron?
<|assistant|>
SELECT "date" FROM "grandes_preuves" WHERE "winning_drivers"='louis chiron';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grandes_preuves" (
"name" text,
"circuit" text,
"date" text,
"winning_drivers" text,
"winning_constructor" text,
"report" text
);
Question: What brand of vehicle won a race driven by Tazio Nuvolari?
<|assistant|>
SELECT "winning_constructor" FROM "grandes_preuves" WHERE "winning_drivers"='tazio nuvolari';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grandes_preuves" (
"name" text,
"circuit" text,
"date" text,
"winning_drivers" text,
"winning_constructor" text,
"report" text
);
Question: What race was won by Tazio Nuvolari?
<|assistant|>
SELECT "name" FROM "grandes_preuves" WHERE "winning_drivers"='tazio nuvolari';<|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,
"result" text,
"attendance" real
);
Question: Tell me the result for week less than 4 and september 7, 1986
<|assistant|>
SELECT "result" FROM "schedule" WHERE "week"<4 AND "date"='september 7, 1986';<|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,
"result" text,
"attendance" real
);
Question: Tell me the result for week of 3
<|assistant|>
SELECT "result" FROM "schedule" WHERE "week"=3;<|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,
"result" text,
"attendance" real
);
Question: Tell me the lowest week for attedance less thaan 32,738
<|assistant|>
SELECT MIN("week") FROM "schedule" WHERE "attendance"<'32,738';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ships_served_in_by_richard_bolitho" (
"ship" text,
"guns" text,
"class" text,
"captain" text,
"rank" text,
"year" text
);
Question: Tell me the ship for lieutenant montagu verling
<|assistant|>
SELECT "ship" FROM "ships_served_in_by_richard_bolitho" WHERE "captain"='lieutenant montagu verling';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ships_served_in_by_richard_bolitho" (
"ship" text,
"guns" text,
"class" text,
"captain" text,
"rank" text,
"year" text
);
Question: Tell me the class for admiral and hms frobisher
<|assistant|>
SELECT "class" FROM "ships_served_in_by_richard_bolitho" WHERE "rank"='admiral' AND "ship"='hms frobisher';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ships_served_in_by_richard_bolitho" (
"ship" text,
"guns" text,
"class" text,
"captain" text,
"rank" text,
"year" text
);
Question: Tell me the guns for third-rate ship of the line and rank of vice-admiral with year of 1802
<|assistant|>
SELECT "guns" FROM "ships_served_in_by_richard_bolitho" WHERE "class"='third-rate ship of the line' AND "rank"='vice-admiral' AND "year"='1802';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ships_served_in_by_richard_bolitho" (
"ship" text,
"guns" text,
"class" text,
"captain" text,
"rank" text,
"year" text
);
Question: Tell me the captain for 1774 and guns of 14
<|assistant|>
SELECT "captain" FROM "ships_served_in_by_richard_bolitho" WHERE "year"='1774' AND "guns"='14';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "ships_served_in_by_richard_bolitho" (
"ship" text,
"guns" text,
"class" text,
"captain" text,
"rank" text,
"year" text
);
Question: Tell me the captain for guns of 28
<|assistant|>
SELECT "captain" FROM "ships_served_in_by_richard_bolitho" WHERE "guns"='28';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "star_struck_standing" (
"week_num" real,
"finalists" text,
"status" text,
"eliminated" text,
"date" text
);
Question: Tell me the status of eliminated of anton dela paz
<|assistant|>
SELECT "status" FROM "star_struck_standing" WHERE "eliminated"='anton dela paz';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "star_struck_standing" (
"week_num" real,
"finalists" text,
"status" text,
"eliminated" text,
"date" text
);
Question: Tell me the finalists for week # less than 2
<|assistant|>
SELECT "finalists" FROM "star_struck_standing" WHERE "week_num"<2;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "star_struck_standing" (
"week_num" real,
"finalists" text,
"status" text,
"eliminated" text,
"date" text
);
Question: Tell me the eliminated for week # larger than 4
<|assistant|>
SELECT "eliminated" FROM "star_struck_standing" WHERE "week_num">4;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: At the UFC 78, what is the average round when the time is 5:00?
<|assistant|>
SELECT AVG("round") FROM "mixed_martial_arts_record" WHERE "time"='5:00' AND "event"='ufc 78';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: When there was a draw, what was the time?
<|assistant|>
SELECT "time" FROM "mixed_martial_arts_record" WHERE "res"='draw';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "gp2_series" (
"year" real,
"drivers" text,
"races" real,
"wins" real,
"poles" real,
"f_l" real,
"points" real,
"d_c" text,
"t_c" text
);
Question: What is the sum of points in 2010 when the driver had more than 14 races and an F.L. of less than 0?
<|assistant|>
SELECT SUM("points") FROM "gp2_series" WHERE "year"=2010 AND "races">14 AND "f_l"<0;<|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,
"result" text,
"attendance" real
);
Question: What day was the game that had an attendance of more than 46,551 people and had a week number of less than 4?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "attendance">'46,551' AND "week"<4;<|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,
"result" text,
"attendance" real
);
Question: What was the outcome of the game that had a week number of less than 2?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "week"<2;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"rank" real,
"heat_lane" text,
"name" text,
"nationality" text,
"time" text
);
Question: What heat and what lane is thi hue pham in?
<|assistant|>
SELECT "heat_lane" FROM "heats" WHERE "name"='thi hue pham';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"rank" real,
"heat_lane" text,
"name" text,
"nationality" text,
"time" text
);
Question: What Heat & Lane is the person who has a time of 1:01.12?
<|assistant|>
SELECT "heat_lane" FROM "heats" WHERE "time"='1:01.12';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
Question: How many laps did Fernando Alonso do?
<|assistant|>
SELECT "laps" FROM "race" WHERE "driver"='fernando alonso';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
Question: What was Jenson Button's constructor?
<|assistant|>
SELECT "constructor" FROM "race" WHERE "driver"='jenson button';<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "supported_microcontrollers_according_to_" (
"chip" text,
"flash_size" text,
"eeprom" real,
"sram" real,
"frequency_m_hz" real,
"package" text
);
Question: Tell me the package for EEPROM less than 128
<|assistant|>
SELECT "package" FROM "supported_microcontrollers_according_to_" WHERE "eeprom"<128;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "supported_microcontrollers_according_to_" (
"chip" text,
"flash_size" text,
"eeprom" real,
"sram" real,
"frequency_m_hz" real,
"package" text
);
Question: Tell me the chip with frequency larger than 10
<|assistant|>
SELECT "chip" FROM "supported_microcontrollers_according_to_" WHERE "frequency_m_hz">10;<|endoftext|> |
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"constructor" text,
"laps" real,
"time_retired" text,
"grid" real
);
Question: I want the highest Grid for Toyota and jarno trulli
<|assistant|>
SELECT MAX("grid") FROM "race" WHERE "constructor"='toyota' AND "driver"='jarno trulli';<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.