text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_2" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: Name the lowest Rank of carmelita jeter with a Time smaller than 11.08?
<|assistant|>
SELECT MIN("rank") FROM "heat_2" WHERE "name"='carmelita jeter' AND "time"<11.08;<|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: When the points are 98 what is the draw?
<|assistant|>
SELECT COUNT("draw") FROM "results" WHERE "points"=98;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rank_by_time_in_office" (
"rank" real,
"premier" text,
"assumed_office" text,
"left_office" text,
"total_time_in_office" text
);
Question: What is the TOTAL Time in Office with a rank smaller than 18, and premier is Joh Bjelke-Petersen?
<|assistant|>
SELECT "total_time_in_office" FROM "rank_by_time_in_office" WHERE "rank"<18 AND "premier"='joh bjelke-petersen';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "rank_by_time_in_office" (
"rank" real,
"premier" text,
"assumed_office" text,
"left_office" text,
"total_time_in_office" text
);
Question: What is the assumed Office date when the TOTAL Time in Office is 5years, 316days?
<|assistant|>
SELECT "assumed_office" FROM "rank_by_time_in_office" WHERE "total_time_in_office"='5years, 316days';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"akakios_kakiasvilis_gre" text,
"188kg" text,
"athens_greece" text
);
Question: What Akakios Kakiasvilis (GRE) is 187kg the 188kg?
<|assistant|>
SELECT "akakios_kakiasvilis_gre" FROM "records" WHERE "188kg"='187kg';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"akakios_kakiasvilis_gre" text,
"188kg" text,
"athens_greece" text
);
Question: What world record has the 188kg as 187kg?
<|assistant|>
SELECT "world_record" FROM "records" WHERE "188kg"='187kg';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"world_record" text,
"snatch" text,
"akakios_kakiasvilis_gre" text,
"188kg" text,
"athens_greece" text
);
Question: For what 188kg is the world record clean & jerk?
<|assistant|>
SELECT "188kg" FROM "records" WHERE "world_record"='clean & jerk';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_16_4_titles_12_runner_ups" (
"outcome" text,
"year" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
Question: What year had a score of 6–7(5), 2–6 and opponent of Brenda Schultz-Mccarthy?
<|assistant|>
SELECT "year" FROM "singles_16_4_titles_12_runner_ups" WHERE "opponent_in_the_final"='brenda schultz-mccarthy' AND "score"='6–7(5), 2–6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_16_4_titles_12_runner_ups" (
"outcome" text,
"year" text,
"tournament" text,
"surface" text,
"opponent_in_the_final" text,
"score" text
);
Question: What year had a score of 4–6, 7–6, 7–5?
<|assistant|>
SELECT "year" FROM "singles_16_4_titles_12_runner_ups" WHERE "score"='4–6, 7–6, 7–5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "a_b_second_round" (
"time" text,
"home_team" text,
"score" text,
"away_team" text,
"venue" text
);
Question: Who was the away team for the match with a home team of Citizen Team A?
<|assistant|>
SELECT "away_team" FROM "a_b_second_round" WHERE "home_team"='citizen team a';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "a_b_second_round" (
"time" text,
"home_team" text,
"score" text,
"away_team" text,
"venue" text
);
Question: What was the score for the match with a home team of Citizen Team A?
<|assistant|>
SELECT "score" FROM "a_b_second_round" WHERE "home_team"='citizen team a';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "a_b_second_round" (
"time" text,
"home_team" text,
"score" text,
"away_team" text,
"venue" text
);
Question: Who was the home team in the match that had an away team of Convoy Sun Hei Team B?
<|assistant|>
SELECT "home_team" FROM "a_b_second_round" WHERE "away_team"='convoy sun hei team b';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "a_b_second_round" (
"time" text,
"home_team" text,
"score" text,
"away_team" text,
"venue" text
);
Question: What time did the match with an away team of Happy Valley Team B start?
<|assistant|>
SELECT "time" FROM "a_b_second_round" WHERE "away_team"='happy valley team b';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_qualifying_round" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: What is the 2nd leg when second team is Sumykhimprom?
<|assistant|>
SELECT "2nd_leg" FROM "first_qualifying_round" WHERE "team_num2"='sumykhimprom';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_qualifying_round" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: What is the agg when the seconf leg is 58-75?
<|assistant|>
SELECT "agg" FROM "first_qualifying_round" WHERE "2nd_leg"='58-75';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_qualifying_round" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: What is the first team when the 2nd leg is 100-113?
<|assistant|>
SELECT "team_num1" FROM "first_qualifying_round" WHERE "2nd_leg"='100-113';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_qualifying_round" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: What is team 1 when the 1st leg is 92-82?
<|assistant|>
SELECT "team_num1" FROM "first_qualifying_round" WHERE "1st_leg"='92-82';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_qualifying_round" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: What is team number 1 when then 2nd leg is 64-97?
<|assistant|>
SELECT "team_num1" FROM "first_qualifying_round" WHERE "2nd_leg"='64-97';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_qualifying_round" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: What is the 1st leg when team number 1 is CSU SIBIU?
<|assistant|>
SELECT "1st_leg" FROM "first_qualifying_round" WHERE "team_num1"='csu sibiu';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "duration" (
"term_abroad" text,
"2000_01" real,
"2001_02" real,
"2002_03" real,
"2003_04" real,
"2004_05" real,
"2005_06" real,
"2006_07" real,
"2007_08" real,
"2008_09" real
);
Question: What is the average duration in 2007/08 with more than 3.8 in 2002/03, more than 8.9 in 2003/04, and less than 34.4 in 2001/02?
<|assistant|>
SELECT AVG("2007_08") FROM "duration" WHERE "2002_03">3.8 AND "2003_04">8.9 AND "2001_02"<34.4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "duration" (
"term_abroad" text,
"2000_01" real,
"2001_02" real,
"2002_03" real,
"2003_04" real,
"2004_05" real,
"2005_06" real,
"2006_07" real,
"2007_08" real,
"2008_09" real
);
Question: What is the total duration in 2006/07 with 191,321 in 2003/04 and less than 160,920 in 2001/02?
<|assistant|>
SELECT COUNT("2006_07") FROM "duration" WHERE "2003_04"='191,321' AND "2001_02"<'160,920';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
Question: Which Time/Retired has Laps smaller than 100, and Points larger than 0?
<|assistant|>
SELECT "time_retired" FROM "race" WHERE "laps"<100 AND "points">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
Question: Which Laps have a Time/Retired of + 4 laps, and a Grid larger than 18?
<|assistant|>
SELECT AVG("laps") FROM "race" WHERE "time_retired"='+ 4 laps' AND "grid">18;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "race" (
"driver" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real,
"points" real
);
Question: Which Team has Laps of 100, and a Time/Retired of +8.6 secs?
<|assistant|>
SELECT "team" FROM "race" WHERE "laps"=100 AND "time_retired"='+8.6 secs';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "most_runs" (
"player" text,
"matches" text,
"runs" text,
"balls" text,
"strike_rate" text,
"average" text,
"100s" text
);
Question: What runs has 11 matches, and 2 as the 100s?
<|assistant|>
SELECT "runs" FROM "most_runs" WHERE "matches"='11' AND "100s"='2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "most_runs" (
"player" text,
"matches" text,
"runs" text,
"balls" text,
"strike_rate" text,
"average" text,
"100s" text
);
Question: What matches is 2 the 100s?
<|assistant|>
SELECT "matches" FROM "most_runs" WHERE "100s"='2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "most_runs" (
"player" text,
"matches" text,
"runs" text,
"balls" text,
"strike_rate" text,
"average" text,
"100s" text
);
Question: What strike rate is 9 the matches?
<|assistant|>
SELECT "strike_rate" FROM "most_runs" WHERE "matches"='9';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "most_runs" (
"player" text,
"matches" text,
"runs" text,
"balls" text,
"strike_rate" text,
"average" text,
"100s" text
);
Question: Which player has 79.62 as the strike rate?
<|assistant|>
SELECT "player" FROM "most_runs" WHERE "strike_rate"='79.62';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "most_runs" (
"player" text,
"matches" text,
"runs" text,
"balls" text,
"strike_rate" text,
"average" text,
"100s" text
);
Question: With 10 as matches, and 469 runs, what is the strike rate?
<|assistant|>
SELECT "strike_rate" FROM "most_runs" WHERE "matches"='10' AND "runs"='469';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "most_runs" (
"player" text,
"matches" text,
"runs" text,
"balls" text,
"strike_rate" text,
"average" text,
"100s" text
);
Question: When the strike rate is 70.10, what is the balls?
<|assistant|>
SELECT "balls" FROM "most_runs" WHERE "strike_rate"='70.10';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"date" text,
"event" text,
"heat_semifinal_final" text,
"nation" text,
"time" text
);
Question: What nation has a time of 51.35 in the final heat?
<|assistant|>
SELECT "nation" FROM "records" WHERE "time"='51.35' AND "heat_semifinal_final"='final';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"date" text,
"event" text,
"heat_semifinal_final" text,
"nation" text,
"time" text
);
Question: Which heat, semifinal or final has a time of 48.97?
<|assistant|>
SELECT "heat_semifinal_final" FROM "records" WHERE "time"='48.97';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"date" text,
"event" text,
"heat_semifinal_final" text,
"nation" text,
"time" text
);
Question: What heat, semifinal or final has a time of 25.00?
<|assistant|>
SELECT "heat_semifinal_final" FROM "records" WHERE "time"='25.00';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "records" (
"date" text,
"event" text,
"heat_semifinal_final" text,
"nation" text,
"time" text
);
Question: What date was the men's 100m breaststroke in heat 6?
<|assistant|>
SELECT "date" FROM "records" WHERE "event"='men''s 100m breaststroke' AND "heat_semifinal_final"='heat 6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_round" (
"group" text,
"name" text,
"nationality" text,
"4_00" text,
"result" text
);
Question: Marion Buisson with a 4.00 of o had what result?
<|assistant|>
SELECT "result" FROM "qualifying_round" WHERE "4_00"='o' AND "name"='marion buisson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_round" (
"group" text,
"name" text,
"nationality" text,
"4_00" text,
"result" text
);
Question: Anastasija Reiberger from Germany had what 4.00?
<|assistant|>
SELECT "4_00" FROM "qualifying_round" WHERE "nationality"='germany' AND "name"='anastasija reiberger';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_round" (
"group" text,
"name" text,
"nationality" text,
"4_00" text,
"result" text
);
Question: Alana Boyd of group B with a 4.30 result has what nationality?
<|assistant|>
SELECT "nationality" FROM "qualifying_round" WHERE "group"='b' AND "result"='4.30' AND "name"='alana boyd';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_round" (
"group" text,
"name" text,
"nationality" text,
"4_00" text,
"result" text
);
Question: Roslinda Samsu has what nationality?
<|assistant|>
SELECT "nationality" FROM "qualifying_round" WHERE "name"='roslinda samsu';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "qualifying_round" (
"group" text,
"name" text,
"nationality" text,
"4_00" text,
"result" text
);
Question: What nation is Marion Buisson playing for?
<|assistant|>
SELECT "nationality" FROM "qualifying_round" WHERE "name"='marion buisson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: Who is the rower from Canada?
<|assistant|>
SELECT "rowers" FROM "heat_1" WHERE "country"='canada';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the sum of the rank of the rower with an r note from Australia?
<|assistant|>
SELECT SUM("rank") FROM "heat_1" WHERE "notes"='r' AND "country"='australia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the country with a rank less than 2?
<|assistant|>
SELECT "country" FROM "heat_1" WHERE "rank"<2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "quarterfinal_1" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
Question: What notes did Gabriella Bascelli receive?
<|assistant|>
SELECT "notes" FROM "quarterfinal_1" WHERE "athlete"='gabriella bascelli';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "quarterfinal_1" (
"rank" real,
"athlete" text,
"country" text,
"time" text,
"notes" text
);
Question: What rank did the time of 7:31.90 receive?
<|assistant|>
SELECT COUNT("rank") FROM "quarterfinal_1" WHERE "time"='7:31.90';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2005_summer_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
Question: Which Romaji Title has a Japanese Title of 女王の教室?
<|assistant|>
SELECT "romaji_title" FROM "2005_summer_season" WHERE "japanese_title"='女王の教室';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2005_summer_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
Question: How many Episodes have a Romaji Title of slow dance?
<|assistant|>
SELECT SUM("episodes") FROM "2005_summer_season" WHERE "romaji_title"='slow dance';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2005_summer_season" (
"japanese_title" text,
"romaji_title" text,
"tv_station" text,
"episodes" real,
"average_ratings" text
);
Question: How many Episodes have a Romaji Title of dragon zakura?
<|assistant|>
SELECT COUNT("episodes") FROM "2005_summer_season" WHERE "romaji_title"='dragon zakura';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" real
);
Question: Which Format has a Label of columbia, and a Catalog smaller than 88697411432, and a Date of october 24, 2008?
<|assistant|>
SELECT "format" FROM "release_history" WHERE "label"='columbia' AND "catalog"<88697411432 AND "date"='october 24, 2008';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "release_history" (
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" real
);
Question: Which Catalog has a Date of july 15, 2011?
<|assistant|>
SELECT AVG("catalog") FROM "release_history" WHERE "date"='july 15, 2011';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_5" (
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: Which opponent was on July 21, 2008?
<|assistant|>
SELECT "opponent" FROM "singles_5" WHERE "date"='july 21, 2008';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_5" (
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: What was the date of the tournament with a clay surface and an opponent of Irina Falconi?
<|assistant|>
SELECT "date" FROM "singles_5" WHERE "surface"='clay' AND "opponent"='irina falconi';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_5" (
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
);
Question: Who was the opponent on May 10, 2009?
<|assistant|>
SELECT "opponent" FROM "singles_5" WHERE "date"='may 10, 2009';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: What is the score of the home team, bath city?
<|assistant|>
SELECT "score" FROM "first_round_proper" WHERE "home_team"='bath city';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: What was the score for the away team southport?
<|assistant|>
SELECT "score" FROM "first_round_proper" WHERE "away_team"='southport';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: What is the home team that had an away team of lincoln city?
<|assistant|>
SELECT "home_team" FROM "first_round_proper" WHERE "away_team"='lincoln city';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: What date had a game with wycombe wanderers as the away team?
<|assistant|>
SELECT "date" FROM "first_round_proper" WHERE "away_team"='wycombe wanderers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "quarter_final_1_10_january_2009" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" real
);
Question: How many places have an Artist of augustė, and a Draw smaller than 6?
<|assistant|>
SELECT COUNT("place") FROM "quarter_final_1_10_january_2009" WHERE "artist"='augustė' AND "draw"<6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championships_men" (
"year" real,
"place" text,
"gold" text,
"silver" text,
"bronze" text
);
Question: What is the latest year the world championships were held in Thun?
<|assistant|>
SELECT MAX("year") FROM "world_championships_men" WHERE "place"='thun';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championships_men" (
"year" real,
"place" text,
"gold" text,
"silver" text,
"bronze" text
);
Question: Who won gold when the world championships were held in Phoenix?
<|assistant|>
SELECT "gold" FROM "world_championships_men" WHERE "place"='phoenix';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "a" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: What is the smallest ANSI code for adler township when Longitude is more than -101.333926, GEO ID is less than 3806700900, and Land ( sqmi ) is more than 35.84?
<|assistant|>
SELECT MIN("ansi_code") FROM "a" WHERE "longitude">-101.333926 AND "geo_id"<3806700900 AND "township"='adler' AND "land_sqmi">35.84;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "a" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: Cass county has 0.008 Water (sqmi), less than 35.874 Land (sqmi), more than 35 Pop. (2010), and what average latitude?
<|assistant|>
SELECT AVG("latitude") FROM "a" WHERE "land_sqmi"<35.874 AND "pop_2010">35 AND "county"='cass' AND "water_sqmi"=0.008;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "a" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: In what county is the latitude less than 46.935364 and GEO ID is 3801700500?
<|assistant|>
SELECT "county" FROM "a" WHERE "latitude"<46.935364 AND "geo_id"=3801700500;<|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,
"score" text,
"record" text
);
Question: Who was the opponent at the game with a score of 35-14?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "score"='35-14';<|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,
"score" text,
"record" text
);
Question: What was the result of the game when the record was 5-1?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "record"='5-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,
"score" text,
"record" text
);
Question: What was the result of the game against the Los Angeles Dons?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "opponent"='los angeles dons';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
Question: Which Year has a Venue of bydgoszcz, poland, and an Event of junior team?
<|assistant|>
SELECT AVG("year") FROM "achievements" WHERE "venue"='bydgoszcz, poland' AND "event"='junior team';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
Question: Which Venue has a Year smaller than 2009, and an Event of 3000 m, and a Competition of world youth championships?
<|assistant|>
SELECT "venue" FROM "achievements" WHERE "year"<2009 AND "event"='3000 m' AND "competition"='world youth championships';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "achievements" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"event" text
);
Question: Which Year has a Competition of commonwealth youth games?
<|assistant|>
SELECT AVG("year") FROM "achievements" WHERE "competition"='commonwealth youth games';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"rank" real,
"name" text,
"height_ft_m" text,
"floors" real,
"year" real
);
Question: What is the total for 1986?
<|assistant|>
SELECT COUNT("rank") FROM "references" WHERE "year"=1986;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"rank" real,
"name" text,
"height_ft_m" text,
"floors" real,
"year" real
);
Question: What is the name before 1954 with more than 15 floors?
<|assistant|>
SELECT "name" FROM "references" WHERE "year"<1954 AND "floors">15;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"rank" real,
"name" text,
"height_ft_m" text,
"floors" real,
"year" real
);
Question: What is the lowest rank for El Paso Natural Gas Company Building?
<|assistant|>
SELECT MIN("rank") FROM "references" WHERE "name"='el paso natural gas company building';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "historical_data" (
"rank" text,
"province" text,
"population_2011" real,
"percentage" real,
"population_estimate_2013" real
);
Question: What is the lowest 2013 population estimate of south africa, which has a percentage greater than 19.8 and a 2011 population greater than 51,770,561?
<|assistant|>
SELECT MIN("population_estimate_2013") FROM "historical_data" WHERE "percentage">19.8 AND "province"='south africa' AND "population_2011">'51,770,561';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "historical_data" (
"rank" text,
"province" text,
"population_2011" real,
"percentage" real,
"population_estimate_2013" real
);
Question: What is the rank of the gauteng province?
<|assistant|>
SELECT "rank" FROM "historical_data" WHERE "province"='gauteng';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "historical_data" (
"rank" text,
"province" text,
"population_2011" real,
"percentage" real,
"population_estimate_2013" real
);
Question: What is the lowest 2013 population estimate of the province with a 23.7 percentage?
<|assistant|>
SELECT MIN("population_estimate_2013") FROM "historical_data" WHERE "percentage"=23.7;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "by_teams" (
"team" text,
"winners" real,
"runners_up" real,
"years_won" text,
"years_runner_up" text
);
Question: What year(s) was Duisburg runner-up?
<|assistant|>
SELECT "years_runner_up" FROM "by_teams" WHERE "team"='duisburg';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "major_competition_record" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
Question: What was the earliest year with a note of 18.04 m wl?
<|assistant|>
SELECT MIN("year") FROM "major_competition_record" WHERE "notes"='18.04 m wl';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "major_competition_record" (
"year" real,
"competition" text,
"venue" text,
"position" text,
"notes" text
);
Question: What venue had a competition of World Junior Championships before 2011?
<|assistant|>
SELECT "venue" FROM "major_competition_record" WHERE "year"<2011 AND "competition"='world junior championships';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "readers_choice" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: Who was the developer of Call of Duty: Black Ops?
<|assistant|>
SELECT "developer_s" FROM "readers_choice" WHERE "game"='call of duty: black ops';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "readers_choice" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What is the platform for the game of the third-person shooter genre?
<|assistant|>
SELECT "platform_s" FROM "readers_choice" WHERE "genre"='third-person shooter';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "readers_choice" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: What is the platform of the game from 2007?
<|assistant|>
SELECT "platform_s" FROM "readers_choice" WHERE "year"=2007;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "readers_choice" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: Who was the developer of Resident Evil 4?
<|assistant|>
SELECT "developer_s" FROM "readers_choice" WHERE "game"='resident evil 4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"rank" real,
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: What was the rank of flori lang when his time was less than 22.27
<|assistant|>
SELECT SUM("rank") FROM "heats" WHERE "name"='flori lang' AND "time"<22.27;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"rank" real,
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: What lane had a heat after 12, a rank of 38 and a time larger than 22.67?
<|assistant|>
SELECT AVG("lane") FROM "heats" WHERE "heat">12 AND "rank"=38 AND "time">22.67;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" text,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
Question: What game has 27-12 record?
<|assistant|>
SELECT "game" FROM "game_log" WHERE "record"='27-12';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" text,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
Question: What date was the record 21-11?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "record"='21-11';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" text,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
Question: What is the location/attendance for the w 95-93 score?
<|assistant|>
SELECT "location_attendance" FROM "game_log" WHERE "score"='w 95-93';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" text,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
Question: What is the location/attendance with a 26-11 record?
<|assistant|>
SELECT "location_attendance" FROM "game_log" WHERE "record"='26-11';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"game" text,
"date" text,
"opponent" text,
"score" text,
"location_attendance" text,
"record" text
);
Question: Which opponent has a 26-12 record?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "record"='26-12';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_2" (
"rank" real,
"rower" text,
"country" text,
"time" text,
"notes" text
);
Question: What is Lee Ka Man's Time?
<|assistant|>
SELECT "time" FROM "heat_2" WHERE "rower"='lee ka man';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_2" (
"rank" real,
"rower" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the Rank of the rower with a Time of 8:23.02?
<|assistant|>
SELECT COUNT("rank") FROM "heat_2" WHERE "time"='8:23.02';<|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: What is the most gold when the rank is 7 and bronze is less than 0?
<|assistant|>
SELECT MAX("gold") FROM "medal_table" WHERE "rank"='7' AND "bronze"<0;<|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: what is the most gold when the total is 7?
<|assistant|>
SELECT MAX("gold") FROM "medal_table" WHERE "total"=7;<|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: what is the least gold when the rank is 10 and silver is less than 0?
<|assistant|>
SELECT MIN("gold") FROM "medal_table" WHERE "rank"='10' AND "silver"<0;<|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: what is the lowest total when the nation is sweden (swe) and silver is less than 0?
<|assistant|>
SELECT MIN("total") FROM "medal_table" WHERE "nation"='sweden (swe)' AND "silver"<0;<|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: what is the average total when silver is more than 2, bronze is 12 and gold is less than 12?
<|assistant|>
SELECT AVG("total") FROM "medal_table" WHERE "silver">2 AND "bronze"=12 AND "gold"<12;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "n" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: What is the longitude with a latitude of 48.930222 with a Geo ID smaller than 3806755660?
<|assistant|>
SELECT COUNT("longitude") FROM "n" WHERE "latitude"=48.930222 AND "geo_id"<3806755660;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "n" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: What is the latitude that has a sqmi smaller than 34.401, a Geo ID smaller than 3807157722, and a Longitude of -98.475995?
<|assistant|>
SELECT "latitude" FROM "n" WHERE "land_sqmi"<34.401 AND "geo_id"<3807157722 AND "longitude"=-98.475995;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "n" (
"township" text,
"county" text,
"pop_2010" real,
"land_sqmi" real,
"water_sqmi" real,
"latitude" real,
"longitude" real,
"geo_id" real,
"ansi_code" real
);
Question: What is the total longitude of Nogosek and a GEO ID larger than 3809357060?
<|assistant|>
SELECT COUNT("longitude") FROM "n" WHERE "township"='nogosek' AND "geo_id">3809357060;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "400_w_sub_bands" (
"band" real,
"frequency_m_hz" text,
"wavelength" text,
"type" text,
"power_w" real
);
Question: What Band number has a Power (W) of 400 or less?
<|assistant|>
SELECT SUM("band") FROM "400_w_sub_bands" WHERE "power_w"<400;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "400_w_sub_bands" (
"band" real,
"frequency_m_hz" text,
"wavelength" text,
"type" text,
"power_w" real
);
Question: What Band's Power (W) is 400 or less?
<|assistant|>
SELECT MAX("band") FROM "400_w_sub_bands" WHERE "power_w">400;<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.