text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "most_goals_in_a_game" (
"rank" text,
"score" text,
"player" text,
"club" text,
"opponent" text,
"year" text,
"round" text,
"venue" text
);
Question: In Round 19, where did Tony Lockett play?
<|assistant|>
SELECT "venue" FROM "most_goals_in_a_game" WHERE "round"='19' AND "player"='tony lockett';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "most_goals_in_a_game" (
"rank" text,
"score" text,
"player" text,
"club" text,
"opponent" text,
"year" text,
"round" text,
"venue" text
);
Question: Who is the opponent in 1992?
<|assistant|>
SELECT "opponent" FROM "most_goals_in_a_game" WHERE "year"='1992';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "most_goals_in_a_game" (
"rank" text,
"score" text,
"player" text,
"club" text,
"opponent" text,
"year" text,
"round" text,
"venue" text
);
Question: What club had a score of 18.1?
<|assistant|>
SELECT "club" FROM "most_goals_in_a_game" WHERE "score"='18.1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"br_sr_no" text,
"sr_name" text,
"lswr_no" real,
"builder" text,
"built" real,
"to_io_w" real,
"withdrawn" real
);
Question: What is the number for year built of W27 that was withdrawn in 1967 with a To LoW year earlier than 1926?
<|assistant|>
SELECT COUNT("built") FROM "references" WHERE "withdrawn"=1967 AND "br_sr_no"='w27' AND "to_io_w"<1926;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"br_sr_no" text,
"sr_name" text,
"lswr_no" real,
"builder" text,
"built" real,
"to_io_w" real,
"withdrawn" real
);
Question: What is the number of the year withdrawn for a LSWR number greater than 210 and a To LoW year of 1923?
<|assistant|>
SELECT COUNT("withdrawn") FROM "references" WHERE "lswr_no">210 AND "to_io_w"=1923;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"br_sr_no" text,
"sr_name" text,
"lswr_no" real,
"builder" text,
"built" real,
"to_io_w" real,
"withdrawn" real
);
Question: What is the BR/SR number of Freshwater which was withdrawn in 1967 and built before 1892 with a To LoW year after 1927?
<|assistant|>
SELECT "br_sr_no" FROM "references" WHERE "withdrawn"=1967 AND "built"<1892 AND "to_io_w">1927 AND "sr_name"='freshwater';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text
);
Question: Name the engine for year less than 1977
<|assistant|>
SELECT "engine" FROM "indy_500_results" WHERE "year"<1977;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text
);
Question: Name the start for year less than 1977
<|assistant|>
SELECT "start" FROM "indy_500_results" WHERE "year"<1977;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text
);
Question: Name the least year for start of 17th
<|assistant|>
SELECT MIN("year") FROM "indy_500_results" WHERE "start"='17th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indy_500_results" (
"year" real,
"chassis" text,
"engine" text,
"start" text,
"finish" text
);
Question: Name the start for finish being 21st
<|assistant|>
SELECT "start" FROM "indy_500_results" WHERE "finish"='21st';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "television" (
"digital_channel" text,
"digital_psip" real,
"rogers_cable_ottawa" real,
"vid_otron_gatineau" real,
"call_sign" text,
"network" text
);
Question: What is the Call sign of the Omni television network with a Digitial PSIP of 14.1?
<|assistant|>
SELECT "call_sign" FROM "television" WHERE "network"='omni television' AND "digital_psip"=14.1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "television" (
"digital_channel" text,
"digital_psip" real,
"rogers_cable_ottawa" real,
"vid_otron_gatineau" real,
"call_sign" text,
"network" text
);
Question: What's the total number of Rogers Cable (Ottawa) channels that have a Digital PSIP greater than 9.1, and a Vidéotron (Gatineau) of channel 14?
<|assistant|>
SELECT COUNT("rogers_cable_ottawa") FROM "television" WHERE "digital_psip">9.1 AND "vid_otron_gatineau"=14;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "television" (
"digital_channel" text,
"digital_psip" real,
"rogers_cable_ottawa" real,
"vid_otron_gatineau" real,
"call_sign" text,
"network" text
);
Question: Which Network is on a Vidéotron (Gatineau) channel lower than 8 and a Rogers Cable (Ottawa) channel lower than 8 and has a Call Sign of cjoh-dt?
<|assistant|>
SELECT "network" FROM "television" WHERE "vid_otron_gatineau"<8 AND "rogers_cable_ottawa"<8 AND "call_sign"='cjoh-dt';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: What was the record after the fight that lasted 8:17?
<|assistant|>
SELECT "record" FROM "mixed_martial_arts_record" WHERE "time"='8:17';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: What was the result of the fight with Tony Halme?
<|assistant|>
SELECT "res" FROM "mixed_martial_arts_record" WHERE "opponent"='tony halme';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What was the score of the game when the record was 63-59 and the attendance was larger than 32,027?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "attendance">'32,027' AND "record"='63-59';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: Who did they play on August 26?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "date"='august 26';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What was the attendance for the game on August 16?
<|assistant|>
SELECT SUM("attendance") FROM "game_log" WHERE "date"='august 16';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" real,
"record" text
);
Question: What team did Johnson (11-7) play for?
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "loss"='johnson (11-7)';<|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 highest number of points the cosworth straight-4 engine scored?
<|assistant|>
SELECT MAX("pts") FROM "complete_formula_one_world_championship_" WHERE "engine"='cosworth straight-4';<|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 latest year that shadow racing team scored more than 0 points?
<|assistant|>
SELECT MAX("year") FROM "complete_formula_one_world_championship_" WHERE "entrant"='shadow racing team' AND "pts">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: What round was held in palavas-les-flots , herault , france?
<|assistant|>
SELECT "round" FROM "mixed_martial_arts_record" WHERE "location"='palavas-les-flots , herault , france';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "previous_winners" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: Who played in the men's singles during the tournament where Ragna Ingolfsdottir played in the women's singles?
<|assistant|>
SELECT "men_s_singles" FROM "previous_winners" WHERE "women_s_singles"='ragna ingolfsdottir';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "previous_winners" (
"year" real,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: Who won the men's doubles in 1995?
<|assistant|>
SELECT "men_s_doubles" FROM "previous_winners" WHERE "year"=1995;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_of_32" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: What is the second leg that Valencia was on?
<|assistant|>
SELECT "2nd_leg" FROM "round_of_32" WHERE "team_2"='valencia';<|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 with record of 14-19
<|assistant|>
SELECT "loss" FROM "game_log" WHERE "record"='14-19';<|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 score with record of 17-27
<|assistant|>
SELECT "score" FROM "game_log" WHERE "record"='17-27';<|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 opponent with record of 12-18
<|assistant|>
SELECT "opponent" FROM "game_log" WHERE "record"='12-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,
"young_rider_classification" text,
"trofeo_fast_team" text
);
Question: Who was the General classification when Pascal Richard was the winner?
<|assistant|>
SELECT "general_classification" FROM "classification_leadership_by_stage" WHERE "winner"='pascal richard';<|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,
"young_rider_classification" text,
"trofeo_fast_team" text
);
Question: Who had the Points classification for Stage 13?
<|assistant|>
SELECT "points_classification" FROM "classification_leadership_by_stage" WHERE "stage"='13';<|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,
"young_rider_classification" text,
"trofeo_fast_team" text
);
Question: What was the Stage when Pascal Richard had the Mountains classification and Vladimir Poulnikov won?
<|assistant|>
SELECT "stage" FROM "classification_leadership_by_stage" WHERE "mountains_classification"='pascal richard' AND "winner"='vladimir poulnikov';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
Question: What's the total score of Danny Edwards?
<|assistant|>
SELECT SUM("score") FROM "first_round" WHERE "player"='danny edwards';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round" (
"place" text,
"player" text,
"country" text,
"score" real,
"to_par" text
);
Question: Where was the place in Australia that had a score of 70?
<|assistant|>
SELECT "place" FROM "first_round" WHERE "score"=70 AND "country"='australia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_8" (
"episode" text,
"first_aired" text,
"entrepreneur_s" text,
"company_or_product_name" text,
"money_requested" text,
"investing_dragon_s" text
);
Question: The entrepreneur Adam Weaver was featured in which episode?
<|assistant|>
SELECT "episode" FROM "series_8" WHERE "entrepreneur_s"='adam weaver';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "series_8" (
"episode" text,
"first_aired" text,
"entrepreneur_s" text,
"company_or_product_name" text,
"money_requested" text,
"investing_dragon_s" text
);
Question: The entrepreneur Layla Bennett was featured in which episode?
<|assistant|>
SELECT "episode" FROM "series_8" WHERE "entrepreneur_s"='layla bennett';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "with_population_above_10_million" (
"rank" real,
"country_region" text,
"population" real,
"area_km_2" real,
"density_pop_per_km_2" real
);
Question: What is the lowest rank of the region with an area larger than 3,185,263 and a population of 16,760,000?
<|assistant|>
SELECT MIN("rank") FROM "with_population_above_10_million" WHERE "area_km_2">'3,185,263' AND "population"='16,760,000';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "with_population_above_10_million" (
"rank" real,
"country_region" text,
"population" real,
"area_km_2" real,
"density_pop_per_km_2" real
);
Question: What is the lowest area of the region with a population less than 22,955,395 in Bangladesh with a density less than 1034?
<|assistant|>
SELECT MIN("area_km_2") FROM "with_population_above_10_million" WHERE "population"<'22,955,395' AND "country_region"='bangladesh' AND "density_pop_per_km_2"<1034;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "with_population_above_10_million" (
"rank" real,
"country_region" text,
"population" real,
"area_km_2" real,
"density_pop_per_km_2" real
);
Question: What is the highest population of the region with a rank bigger than 9?
<|assistant|>
SELECT MAX("population") FROM "with_population_above_10_million" WHERE "rank">9;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "with_population_above_10_million" (
"rank" real,
"country_region" text,
"population" real,
"area_km_2" real,
"density_pop_per_km_2" real
);
Question: What is the average population of the region with a density less than 487, a rank of 9, and an area larger than 377,944?
<|assistant|>
SELECT AVG("population") FROM "with_population_above_10_million" WHERE "density_pop_per_km_2"<487 AND "rank"=9 AND "area_km_2">'377,944';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "with_population_above_10_million" (
"rank" real,
"country_region" text,
"population" real,
"area_km_2" real,
"density_pop_per_km_2" real
);
Question: What is the rank of the region with an area larger than 41,526, a density greater than 345, and a population larger than 48,456,369?
<|assistant|>
SELECT COUNT("rank") FROM "with_population_above_10_million" WHERE "area_km_2">'41,526' AND "density_pop_per_km_2">345 AND "population">'48,456,369';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "a_link_express" (
"model" text,
"codename" text,
"released" text,
"fab_nm" real,
"sata" text,
"usb_2_0_1_1" text,
"usb_3_0" text,
"parallel_ata_1" text,
"raid" real,
"gb_ethernet_mac" text,
"package" text,
"tdp_w" real
);
Question: What is the TDP (w) of the chipset with a codename sb850?
<|assistant|>
SELECT COUNT("tdp_w") FROM "a_link_express" WHERE "codename"='sb850';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "a_link_express" (
"model" text,
"codename" text,
"released" text,
"fab_nm" real,
"sata" text,
"usb_2_0_1_1" text,
"usb_3_0" text,
"parallel_ata_1" text,
"raid" real,
"gb_ethernet_mac" text,
"package" text,
"tdp_w" real
);
Question: What is the average Fab (nm) of the chipset released in q4 2008 with a RAID larger than 0,1,5,10?
<|assistant|>
SELECT AVG("fab_nm") FROM "a_link_express" WHERE "released"='q4 2008' AND "raid">'0,1,5,10';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campus_superstar_2007" (
"round" text,
"name" text,
"song" text,
"score" real,
"status" text
);
Question: Which round is a lower score than 21.5?
<|assistant|>
SELECT "round" FROM "campus_superstar_2007" WHERE "score"<21.5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campus_superstar_2007" (
"round" text,
"name" text,
"song" text,
"score" real,
"status" text
);
Question: Which round status is in with this song: 叶良俊 - 爱你不是爱给别人看?
<|assistant|>
SELECT "round" FROM "campus_superstar_2007" WHERE "status"='in' AND "song"='叶良俊 - 爱你不是爱给别人看';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campus_superstar_2007" (
"round" text,
"name" text,
"song" text,
"score" real,
"status" text
);
Question: Which status accompanies the score 21.5?
<|assistant|>
SELECT "status" FROM "campus_superstar_2007" WHERE "score"=21.5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campus_superstar_2007" (
"round" text,
"name" text,
"song" text,
"score" real,
"status" text
);
Question: Wjat score is greater than 22 with this song: 林俊杰 - 木乃伊?
<|assistant|>
SELECT "name" FROM "campus_superstar_2007" WHERE "score">22 AND "song"='林俊杰 - 木乃伊';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "campus_superstar_2007" (
"round" text,
"name" text,
"song" text,
"score" real,
"status" text
);
Question: What round has this song: 陶喆、蔡依林 - 今天你要嫁给我/曹格 - 世界唯一的你?
<|assistant|>
SELECT "round" FROM "campus_superstar_2007" WHERE "song"='陶喆、蔡依林 - 今天你要嫁给我/曹格 - 世界唯一的你';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "melodifestivalen_1959" (
"draw" real,
"artist" text,
"song" text,
"songwriters" text,
"points" real,
"place" text
);
Question: What is the artist with less than a 2 draw?
<|assistant|>
SELECT "artist" FROM "melodifestivalen_1959" WHERE "draw"<2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "twenty_five_cents" (
"year" real,
"theme" text,
"artist" text,
"mintage" text,
"issue_price" real,
"special_notes" text
);
Question: What is the average issue price with from Toronto maple leafs gift set, and a Mintage of 3527?
<|assistant|>
SELECT AVG("issue_price") FROM "twenty_five_cents" WHERE "special_notes"='from toronto maple leafs gift set' AND "mintage"='3527';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "twenty_five_cents" (
"year" real,
"theme" text,
"artist" text,
"mintage" text,
"issue_price" real,
"special_notes" text
);
Question: What theme has a mintage of 3527?
<|assistant|>
SELECT "theme" FROM "twenty_five_cents" WHERE "mintage"='3527';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "twenty_five_cents" (
"year" real,
"theme" text,
"artist" text,
"mintage" text,
"issue_price" real,
"special_notes" text
);
Question: When was a mintage of 1264 with more than 24.95 issued?
<|assistant|>
SELECT MAX("year") FROM "twenty_five_cents" WHERE "mintage"='1264' AND "issue_price">24.95;<|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: Name the most year for team motul brm and chassis of brm p201 and points less than 0
<|assistant|>
SELECT MAX("year") FROM "complete_formula_one_world_championship_" WHERE "entrant"='team motul brm' AND "chassis"='brm p201' AND "points"<0;<|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: Name the entrant for 1975 and chassis of hill gh1
<|assistant|>
SELECT "entrant" FROM "complete_formula_one_world_championship_" WHERE "year"=1975 AND "chassis"='hill gh1';<|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: Name the chassis for engine of brm v12
<|assistant|>
SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "engine"='brm v12';<|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: Name the most year for points more than 0
<|assistant|>
SELECT MAX("year") FROM "complete_formula_one_world_championship_" WHERE "points">0;<|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: Name the sum of points for chassis of brm p160e and year more than 1974
<|assistant|>
SELECT SUM("points") FROM "complete_formula_one_world_championship_" WHERE "chassis"='brm p160e' AND "year">1974;<|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: What is the chassis after 1991?
<|assistant|>
SELECT "chassis" FROM "complete_formula_one_results" WHERE "year">1991;<|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: What are the average points after 1992?
<|assistant|>
SELECT AVG("points") FROM "complete_formula_one_results" WHERE "year">1992;<|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: What is the sum of points in 1991, for footwork a11c chassis?
<|assistant|>
SELECT SUM("points") FROM "complete_formula_one_results" WHERE "year"=1991 AND "chassis"='footwork a11c';<|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 does an entrant of Martini Racing, the engine of an Alfa Romeo flat-12 a chassis of brabham bt45, and the year 1976 have?
<|assistant|>
SELECT COUNT("points") FROM "complete_formula_one_world_championship_" WHERE "entrant"='martini racing' AND "engine"='alfa romeo flat-12' AND "chassis"='brabham bt45' AND "year"=1976;<|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 chassis is from 1974 and was an entrant of Goldie Hexagon racing?
<|assistant|>
SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "year"=1974 AND "entrant"='goldie hexagon racing';<|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 is the average points of a Cosworth v8 engine in 1973.
<|assistant|>
SELECT AVG("points") FROM "complete_formula_one_world_championship_" WHERE "engine"='cosworth v8' AND "year"=1973;<|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 chassis has an Alfa Romeo flat-12 engine.
<|assistant|>
SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "engine"='alfa romeo flat-12';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
Question: What was the score of the game that had an attendance of 32,036?
<|assistant|>
SELECT "score" FROM "game_log" WHERE "attendance"='32,036';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "game_log" (
"date" text,
"opponent" text,
"score" text,
"loss" text,
"attendance" text,
"record" text
);
Question: On what date did the result leave the team with a record of 46-34?
<|assistant|>
SELECT "date" FROM "game_log" WHERE "record"='46-34';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" text,
"time" text,
"location" text
);
Question: Name the opponent with round of 1 and time of n/a
<|assistant|>
SELECT "opponent" FROM "mixed_martial_arts_record" WHERE "round"='1' AND "time"='n/a';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" text,
"time" text,
"location" text
);
Question: Name the record with opponent of christian nielson
<|assistant|>
SELECT "record" FROM "mixed_martial_arts_record" WHERE "opponent"='christian nielson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" text,
"time" text,
"location" text
);
Question: Name the opponent with decision
<|assistant|>
SELECT "opponent" FROM "mixed_martial_arts_record" WHERE "method"='decision';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "previous_winners" (
"year" text,
"venue" text,
"winners" text,
"runner_up" text,
"3rd_place" text
);
Question: What was the 3rd place value in 2011?
<|assistant|>
SELECT "3rd_place" FROM "previous_winners" WHERE "year"='2011';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_2010_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the tries for points against of 583
<|assistant|>
SELECT "tries_for" FROM "2009_2010_table" WHERE "points_against"='583';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_2010_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Nam the points for when tries for is 91 and played of 22
<|assistant|>
SELECT "points_for" FROM "2009_2010_table" WHERE "played"='22' AND "tries_for"='91';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_2010_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the drawn for tries for of 42
<|assistant|>
SELECT "drawn" FROM "2009_2010_table" WHERE "tries_for"='42';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_2010_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the Drawn for tries against of 36 and points of 66
<|assistant|>
SELECT "drawn" FROM "2009_2010_table" WHERE "tries_against"='36' AND "points"='66';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_2010_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the Try bonus with lost of 10
<|assistant|>
SELECT "try_bonus" FROM "2009_2010_table" WHERE "lost"='10';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2009_2010_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_against" text,
"tries_for" text,
"tries_against" text,
"try_bonus" text,
"losing_bonus" text,
"points" text
);
Question: Name the points for when points against is of 450
<|assistant|>
SELECT "points_for" FROM "2009_2010_table" WHERE "points_against"='450';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_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 the women's doubles at the same time the men's doubles had tijs creemers quinten van dalm?
<|assistant|>
SELECT "women_s_doubles" FROM "past_winners" WHERE "men_s_doubles"='tijs creemers quinten van dalm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_winners" (
"year" text,
"men_s_singles" text,
"women_s_singles" text,
"men_s_doubles" text,
"women_s_doubles" text,
"mixed_doubles" text
);
Question: what year saw georgy trouerbach nicole van hooren win the women's doubles?
<|assistant|>
SELECT "year" FROM "past_winners" WHERE "women_s_doubles"='georgy trouerbach nicole van hooren';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_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 the women's singles in 1992?
<|assistant|>
SELECT "women_s_singles" FROM "past_winners" WHERE "year"='1992';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_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 the women's singles at the same time the men's doubles was won by seno the uun santosa?
<|assistant|>
SELECT "women_s_singles" FROM "past_winners" WHERE "men_s_doubles"='seno the uun santosa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "past_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 the men's doubles in 1933?
<|assistant|>
SELECT "men_s_doubles" FROM "past_winners" WHERE "year"='1933';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: What was the 1st leg when Team 2 was Aurora?
<|assistant|>
SELECT "1st_leg" FROM "first_round" WHERE "team_2"='aurora';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: What was the 2nd leg when Team 1 was Chicago Croatian?
<|assistant|>
SELECT "2nd_leg" FROM "first_round" WHERE "team_1"='chicago croatian';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round" (
"team_1" text,
"agg" text,
"team_2" text,
"1st_leg" text,
"2nd_leg" text
);
Question: Who was Team 2 when Team 1 was América?
<|assistant|>
SELECT "team_2" FROM "first_round" WHERE "team_1"='américa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_two" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
Question: Which nationality do the Montreal Canadiens belong to with a pick# of 25?
<|assistant|>
SELECT "nationality" FROM "round_two" WHERE "nhl_team"='montreal canadiens' AND "pick_num"='25';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "round_two" (
"pick_num" text,
"player" text,
"position" text,
"nationality" text,
"nhl_team" text,
"college_junior_club_team" text
);
Question: What is the pick# for the California Golden Seals?
<|assistant|>
SELECT "pick_num" FROM "round_two" WHERE "nhl_team"='california golden seals';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: What was the Goal in Stade Roi Baudouin, Brussels?
<|assistant|>
SELECT AVG("goal") FROM "international_goals" WHERE "venue"='stade roi baudouin, brussels';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"venue" text,
"score" text,
"result" text,
"competition" text
);
Question: What Venue had 2 or more Goals in a Friendly Competition?
<|assistant|>
SELECT "venue" FROM "international_goals" WHERE "competition"='friendly' AND "goal">2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table_2_data_from_all_known_specimens_of" (
"number_cmnh" real,
"number_pnm" text,
"date" text,
"site" real,
"altitude" text,
"sex_and_other_data" text
);
Question: Which Site that has a Sex and other data of old male?
<|assistant|>
SELECT MAX("site") FROM "table_2_data_from_all_known_specimens_of" WHERE "sex_and_other_data"='old male';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "women" (
"sport" text,
"competition_name" text,
"competing_entities" text,
"age_groups" text,
"held_every" text
);
Question: What is the age group for figure skating?
<|assistant|>
SELECT "age_groups" FROM "women" WHERE "sport"='figure skating';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "women" (
"sport" text,
"competition_name" text,
"competing_entities" text,
"age_groups" text,
"held_every" text
);
Question: what is the sport when the age group is 21 or younger and the competition name is world youth netball championships?
<|assistant|>
SELECT "sport" FROM "women" WHERE "age_groups"='21 or younger' AND "competition_name"='world youth netball championships';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "women" (
"sport" text,
"competition_name" text,
"competing_entities" text,
"age_groups" text,
"held_every" text
);
Question: what is the competition name when the age group is 17 or younger for athletics?
<|assistant|>
SELECT "competition_name" FROM "women" WHERE "age_groups"='17 or younger' AND "sport"='athletics';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "women" (
"sport" text,
"competition_name" text,
"competing_entities" text,
"age_groups" text,
"held_every" text
);
Question: what is the competing entities when the age group is 18 or younger, held every is one year and the sport is table tennis?
<|assistant|>
SELECT "competing_entities" FROM "women" WHERE "age_groups"='18 or younger' AND "held_every"='one year' AND "sport"='table tennis';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "performances" (
"episode" text,
"song_choice" text,
"original_artist" text,
"order_num" text,
"result" text
);
Question: What result did Janis Ian have in the episode of top 3?
<|assistant|>
SELECT "result" FROM "performances" WHERE "episode"='top 3' AND "original_artist"='janis ian';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "performances" (
"episode" text,
"song_choice" text,
"original_artist" text,
"order_num" text,
"result" text
);
Question: What was the result of the singer with the top 8?
<|assistant|>
SELECT "result" FROM "performances" WHERE "episode"='top 8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "performances" (
"episode" text,
"song_choice" text,
"original_artist" text,
"order_num" text,
"result" text
);
Question: What song was chosen for the episode with the top 8?
<|assistant|>
SELECT "song_choice" FROM "performances" WHERE "episode"='top 8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "performances" (
"episode" text,
"song_choice" text,
"original_artist" text,
"order_num" text,
"result" text
);
Question: Which episode had Hoagy carmichael safe with an order of 5?
<|assistant|>
SELECT "episode" FROM "performances" WHERE "result"='safe' AND "order_num"='5' AND "original_artist"='hoagy carmichael';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "performances" (
"episode" text,
"song_choice" text,
"original_artist" text,
"order_num" text,
"result" text
);
Question: In what order were the Bee Gees as the artist when it was a result of bottom 3?
<|assistant|>
SELECT "order_num" FROM "performances" WHERE "result"='bottom 3' AND "original_artist"='bee gees';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final" (
"draw" real,
"country" text,
"language" text,
"artist" text,
"song" text,
"english_translation" text,
"result" text
);
Question: Name the total number of drawn for danish and mathias
<|assistant|>
SELECT COUNT("draw") FROM "final" WHERE "language"='danish' AND "artist"='mathias';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final" (
"draw" real,
"country" text,
"language" text,
"artist" text,
"song" text,
"english_translation" text,
"result" text
);
Question: Name the result for linn nygård
<|assistant|>
SELECT "result" FROM "final" WHERE "artist"='linn nygård';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final" (
"draw" real,
"country" text,
"language" text,
"artist" text,
"song" text,
"english_translation" text,
"result" text
);
Question: Name the song for draw less than 7 and artists of martin & johannes
<|assistant|>
SELECT "song" FROM "final" WHERE "draw"<7 AND "artist"='martin & johannes';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.