text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "match_up_summary" (
"district" real,
"incumbent" text,
"2008_status" text,
"democratic" text,
"republican" text,
"green" text
);
Question: What's the 2008 Status of Rosa Delauro?
<|assistant|>
SELECT "2008_status" FROM "match_up_summary" WHERE "democratic"='rosa delauro';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "match_up_summary" (
"district" real,
"incumbent" text,
"2008_status" text,
"democratic" text,
"republican" text,
"green" text
);
Question: Who was the incumbent when Bo Itshaky was the Republican?
<|assistant|>
SELECT "incumbent" FROM "match_up_summary" WHERE "republican"='bo itshaky';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "match_up_summary" (
"district" real,
"incumbent" text,
"2008_status" text,
"democratic" text,
"republican" text,
"green" text
);
Question: Who was the Republican in the district more than 4?
<|assistant|>
SELECT "republican" FROM "match_up_summary" WHERE "district">4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "match_up_summary" (
"district" real,
"incumbent" text,
"2008_status" text,
"democratic" text,
"republican" text,
"green" text
);
Question: Who was the Republican when the green was Harold Burbank?
<|assistant|>
SELECT "republican" FROM "match_up_summary" WHERE "green"='harold burbank';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "match_up_summary" (
"district" real,
"incumbent" text,
"2008_status" text,
"democratic" text,
"republican" text,
"green" text
);
Question: Who was the Democratic when then Incumbent was Christopher Shays?
<|assistant|>
SELECT "democratic" FROM "match_up_summary" WHERE "incumbent"='christopher shays';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"year" real,
"title" text,
"director" text,
"studio_s" text,
"notes" text
);
Question: Who is the director of Antz?
<|assistant|>
SELECT "director" FROM "1990s" WHERE "title"='antz';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"year" real,
"title" text,
"director" text,
"studio_s" text,
"notes" text
);
Question: What studio has the director Philip Frank Messina?
<|assistant|>
SELECT "studio_s" FROM "1990s" WHERE "director"='philip frank messina';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "calendar" (
"round" text,
"main_date" text,
"number_of_fixtures" real,
"clubs" text,
"new_entries_this_round" text
);
Question: What are the club number for the first round?
<|assistant|>
SELECT "clubs" FROM "calendar" WHERE "round"='first round';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "calendar" (
"round" text,
"main_date" text,
"number_of_fixtures" real,
"clubs" text,
"new_entries_this_round" text
);
Question: when there were 48 → 32 clubs?
<|assistant|>
SELECT "new_entries_this_round" FROM "calendar" WHERE "clubs"='48 → 32';<|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,
"round" real,
"time" text,
"location" text
);
Question: Where was the fight that took a time of 1:37?
<|assistant|>
SELECT "location" FROM "mixed_martial_arts_record" WHERE "time"='1:37';<|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,
"round" real,
"time" text,
"location" text
);
Question: What was the resolution of the fight against kiuma kunioku with a time of 15:00?
<|assistant|>
SELECT "res" FROM "mixed_martial_arts_record" WHERE "time"='15:00' AND "opponent"='kiuma kunioku';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the average number of bronze medals won by Poland?
<|assistant|>
SELECT AVG("bronze") FROM "medals_table" WHERE "nation"='poland';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the average number of gold medals Switzerland received when they ranked larger than 1st and received fewer than 10 bronze medals and more than 1 silver medal?
<|assistant|>
SELECT AVG("gold") FROM "medals_table" WHERE "total">1 AND "bronze"<10 AND "nation"='switzerland' AND "silver">1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_six_s_ultra_prominent_summit_of_the_" (
"rank" real,
"peak" text,
"country" text,
"island" text,
"elevation_m" real,
"col_m" real
);
Question: What is the rank when the col is larger than 0?
<|assistant|>
SELECT COUNT("rank") FROM "the_six_s_ultra_prominent_summit_of_the_" WHERE "col_m">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_six_s_ultra_prominent_summit_of_the_" (
"rank" real,
"peak" text,
"country" text,
"island" text,
"elevation_m" real,
"col_m" real
);
Question: What is the rank when the elevation is 1,628, and Col (m) is larger than 0?
<|assistant|>
SELECT COUNT("rank") FROM "the_six_s_ultra_prominent_summit_of_the_" WHERE "elevation_m"='1,628' AND "col_m">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_six_s_ultra_prominent_summit_of_the_" (
"rank" real,
"peak" text,
"country" text,
"island" text,
"elevation_m" real,
"col_m" real
);
Question: What is the elevation of Vanuatu, when the rank is smaller than 3?
<|assistant|>
SELECT AVG("elevation_m") FROM "the_six_s_ultra_prominent_summit_of_the_" WHERE "country"='vanuatu' AND "rank"<3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "best_selling_video_games_of_the_1990s_sa" (
"rank" real,
"title" text,
"release_date" text,
"franchise" text,
"developer_s" text,
"platform" text,
"units_sold_in_millions" real
);
Question: What's the platform of Super Mario All-Stars?
<|assistant|>
SELECT "platform" FROM "best_selling_video_games_of_the_1990s_sa" WHERE "title"='super mario all-stars';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1938_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the average number of losses when there are more than 4 wins, and the against matches is more than 1728?
<|assistant|>
SELECT AVG("losses") FROM "1938_ladder" WHERE "wins"<4 AND "against">1728;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1938_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the total number of draws when there is 1 Win, and less than 1728 against matches?
<|assistant|>
SELECT COUNT("draws") FROM "1938_ladder" WHERE "wins"=1 AND "against"<1728;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1938_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the highest number of wins when there are less than 2 losses?
<|assistant|>
SELECT MAX("wins") FROM "1938_ladder" WHERE "losses"<2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1938_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the highest number of losses for the Cobden club when there is less than 1 win?
<|assistant|>
SELECT MAX("losses") FROM "1938_ladder" WHERE "club"='cobden' AND "wins"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1938_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the average number of wins for the Terang Club, when there are less than 0 draws?
<|assistant|>
SELECT AVG("wins") FROM "1938_ladder" WHERE "club"='terang' AND "draws"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "national_softball_congress_1947_to_1957" (
"year" real,
"1st_place_team" text,
"2nd_place_team" text,
"3rd_place_team" text,
"4th_place_team" text,
"host_location" text
);
Question: What year was Clark-Smith Autos, Phoenix, AZ in 2nd place?
<|assistant|>
SELECT "year" FROM "national_softball_congress_1947_to_1957" WHERE "2nd_place_team"='clark-smith autos, phoenix, az';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "national_softball_congress_1947_to_1957" (
"year" real,
"1st_place_team" text,
"2nd_place_team" text,
"3rd_place_team" text,
"4th_place_team" text,
"host_location" text
);
Question: Who was the 2nd place team when the location was Tulsa, OK before 1956?
<|assistant|>
SELECT "2nd_place_team" FROM "national_softball_congress_1947_to_1957" WHERE "host_location"='tulsa, ok' AND "year"<1956;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "locations" (
"iteration" text,
"year" real,
"dates" text,
"location" text,
"theme" text
);
Question: In what Year is the Location of the Festival Koror, Palau?
<|assistant|>
SELECT SUM("year") FROM "locations" WHERE "location"='koror, palau';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "locations" (
"iteration" text,
"year" real,
"dates" text,
"location" text,
"theme" text
);
Question: What is the Location of the 10th Iteration?
<|assistant|>
SELECT "location" FROM "locations" WHERE "iteration"='10th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "locations" (
"iteration" text,
"year" real,
"dates" text,
"location" text,
"theme" text
);
Question: What is the Location of the "My Pacific" Theme?
<|assistant|>
SELECT "location" FROM "locations" WHERE "theme"='\"my pacific\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "all_councils" (
"party" text,
"county" real,
"city" real,
"borough" real,
"town" real,
"total" real
);
Question: How many counties have people before profit as the party, and a borough greater than 0?
<|assistant|>
SELECT SUM("county") FROM "all_councils" WHERE "party"='people before profit' AND "borough">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "all_councils" (
"party" text,
"county" real,
"city" real,
"borough" real,
"town" real,
"total" real
);
Question: How many counties have 2 as the total, 0 as the city with a town less than 1?
<|assistant|>
SELECT SUM("county") FROM "all_councils" WHERE "total"=2 AND "city"=0 AND "town"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "all_councils" (
"party" text,
"county" real,
"city" real,
"borough" real,
"town" real,
"total" real
);
Question: What average city has a total less than 2, with a borough greater than 0?
<|assistant|>
SELECT AVG("city") FROM "all_councils" WHERE "total"<2 AND "borough">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the rank # of the swimmer in Lane 5?
<|assistant|>
SELECT COUNT("rank") FROM "semifinal_1" WHERE "lane"=5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "comparative_properties_of_common_cooking" (
"total_fat" text,
"saturated_fat" text,
"monounsaturated_fat" text,
"polyunsaturated_fat" text,
"smoke_point" text
);
Question: What is the total fat with a smoke point of °c () and 37g of polyunsaturated fat?
<|assistant|>
SELECT "total_fat" FROM "comparative_properties_of_common_cooking" WHERE "smoke_point"='°c ()' AND "polyunsaturated_fat"='37g';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "comparative_properties_of_common_cooking" (
"total_fat" text,
"saturated_fat" text,
"monounsaturated_fat" text,
"polyunsaturated_fat" text,
"smoke_point" text
);
Question: What is the saturated fat with 28g of polyunsaturated fat?
<|assistant|>
SELECT "saturated_fat" FROM "comparative_properties_of_common_cooking" WHERE "polyunsaturated_fat"='28g';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "comparative_properties_of_common_cooking" (
"total_fat" text,
"saturated_fat" text,
"monounsaturated_fat" text,
"polyunsaturated_fat" text,
"smoke_point" text
);
Question: What is the monounsaturated fat with 15g of saturated fat?
<|assistant|>
SELECT "monounsaturated_fat" FROM "comparative_properties_of_common_cooking" WHERE "saturated_fat"='15g';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "comparative_properties_of_common_cooking" (
"total_fat" text,
"saturated_fat" text,
"monounsaturated_fat" text,
"polyunsaturated_fat" text,
"smoke_point" text
);
Question: What is the saturated fat with a total fat of 100g and 11g of polyunsaturated fat?
<|assistant|>
SELECT "saturated_fat" FROM "comparative_properties_of_common_cooking" WHERE "total_fat"='100g' AND "polyunsaturated_fat"='11g';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "comparative_properties_of_common_cooking" (
"total_fat" text,
"saturated_fat" text,
"monounsaturated_fat" text,
"polyunsaturated_fat" text,
"smoke_point" text
);
Question: What is the monounsaturated fat with a smoke point of °c (), a total fat of 100g, 11g of polyunsaturated fat, and 14g of saturated fat?
<|assistant|>
SELECT "monounsaturated_fat" FROM "comparative_properties_of_common_cooking" WHERE "smoke_point"='°c ()' AND "total_fat"='100g' AND "polyunsaturated_fat"='11g' AND "saturated_fat"='14g';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "comparative_properties_of_common_cooking" (
"total_fat" text,
"saturated_fat" text,
"monounsaturated_fat" text,
"polyunsaturated_fat" text,
"smoke_point" text
);
Question: What is the polyunsaturated fat with a smoke point of °c (), a total fat of 100g and 63g of monounsaturated fat?
<|assistant|>
SELECT "polyunsaturated_fat" FROM "comparative_properties_of_common_cooking" WHERE "smoke_point"='°c ()' AND "total_fat"='100g' AND "monounsaturated_fat"='63g';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_slam_timeline" (
"tournament" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"win_pct" text
);
Question: What is the win % of the 2003 atp world tour finals?
<|assistant|>
SELECT "win_pct" FROM "grand_slam_timeline" WHERE "2003"='atp world tour finals';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_slam_timeline" (
"tournament" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"win_pct" text
);
Question: What is the 2006 value of the 2011 grand slam tournaments?
<|assistant|>
SELECT "2006" FROM "grand_slam_timeline" WHERE "2011"='grand slam tournaments';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_slam_timeline" (
"tournament" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"win_pct" text
);
Question: What is the 2007 value with a 1r in 2009?
<|assistant|>
SELECT "2007" FROM "grand_slam_timeline" WHERE "2009"='1r';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "grand_slam_timeline" (
"tournament" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"win_pct" text
);
Question: What is the 2007 value with a 4r in 2006, a 1r in 2004, and a 4r in 2009?
<|assistant|>
SELECT "2007" FROM "grand_slam_timeline" WHERE "2006"='4r' AND "2004"='1r' AND "2009"='4r';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "year_by_year" (
"year" real,
"home_team" text,
"away_team" text,
"winner" text,
"score" text
);
Question: who is the home team when the away team is rivercity rage?
<|assistant|>
SELECT "home_team" FROM "year_by_year" WHERE "away_team"='rivercity rage';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "year_by_year" (
"year" real,
"home_team" text,
"away_team" text,
"winner" text,
"score" text
);
Question: who is the winner when the score is 71-62?
<|assistant|>
SELECT "winner" FROM "year_by_year" WHERE "score"='71-62';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "year_by_year" (
"year" real,
"home_team" text,
"away_team" text,
"winner" text,
"score" text
);
Question: who is the winner when the home team is sioux falls storm and the year is earlier than 2012?
<|assistant|>
SELECT "winner" FROM "year_by_year" WHERE "home_team"='sioux falls storm' AND "year"<2012;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "year_by_year" (
"year" real,
"home_team" text,
"away_team" text,
"winner" text,
"score" text
);
Question: what is the score when the away team is rivercity rage?
<|assistant|>
SELECT "score" FROM "year_by_year" WHERE "away_team"='rivercity rage';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "year_by_year" (
"year" real,
"home_team" text,
"away_team" text,
"winner" text,
"score" text
);
Question: what is the year when the score is 59-32?
<|assistant|>
SELECT SUM("year") FROM "year_by_year" WHERE "score"='59-32';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sport" (
"club" text,
"league" text,
"sport" text,
"venue" text,
"established" real,
"capacity" real
);
Question: What is the venue established after 1948?
<|assistant|>
SELECT "venue" FROM "sport" WHERE "established">1948;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sport" (
"club" text,
"league" text,
"sport" text,
"venue" text,
"established" real,
"capacity" real
);
Question: What is the league established before 1930 with the rayo vallecano club?
<|assistant|>
SELECT "league" FROM "sport" WHERE "established"<1930 AND "club"='rayo vallecano';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sport" (
"club" text,
"league" text,
"sport" text,
"venue" text,
"established" real,
"capacity" real
);
Question: What sport is the rayo vallecano club in?
<|assistant|>
SELECT "sport" FROM "sport" WHERE "club"='rayo vallecano';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sport" (
"club" text,
"league" text,
"sport" text,
"venue" text,
"established" real,
"capacity" real
);
Question: What sport is the cb estudiantes club in?
<|assistant|>
SELECT "sport" FROM "sport" WHERE "club"='cb estudiantes';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"country" text,
"date" text,
"label" text,
"format" text,
"catalogue_num" text
);
Question: What is the label for CAD 2014 CD?
<|assistant|>
SELECT "label" FROM "release_history" WHERE "catalogue_num"='cad 2014 cd';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"country" text,
"date" text,
"label" text,
"format" text,
"catalogue_num" text
);
Question: What is the format for the catalogue number GAD 2014 CD on July 6, 1998?
<|assistant|>
SELECT "format" FROM "release_history" WHERE "catalogue_num"='gad 2014 cd' AND "date"='july 6, 1998';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1940_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: How many wins are there when the draws are less than 0?
<|assistant|>
SELECT SUM("wins") FROM "1940_ladder" WHERE "draws"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1940_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What are the most losses when there are 5 wins and draws less than 0?
<|assistant|>
SELECT MAX("losses") FROM "1940_ladder" WHERE "wins"=5 AND "draws"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1940_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What are the most wins of Terang with the draws less than 0?
<|assistant|>
SELECT MAX("wins") FROM "1940_ladder" WHERE "club"='terang' AND "draws"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1940_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What is the lowest against when the draws are more than 0 and the losses are less than 3?
<|assistant|>
SELECT MIN("against") FROM "1940_ladder" WHERE "losses"<3 AND "draws">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1940_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What are the least losses of Warrnambool with more than 6 wins and less than 630 against?
<|assistant|>
SELECT MIN("losses") FROM "1940_ladder" WHERE "against"<630 AND "club"='warrnambool' AND "wins">6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1940_ladder" (
"club" text,
"wins" real,
"losses" real,
"draws" real,
"against" real
);
Question: What are the draws of Cobden when there are more than 3 losses?
<|assistant|>
SELECT AVG("draws") FROM "1940_ladder" WHERE "losses">3 AND "club"='cobden';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What average bronze has 0 as the silver, 17 as the rank, and a gold less than 1?
<|assistant|>
SELECT AVG("bronze") FROM "medals_table" WHERE "silver"=0 AND "rank"='17' AND "gold"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the lowest silver that has 2 as the bronze, with a total greater than 4?
<|assistant|>
SELECT MIN("silver") FROM "medals_table" WHERE "bronze"=2 AND "total">4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medals_table" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many bronzes have a total less than 11, with 11 as the rank, and a gold less than 1?
<|assistant|>
SELECT COUNT("bronze") FROM "medals_table" WHERE "total"<11 AND "rank"='11' AND "gold"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "45_nm" (
"model_number" text,
"s_spec_number" text,
"frequency" text,
"turbo" text,
"cores" real,
"l2_cache" text,
"l3_cache" text,
"i_o_bus" text,
"mult" text,
"memory" text,
"voltage" text,
"socket" text,
"release_date" text,
"part_number_s" text,
"release_price_usd" text
);
Question: What is the memory with a socket g1 and a 1/1/6/9 turbo?
<|assistant|>
SELECT "memory" FROM "45_nm" WHERE "socket"='socket g1' AND "turbo"='1/1/6/9';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "45_nm" (
"model_number" text,
"s_spec_number" text,
"frequency" text,
"turbo" text,
"cores" real,
"l2_cache" text,
"l3_cache" text,
"i_o_bus" text,
"mult" text,
"memory" text,
"voltage" text,
"socket" text,
"release_date" text,
"part_number_s" text,
"release_price_usd" text
);
Question: What is the release date of the 6 mb L3 cache with the part number by80607005259aabx80607i7740qm?
<|assistant|>
SELECT "release_date" FROM "45_nm" WHERE "l3_cache"='6 mb' AND "part_number_s"='by80607005259aabx80607i7740qm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"song" text,
"place" real,
"points" real
);
Question: What was the lowest draw for Beathoven when the place was smaller than 16?
<|assistant|>
SELECT MIN("draw") FROM "results" WHERE "artist"='beathoven' AND "place"<16;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"song" text,
"place" real,
"points" real
);
Question: What Luca Barbarossa song had a draw smaller than 20?
<|assistant|>
SELECT "song" FROM "results" WHERE "draw"<20 AND "artist"='luca barbarossa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2012_results" (
"date" text,
"opponent" text,
"location" text,
"result" text,
"record" text,
"rank" text
);
Question: Who did they play at sec tournament?
<|assistant|>
SELECT "opponent" FROM "2012_results" WHERE "location"='sec tournament';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2012_results" (
"date" text,
"opponent" text,
"location" text,
"result" text,
"record" text,
"rank" text
);
Question: Where was the game played when their record was 9-1-0?
<|assistant|>
SELECT "location" FROM "2012_results" WHERE "record"='9-1-0';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "episodes" (
"children_of_earth" text,
"run_time" text,
"writer" text,
"director" text,
"original_airdate" text,
"viewers_including_hd_in_millions" text
);
Question: Who is the writer of Children of Earth of "day four"?
<|assistant|>
SELECT "writer" FROM "episodes" WHERE "children_of_earth"='\"day four\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "episodes" (
"children_of_earth" text,
"run_time" text,
"writer" text,
"director" text,
"original_airdate" text,
"viewers_including_hd_in_millions" text
);
Question: How many viewers were there for Children of Earth of "day one"?
<|assistant|>
SELECT "viewers_including_hd_in_millions" FROM "episodes" WHERE "children_of_earth"='\"day one\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "episodes" (
"children_of_earth" text,
"run_time" text,
"writer" text,
"director" text,
"original_airdate" text,
"viewers_including_hd_in_millions" text
);
Question: Who was the director of Children of Earth of "day five"?
<|assistant|>
SELECT "director" FROM "episodes" WHERE "children_of_earth"='\"day five\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "episodes" (
"children_of_earth" text,
"run_time" text,
"writer" text,
"director" text,
"original_airdate" text,
"viewers_including_hd_in_millions" text
);
Question: Who was the director of the episode written by Russell T Davies and James Moran?
<|assistant|>
SELECT "director" FROM "episodes" WHERE "writer"='russell t davies and james moran';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "relegation_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
Question: Which Points have Drawn of 1, and a Played larger than 14?
<|assistant|>
SELECT MAX("points") FROM "relegation_round" WHERE "drawn"=1 AND "played">14;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "relegation_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
Question: Which Position has Drawn larger than 1, and a Played smaller than 14?
<|assistant|>
SELECT MAX("position") FROM "relegation_round" WHERE "drawn">1 AND "played"<14;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "relegation_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
Question: Which Lost has Drawn larger than 1, and a Played larger than 14?
<|assistant|>
SELECT MIN("lost") FROM "relegation_round" WHERE "drawn">1 AND "played">14;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "relegation_round" (
"position" real,
"name" text,
"played" real,
"drawn" real,
"lost" real,
"points" real
);
Question: How much Lost has Points larger than 15, and a Name of ev pegnitz?
<|assistant|>
SELECT COUNT("lost") FROM "relegation_round" WHERE "points">15 AND "name"='ev pegnitz';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "results" (
"draw" real,
"language" text,
"artist" text,
"song" text,
"english_translation" text,
"place" real,
"points" real
);
Question: what is the english translation when the artist is ann christine?
<|assistant|>
SELECT "english_translation" FROM "results" WHERE "artist"='ann christine';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sixteenth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
Question: What player was picked earlier than 126 by the Houston Oilers?
<|assistant|>
SELECT "player" FROM "sixteenth_round" WHERE "pick"<126 AND "team"='houston oilers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "sixteenth_round" (
"pick" real,
"team" text,
"player" text,
"position" text,
"college" text
);
Question: What college was picked later than 122 by the Boston Patriots?
<|assistant|>
SELECT "college" FROM "sixteenth_round" WHERE "pick">122 AND "team"='boston patriots';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
Question: what is the to par for geoff ogilvy?
<|assistant|>
SELECT "to_par" FROM "made_the_cut" WHERE "player"='geoff ogilvy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
Question: what is the country for geoff ogilvy?
<|assistant|>
SELECT "country" FROM "made_the_cut" WHERE "player"='geoff ogilvy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
Question: what is the to par for retief goosen?
<|assistant|>
SELECT "to_par" FROM "made_the_cut" WHERE "player"='retief goosen';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "made_the_cut" (
"player" text,
"country" text,
"year_s_won" text,
"total" real,
"to_par" text,
"finish" text
);
Question: how many times is the player jim furyk?
<|assistant|>
SELECT COUNT("total") FROM "made_the_cut" WHERE "player"='jim furyk';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_2" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
Question: What is the lowest lane in which an athlete got a time larger than 20.75 and a react smaller than 0.166?
<|assistant|>
SELECT MIN("lane") FROM "heat_2" WHERE "time">20.75 AND "react"<0.166;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_2" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
Question: What is Christian Malcolm´s highest react when his time was below 20.58?
<|assistant|>
SELECT MAX("react") FROM "heat_2" WHERE "time"<20.58 AND "athlete"='christian malcolm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_selections" (
"year_a" real,
"pick" text,
"player_name" text,
"position" text,
"college" text
);
Question: what is the position when the year [A} is after 2011 and the pick is 28?
<|assistant|>
SELECT "position" FROM "player_selections" WHERE "year_a">2011 AND "pick"='28';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_selections" (
"year_a" real,
"pick" text,
"player_name" text,
"position" text,
"college" text
);
Question: Who is the player when the pick is 22 and the year [A] is after 1979?
<|assistant|>
SELECT "player_name" FROM "player_selections" WHERE "pick"='22' AND "year_a">1979;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "player_selections" (
"year_a" real,
"pick" text,
"player_name" text,
"position" text,
"college" text
);
Question: who is the player when the pick is 15 and the year [A] is 2000?
<|assistant|>
SELECT "player_name" FROM "player_selections" WHERE "pick"='15' AND "year_a"=2000;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
Question: Which country was the player from who scored 66-72-70=207?
<|assistant|>
SELECT "country" FROM "third_round" WHERE "score"='66-72-70=207';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
Question: What place was the player who scored 70-69-68=207?
<|assistant|>
SELECT "place" FROM "third_round" WHERE "score"='70-69-68=207';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
Question: What country was the player in t10 place with a score of 66-72-70=207?
<|assistant|>
SELECT "country" FROM "third_round" WHERE "place"='t10' AND "score"='66-72-70=207';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
Question: What is the to par of United States' Cristie Kerr?
<|assistant|>
SELECT "to_par" FROM "third_round" WHERE "country"='united states' AND "player"='cristie kerr';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "track_listing" (
"song" text,
"performer" text,
"original_artist" text,
"length" text,
"recorded" text
);
Question: Who is the original artist of the 3:00 song?
<|assistant|>
SELECT "original_artist" FROM "track_listing" WHERE "length"='3:00';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "track_listing" (
"song" text,
"performer" text,
"original_artist" text,
"length" text,
"recorded" text
);
Question: How long is "Harvest"?
<|assistant|>
SELECT "length" FROM "track_listing" WHERE "song"='\"harvest\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "track_listing" (
"song" text,
"performer" text,
"original_artist" text,
"length" text,
"recorded" text
);
Question: Which song lasts 3:34?
<|assistant|>
SELECT "song" FROM "track_listing" WHERE "length"='3:34';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "track_listing" (
"song" text,
"performer" text,
"original_artist" text,
"length" text,
"recorded" text
);
Question: Who is the original artist of "Let's Dance"?
<|assistant|>
SELECT "original_artist" FROM "track_listing" WHERE "song"='\"let''s dance\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "track_listing" (
"song" text,
"performer" text,
"original_artist" text,
"length" text,
"recorded" text
);
Question: Which song lasts 4:08?
<|assistant|>
SELECT "song" FROM "track_listing" WHERE "length"='4:08';<|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: How many bronze medals for Romania when the silver count is more than 1?
<|assistant|>
SELECT AVG("bronze") FROM "medal_table" WHERE "nation"='romania' AND "silver">1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "managers" (
"num_a" text,
"manager" text,
"years" text,
"wins" real,
"losses" real,
"w_pct" real
);
Question: Which manager had less than 287 losses, less than 80 wins, a win percentage of 0.296, and was employed in 1904?
<|assistant|>
SELECT "manager" FROM "managers" WHERE "losses"<287 AND "wins"<80 AND "years"='1904' AND "w_pct"=0.296;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "solo_singles" (
"year" real,
"u_s_hot_100" text,
"u_s_r_b" text,
"u_s_rap" text,
"album" text
);
Question: Which U.S. Hot has 13 as the U.S. R&B?
<|assistant|>
SELECT "u_s_hot_100" FROM "solo_singles" WHERE "u_s_r_b"='13';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "solo_singles" (
"year" real,
"u_s_hot_100" text,
"u_s_r_b" text,
"u_s_rap" text,
"album" text
);
Question: What U.S. Rap has life in the concrete jungle as the album?
<|assistant|>
SELECT "u_s_rap" FROM "solo_singles" WHERE "album"='life in the concrete jungle';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.