text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "numbers_from_100_10_000_000" (
"value" text,
"khmer" real,
"word_form" text,
"ungegn" text,
"ala_lc" text,
"other" text,
"notes" text
);
Question: What number value has the Other transliteration of muoy roy?
<|assistant|>
SELECT "value" FROM "numbers_from_100_10_000_000" WHERE "other"='muoy roy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "numbers_from_100_10_000_000" (
"value" text,
"khmer" real,
"word_form" text,
"ungegn" text,
"ala_lc" text,
"other" text,
"notes" text
);
Question: What is the word form for the ALA-LC transliteration of muay bân?
<|assistant|>
SELECT "word_form" FROM "numbers_from_100_10_000_000" WHERE "ala_lc"='muay bân';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"record" text
);
Question: Name the loss when the record is 76-81
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "record"='76-81';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Which average bronze had a silver greater than 2 and a gold larger than 7?
<|assistant|>
SELECT AVG("bronze") FROM "medal_table" WHERE "silver">2 AND "gold">7;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: When the total was 11 and silver was greater than 4 what was the highest gold?
<|assistant|>
SELECT MAX("gold") FROM "medal_table" WHERE "total"=11 AND "silver">4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "medal_table" (
"rank" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many bronze had a total less than 4 and gold bigger than 1?
<|assistant|>
SELECT COUNT("bronze") FROM "medal_table" WHERE "total"<4 AND "gold">1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "canada_west_football_conference_hardy_tr" (
"institution" text,
"team" text,
"city" text,
"province" text,
"first_season" real,
"head_coach" text,
"enrollment" real,
"endowment" text,
"football_stadium" text,
"capacity" real
);
Question: What is the enrollment associated with a capacity greater then 35,650?
<|assistant|>
SELECT MIN("enrollment") FROM "canada_west_football_conference_hardy_tr" WHERE "capacity">'35,650';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mc_gwire_s_rookie_record_49_home_runs" (
"home_run" real,
"game" real,
"date" text,
"inning" text,
"location" text,
"opposing_pitcher" text,
"team" text
);
Question: Which Date has an Opposing Pitcher of jack morris, and an Inning of 4th?
<|assistant|>
SELECT "date" FROM "mc_gwire_s_rookie_record_49_home_runs" WHERE "opposing_pitcher"='jack morris' AND "inning"='4th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mc_gwire_s_rookie_record_49_home_runs" (
"home_run" real,
"game" real,
"date" text,
"inning" text,
"location" text,
"opposing_pitcher" text,
"team" text
);
Question: Which average Home Run has a Game of 89?
<|assistant|>
SELECT AVG("home_run") FROM "mc_gwire_s_rookie_record_49_home_runs" WHERE "game"=89;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mc_gwire_s_rookie_record_49_home_runs" (
"home_run" real,
"game" real,
"date" text,
"inning" text,
"location" text,
"opposing_pitcher" text,
"team" text
);
Question: Which team has a Home Run of 27?
<|assistant|>
SELECT "team" FROM "mc_gwire_s_rookie_record_49_home_runs" WHERE "home_run"=27;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" text,
"location" text,
"lineup" text,
"assist_pass" text,
"score" text,
"result" text,
"competition" text
);
Question: Which Assist/pass has a Score of 1-0, and a Goal of 5?
<|assistant|>
SELECT "assist_pass" FROM "international_goals" WHERE "score"='1-0' AND "goal"='5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" text,
"location" text,
"lineup" text,
"assist_pass" text,
"score" text,
"result" text,
"competition" text
);
Question: Which Assist/pass has a Result of 6-2?
<|assistant|>
SELECT "assist_pass" FROM "international_goals" WHERE "result"='6-2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" text,
"location" text,
"lineup" text,
"assist_pass" text,
"score" text,
"result" text,
"competition" text
);
Question: Which Assist/pass has a Goal of 5?
<|assistant|>
SELECT "assist_pass" FROM "international_goals" WHERE "goal"='5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" text,
"location" text,
"lineup" text,
"assist_pass" text,
"score" text,
"result" text,
"competition" text
);
Question: Which location has a Goal of 2?
<|assistant|>
SELECT "location" FROM "international_goals" WHERE "goal"='2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" text,
"location" text,
"lineup" text,
"assist_pass" text,
"score" text,
"result" text,
"competition" text
);
Question: Which lineup has a Location of usa virginia beach?
<|assistant|>
SELECT "lineup" FROM "international_goals" WHERE "location"='usa virginia beach';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: Which date had a score of 5-1?
<|assistant|>
SELECT "date" FROM "international_goals" WHERE "score"='5-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: What result had a score of 2-1?
<|assistant|>
SELECT "result" FROM "international_goals" WHERE "score"='2-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: Which date had a score of 3-2?
<|assistant|>
SELECT "date" FROM "international_goals" WHERE "score"='3-2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"pts" real
);
Question: What is the oldest model Porsche v12 that has points less than or equal to 0.
<|assistant|>
SELECT MIN("year") FROM "complete_formula_one_world_championship_" WHERE "engine"='porsche v12' AND "pts"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1992_winter_olympics" (
"date_of_issue" text,
"theme" text,
"denomination" text,
"printer" text,
"quantity" text,
"design" text,
"perforation" text,
"first_day_cover_cancellation" text
);
Question: Which design uses the theme alpine skiing?
<|assistant|>
SELECT "design" FROM "1992_winter_olympics" WHERE "theme"='alpine skiing';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1992_winter_olympics" (
"date_of_issue" text,
"theme" text,
"denomination" text,
"printer" text,
"quantity" text,
"design" text,
"perforation" text,
"first_day_cover_cancellation" text
);
Question: When did the Theme of bobsleigh release?
<|assistant|>
SELECT "date_of_issue" FROM "1992_winter_olympics" WHERE "theme"='bobsleigh';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_world_championship_formula_one_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"pts" real
);
Question: What is the highest pts after 1952 with connaught type a?
<|assistant|>
SELECT MAX("pts") FROM "complete_world_championship_formula_one_" WHERE "year">1952 AND "chassis"='connaught type a';<|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 did the Chiefs play in Week 8?
<|assistant|>
SELECT "opponent" FROM "schedule" WHERE "week"=8;<|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: Which week was on October 11, 1970 and an attendance larger than 41,379.
<|assistant|>
SELECT "week" FROM "schedule" WHERE "attendance">'41,379' AND "date"='october 11, 1970';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "doubles_runner_up_16" (
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents_in_final" text,
"score" text
);
Question: On what surface was the 26 August 2001 tournament played?
<|assistant|>
SELECT "surface" FROM "doubles_runner_up_16" WHERE "date"='26 august 2001';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "project_overview" (
"project" text,
"year" text,
"location" text,
"capacity" real,
"suites" text,
"architect" text,
"cost" text
);
Question: What is the average capacity for 150 suites?
<|assistant|>
SELECT AVG("capacity") FROM "project_overview" WHERE "suites"='150';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "project_overview" (
"project" text,
"year" text,
"location" text,
"capacity" real,
"suites" text,
"architect" text,
"cost" text
);
Question: Where is the Eren Talu bidding project located?
<|assistant|>
SELECT "location" FROM "project_overview" WHERE "project"='eren talu bidding project';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "project_overview" (
"project" text,
"year" text,
"location" text,
"capacity" real,
"suites" text,
"architect" text,
"cost" text
);
Question: Which location has a capacity larger than 52,000?
<|assistant|>
SELECT "location" FROM "project_overview" WHERE "capacity">'52,000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "project_overview" (
"project" text,
"year" text,
"location" text,
"capacity" real,
"suites" text,
"architect" text,
"cost" text
);
Question: What is the highest capacity in Aslantepe in 2002-2005?
<|assistant|>
SELECT MAX("capacity") FROM "project_overview" WHERE "location"='aslantepe' AND "year"='2002-2005';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "numbers_from_100_10_000_000" (
"value" text,
"khmer" real,
"word_form" text,
"ungegn" text,
"ala_lc" text,
"notes" text
);
Question: What is the UNGEGN, when the Khmer is greater than ១០០០០០០០០?
<|assistant|>
SELECT "ungegn" FROM "numbers_from_100_10_000_000" WHERE "khmer">'១០០០០០០០០';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "numbers_from_100_10_000_000" (
"value" text,
"khmer" real,
"word_form" text,
"ungegn" text,
"ala_lc" text,
"notes" text
);
Question: What is the Value, when the Notes are literally "one hundred million"?
<|assistant|>
SELECT "value" FROM "numbers_from_100_10_000_000" WHERE "notes"='literally \"one hundred million\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "numbers_from_100_10_000_000" (
"value" text,
"khmer" real,
"word_form" text,
"ungegn" text,
"ala_lc" text,
"notes" text
);
Question: What is the Word Form, when the Notes are literally "one hundred thousand"?
<|assistant|>
SELECT "word_form" FROM "numbers_from_100_10_000_000" WHERE "notes"='literally \"one hundred thousand\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "numbers_from_100_10_000_000" (
"value" text,
"khmer" real,
"word_form" text,
"ungegn" text,
"ala_lc" text,
"notes" text
);
Question: What is the Word Form, when the Khmer is greater than ១០០០០០, and the UNGEGN is (muŏy) dáb leăn?
<|assistant|>
SELECT "word_form" FROM "numbers_from_100_10_000_000" WHERE "khmer">'១០០០០០' AND "ungegn"='(muŏy) dáb leăn';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "numbers_from_100_10_000_000" (
"value" text,
"khmer" real,
"word_form" text,
"ungegn" text,
"ala_lc" text,
"notes" text
);
Question: What is the total amount of Khmer, when the Notes are literally "one hundred thousand"?
<|assistant|>
SELECT COUNT("khmer") FROM "numbers_from_100_10_000_000" WHERE "notes"='literally \"one hundred thousand\"';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "numbers_from_100_10_000_000" (
"value" text,
"khmer" real,
"word_form" text,
"ungegn" text,
"ala_lc" text,
"notes" text
);
Question: What is the UNGEGN, when the Value is 10 000?
<|assistant|>
SELECT "ungegn" FROM "numbers_from_100_10_000_000" WHERE "value"='10 000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text
);
Question: Name the 2008 for wta premier mandatory tournaments of 2007
<|assistant|>
SELECT "2008" FROM "singles_performance_timeline" WHERE "2007"='wta premier mandatory tournaments';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text
);
Question: Name the tournament of beijing
<|assistant|>
SELECT "2011" FROM "singles_performance_timeline" WHERE "tournament"='beijing';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text
);
Question: Name the 2009 for 2007 of 2r and tournament of wimbledon
<|assistant|>
SELECT "2009" FROM "singles_performance_timeline" WHERE "2007"='2r' AND "tournament"='wimbledon';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text
);
Question: Name the 2011 for 2010 of olympic games
<|assistant|>
SELECT "2011" FROM "singles_performance_timeline" WHERE "2010"='olympic games';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text
);
Question: Name the 2011 for tokyo tournament
<|assistant|>
SELECT "2011" FROM "singles_performance_timeline" WHERE "tournament"='tokyo';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "singles_performance_timeline" (
"tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text
);
Question: Name the 2009 for wta premier mandatory tournaments
<|assistant|>
SELECT "2009" FROM "singles_performance_timeline" WHERE "tournament"='wta premier mandatory tournaments';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "previous_winners" (
"year" text,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: Who won Mixed Doubles the year that Marija Ulitina won the Women's Singles?
<|assistant|>
SELECT "mixed_doubles" FROM "previous_winners" WHERE "women_s_singles"='marija ulitina';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "previous_winners" (
"year" text,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: Who won Men's singles the year that Hilde Themel won Women's singles?
<|assistant|>
SELECT "men_s_singles" FROM "previous_winners" WHERE "women_s_singles"='hilde themel';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "previous_winners" (
"year" text,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: Who won Mixed doubles the year that Pablo Abian won Men's singles?
<|assistant|>
SELECT "mixed_doubles" FROM "previous_winners" WHERE "men_s_singles"='pablo abian';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Which year did Ray Crawford the Kurtis Kraft 500g chassis?
<|assistant|>
SELECT "year" FROM "complete_formula_one_world_championship_" WHERE "chassis"='kurtis kraft 500g';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "averages" (
"city" text,
"january_avg_high_f" text,
"january_avg_low_f" text,
"july_avg_high_f" real,
"july_avg_low_f" real
);
Question: What city had a july high below 84, and a january low of 34.3?
<|assistant|>
SELECT "city" FROM "averages" WHERE "july_avg_high_f"<84 AND "january_avg_low_f"='34.3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "averages" (
"city" text,
"january_avg_high_f" text,
"january_avg_low_f" text,
"july_avg_high_f" real,
"july_avg_low_f" real
);
Question: What is the july average low associated with a january average high of 30.4?
<|assistant|>
SELECT COUNT("july_avg_low_f") FROM "averages" WHERE "january_avg_high_f"='30.4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s_rebroadcaster_of_cfwh_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
Question: Which class has an identifier of CBUA-FM?
<|assistant|>
SELECT "class" FROM "s_rebroadcaster_of_cfwh_fm" WHERE "identifier"='cbua-fm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s_rebroadcaster_of_cfwh_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
Question: What is the city of license for the frequency 90.1 FM?
<|assistant|>
SELECT "city_of_license" FROM "s_rebroadcaster_of_cfwh_fm" WHERE "frequency"='90.1 fm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s_rebroadcaster_of_cfwh_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
Question: What is the power when the city of license is Beaver Creek?
<|assistant|>
SELECT "power" FROM "s_rebroadcaster_of_cfwh_fm" WHERE "city_of_license"='beaver creek';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s_rebroadcaster_of_cfwh_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
Question: What is the city of license when the class is LP and the identifier is CBDK?
<|assistant|>
SELECT "city_of_license" FROM "s_rebroadcaster_of_cfwh_fm" WHERE "class"='lp' AND "identifier"='cbdk';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s_rebroadcaster_of_cfwh_fm" (
"city_of_license" text,
"identifier" text,
"frequency" text,
"power" text,
"class" text,
"rec_net" text
);
Question: What is the class when the frequency is 560 AM?
<|assistant|>
SELECT "class" FROM "s_rebroadcaster_of_cfwh_fm" WHERE "frequency"='560 am';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "forbes_global_2000" (
"rank" real,
"company" text,
"revenues_us_billion" real,
"profit_us_billion" real,
"assets_us_billion" real,
"market_value_us_billion" real
);
Question: What are the smallest assets with a Company of piraeus bank, and a Revenue (US$ billion) smaller than 3.9?
<|assistant|>
SELECT MIN("assets_us_billion") FROM "forbes_global_2000" WHERE "company"='piraeus bank' AND "revenues_us_billion"<3.9;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "forbes_global_2000" (
"rank" real,
"company" text,
"revenues_us_billion" real,
"profit_us_billion" real,
"assets_us_billion" real,
"market_value_us_billion" real
);
Question: What is the average market value with a revenue greater than 6.2, a Company of national bank of greece, and a Rank smaller than 1?
<|assistant|>
SELECT AVG("market_value_us_billion") FROM "forbes_global_2000" WHERE "revenues_us_billion">6.2 AND "company"='national bank of greece' AND "rank"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "forbes_global_2000" (
"rank" real,
"company" text,
"revenues_us_billion" real,
"profit_us_billion" real,
"assets_us_billion" real,
"market_value_us_billion" real
);
Question: Which company has a market value greater than 1, Assets (US$ billion) smaller than 10.7, a Rank smaller than 10, and revenue (US$ billion) of 9.3?
<|assistant|>
SELECT "company" FROM "forbes_global_2000" WHERE "market_value_us_billion">1 AND "assets_us_billion"<10.7 AND "rank"<10 AND "revenues_us_billion"=9.3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_indies_in_england" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: Tell me the venue with result of eng by 6 wkts
<|assistant|>
SELECT "venue" FROM "west_indies_in_england" WHERE "result"='eng by 6 wkts';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_indies_in_england" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: Name the Home captain for venue of the oval
<|assistant|>
SELECT "home_captain" FROM "west_indies_in_england" WHERE "venue"='the oval';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_indies_in_england" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: Name the away captain with result of wi by 9 wkts
<|assistant|>
SELECT "away_captain" FROM "west_indies_in_england" WHERE "result"='wi by 9 wkts';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "west_indies_in_england" (
"date" text,
"home_captain" text,
"away_captain" text,
"venue" text,
"result" text
);
Question: Name the venue for eng by 6 wkts
<|assistant|>
SELECT "venue" FROM "west_indies_in_england" WHERE "result"='eng by 6 wkts';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "billy_elliot" (
"status" text,
"name" text,
"first_performance" text,
"last_performance" text,
"style" text
);
Question: What is the date of the last performance when the style is street dance and the name is George Maguire?
<|assistant|>
SELECT "last_performance" FROM "billy_elliot" WHERE "style"='street dance' AND "name"='george maguire';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "billy_elliot" (
"status" text,
"name" text,
"first_performance" text,
"last_performance" text,
"style" text
);
Question: What is the date of the last performance for Liam Mower?
<|assistant|>
SELECT "last_performance" FROM "billy_elliot" WHERE "name"='liam mower';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: How many points did the Weslake v12 get in 1966?
<|assistant|>
SELECT MAX("points") FROM "complete_formula_one_world_championship_" WHERE "engine"='weslake v12' AND "year"<1966;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: What was the name of the team in 1965 driving the Ferrari 158?
<|assistant|>
SELECT "entrant" FROM "complete_formula_one_world_championship_" WHERE "year"=1965 AND "chassis"='ferrari 158';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_world_championship_" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: What Chassis had a Weslake v12 in it?
<|assistant|>
SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "engine"='weslake v12';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "summary_table" (
"interferon_beta_1a" text,
"betaseron_beta_1b" text,
"copaxone" text,
"mitoxantrone" text,
"tysabri" text,
"fingolimod_gylenya" text,
"teriflunomide" text
);
Question: Name the copaxone with mitoxantrone of no and betaseron (beta-1b) of no
<|assistant|>
SELECT "copaxone" FROM "summary_table" WHERE "mitoxantrone"='no' AND "betaseron_beta_1b"='no';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"player" text,
"test_career" text,
"tests" real,
"catches" real,
"stumpings" real,
"total_dismissals" real
);
Question: Who has a career that has test larger than 41, catches over 33, and a total dismissals rate of 147?
<|assistant|>
SELECT "test_career" FROM "see_also" WHERE "tests">41 AND "catches">33 AND "total_dismissals"=147;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"player" text,
"test_career" text,
"tests" real,
"catches" real,
"stumpings" real,
"total_dismissals" real
);
Question: What is the average dismissals of 83 test and catches less than 33?
<|assistant|>
SELECT AVG("total_dismissals") FROM "see_also" WHERE "tests"=83 AND "catches"<33;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"trofeo_fast_team" text
);
Question: Which winner has a points classification of Tony Rominger at stage 17?
<|assistant|>
SELECT "winner" FROM "classification_leadership_by_stage" WHERE "points_classification"='tony rominger' AND "stage"='17';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"trofeo_fast_team" text
);
Question: Which stage has a mountains classification of Mariano Piccoli, a points classification of Mario Cipollini and was won by Laudelino Cubino?
<|assistant|>
SELECT "stage" FROM "classification_leadership_by_stage" WHERE "mountains_classification"='mariano piccoli' AND "points_classification"='mario cipollini' AND "winner"='laudelino cubino';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"trofeo_fast_team" text
);
Question: Who won stage 16?
<|assistant|>
SELECT "winner" FROM "classification_leadership_by_stage" WHERE "stage"='16';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"trofeo_fast_team" text
);
Question: Which mountains classification has a general classification of Tony Rominger and was won by Maurizio Fondriest?
<|assistant|>
SELECT "mountains_classification" FROM "classification_leadership_by_stage" WHERE "general_classification"='tony rominger' AND "winner"='maurizio fondriest';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"trofeo_fast_team" text
);
Question: What is the general classification at stage 18 that has a points classification of Tony Rominger?
<|assistant|>
SELECT "general_classification" FROM "classification_leadership_by_stage" WHERE "points_classification"='tony rominger' AND "stage"='18';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "classification_leadership_by_stage" (
"stage" text,
"winner" text,
"general_classification" text,
"points_classification" text,
"mountains_classification" text,
"trofeo_fast_team" text
);
Question: Which stage has a mountains classification of Mariano Piccoli and was won by Giuseppe Citterio?
<|assistant|>
SELECT "stage" FROM "classification_leadership_by_stage" WHERE "mountains_classification"='mariano piccoli' AND "winner"='giuseppe citterio';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"first_elected" text
);
Question: What is the year First elected when the Member is John Armitage?
<|assistant|>
SELECT "first_elected" FROM "see_also" WHERE "member"='john armitage';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"first_elected" text
);
Question: Who is the Electorate, when the year for First elected is 1974, and when the Party is Country?
<|assistant|>
SELECT "electorate" FROM "see_also" WHERE "first_elected"='1974' AND "party"='country';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"first_elected" text
);
Question: Who is the Member when the Party is Alp, and when the Electorate is Grey?
<|assistant|>
SELECT "member" FROM "see_also" WHERE "party"='alp' AND "electorate"='grey';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"first_elected" text
);
Question: What is the State, when the year First elected is 1966, and when the Member is Alan Jarman?
<|assistant|>
SELECT "state" FROM "see_also" WHERE "first_elected"='1966' AND "member"='alan jarman';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"first_elected" text
);
Question: What is the year First Elected, when the Party is Alp, and when the State is qld?
<|assistant|>
SELECT "first_elected" FROM "see_also" WHERE "party"='alp' AND "state"='qld';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"member" text,
"party" text,
"electorate" text,
"state" text,
"first_elected" text
);
Question: What is the year First elected, when the State is vic, and when the Member is Hon Don Chipp?
<|assistant|>
SELECT "first_elected" FROM "see_also" WHERE "state"='vic' AND "member"='hon don chipp';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_tour_professional_career_summar" (
"year" text,
"starts" real,
"cuts_made" real,
"wins" real,
"top_10" real,
"top_25" real,
"earnings" real,
"money_list_rank" real
);
Question: Which total number of starts has more than 2 wins and a money list rank greater than 1?
<|assistant|>
SELECT COUNT("starts") FROM "european_tour_professional_career_summar" WHERE "wins">2 AND "money_list_rank">1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_tour_professional_career_summar" (
"year" text,
"starts" real,
"cuts_made" real,
"wins" real,
"top_10" real,
"top_25" real,
"earnings" real,
"money_list_rank" real
);
Question: What is the sum of number of wins that have earnings of more than (€)2,864,342 and money list rank of 3?
<|assistant|>
SELECT SUM("wins") FROM "european_tour_professional_career_summar" WHERE "earnings">'2,864,342' AND "money_list_rank"=3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_tour_professional_career_summar" (
"year" text,
"starts" real,
"cuts_made" real,
"wins" real,
"top_10" real,
"top_25" real,
"earnings" real,
"money_list_rank" real
);
Question: What is the sum of Top 10 performances that have more than 2 wins and is higher than number 16 in the Top 25?
<|assistant|>
SELECT SUM("top_10") FROM "european_tour_professional_career_summar" WHERE "wins">2 AND "top_25"<16;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_tour_professional_career_summar" (
"year" text,
"starts" real,
"cuts_made" real,
"wins" real,
"top_10" real,
"top_25" real,
"earnings" real,
"money_list_rank" real
);
Question: What is the greatest money list ranking that has a Top 25 higher than 2?
<|assistant|>
SELECT MAX("money_list_rank") FROM "european_tour_professional_career_summar" WHERE "top_25"<2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "northern_section" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" text
);
Question: What Away team had an Attendance of 3,395?
<|assistant|>
SELECT "away_team" FROM "northern_section" WHERE "attendance"='3,395';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "northern_section" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"attendance" text
);
Question: What Home team had an Attendance of 2,776?
<|assistant|>
SELECT "home_team" FROM "northern_section" WHERE "attendance"='2,776';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Which engine has more than 1 point after 1981?
<|assistant|>
SELECT "engine" FROM "complete_formula_one_results" WHERE "points">1 AND "year">1981;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "complete_formula_one_results" (
"year" real,
"entrant" text,
"chassis" text,
"engine" text,
"points" real
);
Question: Which engine did Marlboro Team Alfa Romeo used with a chassis of alfa romeo 179?
<|assistant|>
SELECT "engine" FROM "complete_formula_one_results" WHERE "entrant"='marlboro team alfa romeo' AND "chassis"='alfa romeo 179';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "personal_bests" (
"surface" text,
"event" text,
"time_h_m_s" text,
"date" text,
"place" text
);
Question: When has a surface of road and an event of half marathon?
<|assistant|>
SELECT "date" FROM "personal_bests" WHERE "surface"='road' AND "event"='half marathon';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "personal_bests" (
"surface" text,
"event" text,
"time_h_m_s" text,
"date" text,
"place" text
);
Question: Which Surface has a Place of lappeenranta?
<|assistant|>
SELECT "surface" FROM "personal_bests" WHERE "place"='lappeenranta';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "personal_bests" (
"surface" text,
"event" text,
"time_h_m_s" text,
"date" text,
"place" text
);
Question: What is the Date that has 1:01:42?
<|assistant|>
SELECT "date" FROM "personal_bests" WHERE "time_h_m_s"='1:01:42';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "personal_bests" (
"surface" text,
"event" text,
"time_h_m_s" text,
"date" text,
"place" text
);
Question: What is the Time ( h : m : s ) on 13 october 2010
<|assistant|>
SELECT "time_h_m_s" FROM "personal_bests" WHERE "date"='13 october 2010';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "personal_bests" (
"surface" text,
"event" text,
"time_h_m_s" text,
"date" text,
"place" text
);
Question: What is the Place with Time 7:44.15?
<|assistant|>
SELECT "place" FROM "personal_bests" WHERE "time_h_m_s"='7:44.15';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"class" text,
"tyres" text,
"team" text,
"co_drivers" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: Which Class Pos have Laps smaller than 304, and a Year after 2001?
<|assistant|>
SELECT "class_pos" FROM "24_hours_of_le_mans_results" WHERE "laps"<304 AND "year">2001;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "24_hours_of_le_mans_results" (
"year" real,
"class" text,
"tyres" text,
"team" text,
"co_drivers" text,
"laps" real,
"pos" text,
"class_pos" text
);
Question: What is the lowest Laps that has a Year after 2002 with Alexander Frei Bruno Besson?
<|assistant|>
SELECT MIN("laps") FROM "24_hours_of_le_mans_results" WHERE "year">2002 AND "co_drivers"='alexander frei bruno besson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"crowd" text,
"record" text
);
Question: How many people attended the score of w 7-6?
<|assistant|>
SELECT "crowd" FROM "regular_season" WHERE "score"='w 7-6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"crowd" text,
"record" text
);
Question: Who lost that has a score of w 4-3?
<|assistant|>
SELECT "loss" FROM "regular_season" WHERE "score"='w 4-3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"crowd" text,
"record" text
);
Question: Loss of schrom happened on what date?
<|assistant|>
SELECT "date" FROM "regular_season" WHERE "loss"='schrom';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"crowd" text,
"record" text
);
Question: Opponent of @mil, and a Record of 45-16 happened on what date?
<|assistant|>
SELECT "date" FROM "regular_season" WHERE "opponent"='@mil' AND "record"='45-16';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"crowd" text,
"record" text
);
Question: Loss of willis has what record?
<|assistant|>
SELECT "record" FROM "regular_season" WHERE "loss"='willis';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "regular_season" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"crowd" text,
"record" text
);
Question: Loss of wilcox, and a Date of jun 18 had what opponent?
<|assistant|>
SELECT "opponent" FROM "regular_season" WHERE "loss"='wilcox' AND "date"='jun 18';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.