text
stringlengths 310
1.28k
|
|---|
<|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" text
);
Question: What is the highest heat when the nationality is poland, and the lane is smaller than 6?
<|assistant|>
SELECT MAX("heat") FROM "heats" WHERE "nationality"='poland' AND "lane"<6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "type_ii" (
"part_number" text,
"pins" text,
"body_width_mm" real,
"body_length_mm" real,
"lead_pitch_mm" real
);
Question: Which Lead Pitch/mm has a Body Width/mm larger than 10.16?
<|assistant|>
SELECT SUM("lead_pitch_mm") FROM "type_ii" WHERE "body_width_mm">10.16;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "type_ii" (
"part_number" text,
"pins" text,
"body_width_mm" real,
"body_length_mm" real,
"lead_pitch_mm" real
);
Question: How much Body Width/mm has a Part Number of tsop40/44, and a Body Length/mm smaller than 18.42?
<|assistant|>
SELECT SUM("body_width_mm") FROM "type_ii" WHERE "part_number"='tsop40/44' AND "body_length_mm"<18.42;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "type_ii" (
"part_number" text,
"pins" text,
"body_width_mm" real,
"body_length_mm" real,
"lead_pitch_mm" real
);
Question: Which Lead Pitch/mm has a Part Number of tsop24/28?
<|assistant|>
SELECT MAX("lead_pitch_mm") FROM "type_ii" WHERE "part_number"='tsop24/28';<|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
);
Question: What is the highest amount of silver when gold is 1 and bronze larger than 0?
<|assistant|>
SELECT MAX("silver") FROM "medal_table" WHERE "gold"=1 AND "bronze">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final" (
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"reaction_time" real
);
Question: What is the Time of the Athlete with a Reaction time of 0.164?
<|assistant|>
SELECT SUM("time") FROM "final" WHERE "reaction_time"=0.164;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final" (
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"reaction_time" real
);
Question: What is the Time of the Athlete in Lane 4?
<|assistant|>
SELECT COUNT("time") FROM "final" WHERE "lane"=4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final" (
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"reaction_time" real
);
Question: What is the Lane of the Athlete from Great Britain with a Reaction time of less than 0.218 and a Time larger than 44.74?
<|assistant|>
SELECT SUM("lane") FROM "final" WHERE "reaction_time"<0.218 AND "time">44.74 AND "nationality"='great britain';<|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,
"tv_time" text,
"attendance" text
);
Question: What is the time in week 3?
<|assistant|>
SELECT "tv_time" FROM "schedule" WHERE "week"=3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"tv_time" text,
"attendance" text
);
Question: What is the week with attendance of 73,572?
<|assistant|>
SELECT MAX("week") FROM "schedule" WHERE "attendance"='73,572';<|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,
"tv_time" text,
"attendance" text
);
Question: What week was the opponent the San Diego Chargers?
<|assistant|>
SELECT COUNT("week") FROM "schedule" WHERE "opponent"='san diego chargers';<|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,
"tv_time" text,
"attendance" text
);
Question: What week was the result of l 38–21?
<|assistant|>
SELECT MAX("week") FROM "schedule" WHERE "result"='l 38–21';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "single_game" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"opposition" text
);
Question: What's the total of Rank for the County of Galway and has a Total that's larger than 13?
<|assistant|>
SELECT SUM("rank") FROM "single_game" WHERE "county"='galway' AND "total">13;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "single_game" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"opposition" text
);
Question: What County has an Opposition of Antrim and the Player Bernie Forde?
<|assistant|>
SELECT "county" FROM "single_game" WHERE "opposition"='antrim' AND "player"='bernie forde';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "single_game" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"opposition" text
);
Question: What's the highest Rank for the County of Offaly, the Player of Mark Corrigan, and the Total that is smaller than 8?
<|assistant|>
SELECT MAX("rank") FROM "single_game" WHERE "county"='offaly' AND "player"='mark corrigan' AND "total"<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,
"channel" text,
"stadium" text,
"attendance" text
);
Question: Which Channel has an Opponent of washington redskins?
<|assistant|>
SELECT "channel" FROM "schedule" WHERE "opponent"='washington redskins';<|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,
"channel" text,
"stadium" text,
"attendance" text
);
Question: Which attendance has a Channel of espn, and a Date of september 5, 2002?
<|assistant|>
SELECT "attendance" FROM "schedule" WHERE "channel"='espn' AND "date"='september 5, 2002';<|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,
"channel" text,
"stadium" text,
"attendance" text
);
Question: Which Date has a Result of w 27–20?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "result"='w 27–20';<|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,
"channel" text,
"stadium" text,
"attendance" text
);
Question: Which Week has an Attendance of 63,447?
<|assistant|>
SELECT "week" FROM "schedule" WHERE "attendance"='63,447';<|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,
"channel" text,
"stadium" text,
"attendance" text
);
Question: Which Date has a Stadium of giants stadium, and a Week smaller than 13, and an Opponent of seattle seahawks?
<|assistant|>
SELECT "date" FROM "schedule" WHERE "stadium"='giants stadium' AND "week"<13 AND "opponent"='seattle seahawks';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_2" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
Question: Who was the athlete with react of 0.185?
<|assistant|>
SELECT "athlete" FROM "heat_2" WHERE "react"=0.185;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_2" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
Question: What's the smallest react of Zimbabwe, ranked after 1 in a lane after 3 and a time less than 20.3?
<|assistant|>
SELECT MIN("react") FROM "heat_2" WHERE "lane">3 AND "time"<20.3 AND "nationality"='zimbabwe' AND "rank">1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "racial_composition" (
"municipality_2010" text,
"white_both_hispanic_and_non_hispanic" real,
"black_both_hispanic_and_non_hispanic" real,
"amerindian_both_hispanic_and_non_hispanic" real,
"n_asia_both_hispanic_and_non_hispanic" real,
"multiracial_both_hispanic_and_non_hispanic" real,
"hispanic_of_any_race" real
);
Question: What is the total number of white (Hispanic/Non-Hispanic) having a black (Hispanic/Non-Hispanic) of 9.9 and Hispanic under 99.5?
<|assistant|>
SELECT COUNT("white_both_hispanic_and_non_hispanic") FROM "racial_composition" WHERE "black_both_hispanic_and_non_hispanic"=9.9 AND "hispanic_of_any_race"<99.5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "racial_composition" (
"municipality_2010" text,
"white_both_hispanic_and_non_hispanic" real,
"black_both_hispanic_and_non_hispanic" real,
"amerindian_both_hispanic_and_non_hispanic" real,
"n_asia_both_hispanic_and_non_hispanic" real,
"multiracial_both_hispanic_and_non_hispanic" real,
"hispanic_of_any_race" real
);
Question: What is the average black value (Hispanic/Non-Hispanic) having a white (Hispanic/Non-Hispanic) under 61.9, Multiracial (Hispanic/Non-Hispanic) under 12.5 and Hispanic under 99.4?
<|assistant|>
SELECT AVG("black_both_hispanic_and_non_hispanic") FROM "racial_composition" WHERE "white_both_hispanic_and_non_hispanic"<61.9 AND "multiracial_both_hispanic_and_non_hispanic"<12.5 AND "hispanic_of_any_race"<99.4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "racial_composition" (
"municipality_2010" text,
"white_both_hispanic_and_non_hispanic" real,
"black_both_hispanic_and_non_hispanic" real,
"amerindian_both_hispanic_and_non_hispanic" real,
"n_asia_both_hispanic_and_non_hispanic" real,
"multiracial_both_hispanic_and_non_hispanic" real,
"hispanic_of_any_race" real
);
Question: What is the highest Amerindian (Hispanic/Non-Hispanic) value having a Black (Hispanic/Non-Hispanic) of 15.7 and White (Hispanic/Non-Hispanic) over 69.5?
<|assistant|>
SELECT MAX("amerindian_both_hispanic_and_non_hispanic") FROM "racial_composition" WHERE "black_both_hispanic_and_non_hispanic"=15.7 AND "white_both_hispanic_and_non_hispanic">69.5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "racial_composition" (
"municipality_2010" text,
"white_both_hispanic_and_non_hispanic" real,
"black_both_hispanic_and_non_hispanic" real,
"amerindian_both_hispanic_and_non_hispanic" real,
"n_asia_both_hispanic_and_non_hispanic" real,
"multiracial_both_hispanic_and_non_hispanic" real,
"hispanic_of_any_race" real
);
Question: What is the Black (Hispanic/Non-Hispanic) value having a white (Hispanic/Non-Hispanic) under 80.6, Asian (Hispanic/Non-Hispanic) of 0.1, Amerindian (Hispanic/Non-Hispanic) under 0.6000000000000001, and municipality of Vega Baja?
<|assistant|>
SELECT "black_both_hispanic_and_non_hispanic" FROM "racial_composition" WHERE "white_both_hispanic_and_non_hispanic"<80.6 AND "n_asia_both_hispanic_and_non_hispanic"=0.1 AND "amerindian_both_hispanic_and_non_hispanic"<0.6000000000000001 AND "municipality_2010"='vega baja';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_by_season_records" (
"season" text,
"div" text,
"pos" text,
"pld" text,
"pts" text
);
Question: What season had 3rd position, a 36 pld, and a bbl div?
<|assistant|>
SELECT "season" FROM "season_by_season_records" WHERE "pos"='3rd' AND "pld"='36' AND "div"='bbl';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_by_season_records" (
"season" text,
"div" text,
"pos" text,
"pld" text,
"pts" text
);
Question: What season has 36 pld, a bbl div, and 6th position?
<|assistant|>
SELECT "season" FROM "season_by_season_records" WHERE "pld"='36' AND "div"='bbl' AND "pos"='6th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_by_season_records" (
"season" text,
"div" text,
"pos" text,
"pld" text,
"pts" text
);
Question: What season had 6th position and 36 points?
<|assistant|>
SELECT "season" FROM "season_by_season_records" WHERE "pos"='6th' AND "pts"='36';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_by_season_records" (
"season" text,
"div" text,
"pos" text,
"pld" text,
"pts" text
);
Question: What season had 1st position, 33 pld, and 58 points?
<|assistant|>
SELECT "season" FROM "season_by_season_records" WHERE "pos"='1st' AND "pld"='33' AND "pts"='58';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "wales" (
"player" text,
"int_l_debut" text,
"year" real,
"cross_code_debut" text,
"date" text,
"position" text
);
Question: Which player had a Cross Code Debut of the RL test v France, International Debut of RU Test v Ireland in years after 1955?
<|assistant|>
SELECT "player" FROM "wales" WHERE "cross_code_debut"='rl test v france' AND "year">1955 AND "int_l_debut"='ru test v ireland';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text
);
Question: Which School has a Mascot of generals?
<|assistant|>
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "mascot"='generals';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text
);
Question: Which School has an IHSAA Class of aaa, and a Mascot of saints?
<|assistant|>
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_class"='aaa' AND "mascot"='saints';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text
);
Question: What is the highest enrollment in Lagrange where the mascot is panthers?
<|assistant|>
SELECT MAX("enrollment") FROM "indiana_high_school_athletics_conference" WHERE "location"='lagrange' AND "mascot"='panthers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text
);
Question: What is the enrollment at the school of Hamilton community?
<|assistant|>
SELECT AVG("enrollment") FROM "indiana_high_school_athletics_conference" WHERE "school"='hamilton community';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text
);
Question: What school that has a IHSAA Class of AA, in Butler?
<|assistant|>
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_class"='aa' AND "location"='butler';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text
);
Question: What is the mascot at Hamilton Community?
<|assistant|>
SELECT "mascot" FROM "indiana_high_school_athletics_conference" WHERE "school"='hamilton community';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text
);
Question: What school is in Lagrange, with an IHSAA Class of aaa?
<|assistant|>
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "location"='lagrange' AND "ihsaa_class"='aaa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"enrollment" real,
"ihsaa_class" text,
"num_county" text
);
Question: What school is in Ligonier?
<|assistant|>
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "location"='ligonier';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_most_olympic_medals_over_career" (
"rank" real,
"nation" text,
"sport" text,
"years" text,
"games" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the total in 2000–2012, with more than 2 silver, 0 Bronze, and a Rank smaller than 70?
<|assistant|>
SELECT SUM("total") FROM "list_of_most_olympic_medals_over_career" WHERE "years"='2000–2012' AND "silver">2 AND "bronze"=0 AND "rank"<70;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_most_olympic_medals_over_career" (
"rank" real,
"nation" text,
"sport" text,
"years" text,
"games" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What nation scored 7 in shooting in 1920?
<|assistant|>
SELECT "nation" FROM "list_of_most_olympic_medals_over_career" WHERE "sport"='shooting' AND "total"=7 AND "years"='1920';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "amateur_draft" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"college_junior_club_team" text
);
Question: What's the average Round of Pete Laframboise?
<|assistant|>
SELECT AVG("round") FROM "amateur_draft" WHERE "player"='pete laframboise';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "amateur_draft" (
"round" real,
"pick" real,
"player" text,
"nationality" text,
"college_junior_club_team" text
);
Question: What country is Pick 100?
<|assistant|>
SELECT "nationality" FROM "amateur_draft" WHERE "pick"=100;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_2" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: Who were the rowers for Great britain?
<|assistant|>
SELECT "rowers" FROM "heat_2" WHERE "country"='great britain';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_2" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What country has a time of 7:28.66 and a rank less than 3?
<|assistant|>
SELECT "country" FROM "heat_2" WHERE "rank"<3 AND "time"='7:28.66';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_2" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What are the notes when the time was 7:42.92 and the rank is more than 1?
<|assistant|>
SELECT "notes" FROM "heat_2" WHERE "rank">1 AND "time"='7:42.92';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: What's the score of Tie number 11?
<|assistant|>
SELECT "score" FROM "fourth_round_proper" WHERE "tie_no"='11';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: What's the tie number when the away team was Mansfield Town?
<|assistant|>
SELECT "tie_no" FROM "fourth_round_proper" WHERE "away_team"='mansfield town';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: What date was Newcastle United the away team?
<|assistant|>
SELECT "date" FROM "fourth_round_proper" WHERE "away_team"='newcastle united';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: Who was the away team when Brighton & Hove Albion was home?
<|assistant|>
SELECT "away_team" FROM "fourth_round_proper" WHERE "home_team"='brighton & hove albion';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: What's the tie number of Chelsea when they were home?
<|assistant|>
SELECT "tie_no" FROM "fourth_round_proper" WHERE "home_team"='chelsea';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "fourth_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"date" text
);
Question: What's the score when Orient was home?
<|assistant|>
SELECT "score" FROM "fourth_round_proper" WHERE "home_team"='orient';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_4" (
"restaurant_name" text,
"original_name" text,
"location" text,
"chef" text,
"designer" text,
"still_open" text
);
Question: What designer has a restaurant named The Citizen?
<|assistant|>
SELECT "designer" FROM "season_4" WHERE "restaurant_name"='the citizen';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_4" (
"restaurant_name" text,
"original_name" text,
"location" text,
"chef" text,
"designer" text,
"still_open" text
);
Question: What is the original name of the place by designer Glen Peloso with a Location of n/a?
<|assistant|>
SELECT "original_name" FROM "season_4" WHERE "designer"='glen peloso' AND "location"='n/a';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_4" (
"restaurant_name" text,
"original_name" text,
"location" text,
"chef" text,
"designer" text,
"still_open" text
);
Question: What chef that has a location in Toronto, ON, that has n/a as the original name, and a Restaurant Name of Bagel World?
<|assistant|>
SELECT "chef" FROM "season_4" WHERE "location"='toronto, on' AND "original_name"='n/a' AND "restaurant_name"='bagel world';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_4" (
"restaurant_name" text,
"original_name" text,
"location" text,
"chef" text,
"designer" text,
"still_open" text
);
Question: What is the name of the restaurant originally named Essence?
<|assistant|>
SELECT "restaurant_name" FROM "season_4" WHERE "original_name"='essence';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_4" (
"restaurant_name" text,
"original_name" text,
"location" text,
"chef" text,
"designer" text,
"still_open" text
);
Question: What designer has a restaurant named of Cork & Cabbage?
<|assistant|>
SELECT "designer" FROM "season_4" WHERE "restaurant_name"='cork & cabbage';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "players_who_have_tested_positive_for_ban" (
"athlete" text,
"nation" text,
"olympics" real,
"substance" text,
"punishment" text
);
Question: Which athlete had a six month suspension from IIHF?
<|assistant|>
SELECT "athlete" FROM "players_who_have_tested_positive_for_ban" WHERE "punishment"='six month suspension from iihf';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championships_total_medals" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many bronze medals did the team have with 0 total silver and less than 3 total medals?
<|assistant|>
SELECT "bronze" FROM "world_championships_total_medals" WHERE "total"<3 AND "silver">0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_championships_total_medals" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the total number of bronze medals for the team with more than 4 silver and less than 30 gold medals?
<|assistant|>
SELECT COUNT("bronze") FROM "world_championships_total_medals" WHERE "silver">4 AND "nation"='total' AND "gold"<30;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "dressage" (
"rank" text,
"rider" text,
"horse" text,
"nation" text,
"judge_e" text,
"judge_c" text,
"judge_m" text,
"penalty_points" real
);
Question: what is the least penalty points when the judge e is 72.22?
<|assistant|>
SELECT MIN("penalty_points") FROM "dressage" WHERE "judge_e"='72.22';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "dressage" (
"rank" text,
"rider" text,
"horse" text,
"nation" text,
"judge_e" text,
"judge_c" text,
"judge_m" text,
"penalty_points" real
);
Question: what is the judge e when judge c is 56.67 and the rider is dag albert?
<|assistant|>
SELECT "judge_e" FROM "dressage" WHERE "judge_c"='56.67' AND "rider"='dag albert';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "dressage" (
"rank" text,
"rider" text,
"horse" text,
"nation" text,
"judge_e" text,
"judge_c" text,
"judge_m" text,
"penalty_points" real
);
Question: what is the nation when the penalty points is less than 40.2 and judge e is 82.22?
<|assistant|>
SELECT "nation" FROM "dressage" WHERE "penalty_points"<40.2 AND "judge_e"='82.22';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "dressage" (
"rank" text,
"rider" text,
"horse" text,
"nation" text,
"judge_e" text,
"judge_c" text,
"judge_m" text,
"penalty_points" real
);
Question: what is the rank when judge m is 65.93 and judge e is 65.56?
<|assistant|>
SELECT "rank" FROM "dressage" WHERE "judge_m"='65.93' AND "judge_e"='65.56';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "dressage" (
"rank" text,
"rider" text,
"horse" text,
"nation" text,
"judge_e" text,
"judge_c" text,
"judge_m" text,
"penalty_points" real
);
Question: what is the horse that ranked 69?
<|assistant|>
SELECT "horse" FROM "dressage" WHERE "rank"='69';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1941" (
"title" text,
"series" text,
"director" text,
"production_number" text,
"release_date" text,
"reissue" text
);
Question: Name the Production Number with a Director of friz freleng, and a Title of wacky worm, the?
<|assistant|>
SELECT "production_number" FROM "1941" WHERE "director"='friz freleng' AND "title"='wacky worm, the';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1941" (
"title" text,
"series" text,
"director" text,
"production_number" text,
"release_date" text,
"reissue" text
);
Question: Name the Series with Production Number of 95, br 1254?
<|assistant|>
SELECT "series" FROM "1941" WHERE "production_number"='95, br 1254';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1941" (
"title" text,
"series" text,
"director" text,
"production_number" text,
"release_date" text,
"reissue" text
);
Question: Which reissue has a Production Number of 9853?
<|assistant|>
SELECT "reissue" FROM "1941" WHERE "production_number"='9853';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1941" (
"title" text,
"series" text,
"director" text,
"production_number" text,
"release_date" text,
"reissue" text
);
Question: Name the Series with a Title of elmer's pet rabbit?
<|assistant|>
SELECT "series" FROM "1941" WHERE "title"='elmer''s pet rabbit';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "houses" (
"house" text,
"abbr" text,
"type" text,
"colour" text,
"boarding_day" text
);
Question: What is the Boarding/Day value for a type of old and house of Saunderites?
<|assistant|>
SELECT "boarding_day" FROM "houses" WHERE "type"='old' AND "house"='saunderites';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "houses" (
"house" text,
"abbr" text,
"type" text,
"colour" text,
"boarding_day" text
);
Question: Which house has an abbreviation of G?
<|assistant|>
SELECT "house" FROM "houses" WHERE "abbr"='g';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "houses" (
"house" text,
"abbr" text,
"type" text,
"colour" text,
"boarding_day" text
);
Question: Which house has a Boarding/Day value of Day?
<|assistant|>
SELECT "house" FROM "houses" WHERE "boarding_day"='day';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "houses" (
"house" text,
"abbr" text,
"type" text,
"colour" text,
"boarding_day" text
);
Question: Which house has an abbreviation of D?
<|assistant|>
SELECT "house" FROM "houses" WHERE "abbr"='d';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "houses" (
"house" text,
"abbr" text,
"type" text,
"colour" text,
"boarding_day" text
);
Question: Which type has an abbreviation of B and Boarding/Day value of Boarding?
<|assistant|>
SELECT "type" FROM "houses" WHERE "boarding_day"='boarding' AND "abbr"='b';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "houses" (
"house" text,
"abbr" text,
"type" text,
"colour" text,
"boarding_day" text
);
Question: Which type has a color of Dark Blue?
<|assistant|>
SELECT "type" FROM "houses" WHERE "colour"='dark blue';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"season" real,
"team" text,
"league" text,
"games" text,
"total_tackles" text,
"solo" text,
"tfl" text,
"sacks" text,
"int" text
);
Question: what is the total tackles when the games is 16 and solo is 88?
<|assistant|>
SELECT "total_tackles" FROM "statistics" WHERE "games"='16' AND "solo"='88';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"season" real,
"team" text,
"league" text,
"games" text,
"total_tackles" text,
"solo" text,
"tfl" text,
"sacks" text,
"int" text
);
Question: what is the team when sacks is 0 and the season is earlier than 1998?
<|assistant|>
SELECT "team" FROM "statistics" WHERE "sacks"='0' AND "season"<1998;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "statistics" (
"season" real,
"team" text,
"league" text,
"games" text,
"total_tackles" text,
"solo" text,
"tfl" text,
"sacks" text,
"int" text
);
Question: what is solo when total tackles is 6?
<|assistant|>
SELECT "solo" FROM "statistics" WHERE "total_tackles"='6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
Question: How many FA cup goals did dick taylor score in the year that he had 0 league goals?
<|assistant|>
SELECT MIN("fa_cup_goals") FROM "appearances_and_goals" WHERE "name"='dick taylor' AND "league_goals"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" text,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
Question: What is the goals number of goals for the player who had 2 league cup apps and 0 FA cup goals?
<|assistant|>
SELECT COUNT("total_goals") FROM "appearances_and_goals" WHERE "league_cup_apps"='2' AND "fa_cup_goals"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
Question: What was the result of week 11?
<|assistant|>
SELECT "result" FROM "schedule" WHERE "week"=11;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: What is Lisbeth Trickett's time?
<|assistant|>
SELECT COUNT("time") FROM "semifinal_1" WHERE "name"='lisbeth trickett';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: What is the average rank for 57.05 time?
<|assistant|>
SELECT AVG("rank") FROM "semifinal_1" WHERE "time"<57.05;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_1" (
"rank" real,
"lane" real,
"name" text,
"nationality" text,
"time" real
);
Question: What lane is from Great Britain and a 57.78 time?
<|assistant|>
SELECT COUNT("lane") FROM "semifinal_1" WHERE "nationality"='great britain' AND "time">57.78;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "analogue_terrestrial_television" (
"name" text,
"network" text,
"owner" text,
"launch_date" text,
"channel_bkk" text,
"broadcasting_area" text,
"transmitted_area" text,
"broadcasting_hours" text
);
Question: Who's the owner of Sanam Pao as the broadcasting area?
<|assistant|>
SELECT "owner" FROM "analogue_terrestrial_television" WHERE "broadcasting_area"='sanam pao';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "analogue_terrestrial_television" (
"name" text,
"network" text,
"owner" text,
"launch_date" text,
"channel_bkk" text,
"broadcasting_area" text,
"transmitted_area" text,
"broadcasting_hours" text
);
Question: Who's the owner of channel 3/32 (vhf/uhf) broadcasting 24-hours?
<|assistant|>
SELECT "owner" FROM "analogue_terrestrial_television" WHERE "broadcasting_hours"='24-hours' AND "channel_bkk"='3/32 (vhf/uhf)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "analogue_terrestrial_television" (
"name" text,
"network" text,
"owner" text,
"launch_date" text,
"channel_bkk" text,
"broadcasting_area" text,
"transmitted_area" text,
"broadcasting_hours" text
);
Question: Who's the owner of Thai PBS?
<|assistant|>
SELECT "owner" FROM "analogue_terrestrial_television" WHERE "name"='thai pbs';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "analogue_terrestrial_television" (
"name" text,
"network" text,
"owner" text,
"launch_date" text,
"channel_bkk" text,
"broadcasting_area" text,
"transmitted_area" text,
"broadcasting_hours" text
);
Question: What's the network of BBTV Channel 7?
<|assistant|>
SELECT "network" FROM "analogue_terrestrial_television" WHERE "name"='bbtv channel 7';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "analogue_terrestrial_television" (
"name" text,
"network" text,
"owner" text,
"launch_date" text,
"channel_bkk" text,
"broadcasting_area" text,
"transmitted_area" text,
"broadcasting_hours" text
);
Question: What's the name of Channel 29 (UHF)?
<|assistant|>
SELECT "name" FROM "analogue_terrestrial_television" WHERE "channel_bkk"='29 (uhf)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "analogue_terrestrial_television" (
"name" text,
"network" text,
"owner" text,
"launch_date" text,
"channel_bkk" text,
"broadcasting_area" text,
"transmitted_area" text,
"broadcasting_hours" text
);
Question: What's the broadcasting hours of NBT?
<|assistant|>
SELECT "broadcasting_hours" FROM "analogue_terrestrial_television" WHERE "network"='nbt';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "lpga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: Who were the runners-up in the tournament on May 26, 1996?
<|assistant|>
SELECT "runner_s_up" FROM "lpga_tour_wins_13" WHERE "date"='may 26, 1996';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "lpga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: Which tournament had a runner-up of Val Skinner?
<|assistant|>
SELECT "tournament" FROM "lpga_tour_wins_13" WHERE "runner_s_up"='val skinner';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "lpga_tour_wins_13" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_victory" text,
"runner_s_up" text
);
Question: What was Rosie's winning score on Apr 29, 2001?
<|assistant|>
SELECT "winning_score" FROM "lpga_tour_wins_13" WHERE "date"='apr 29, 2001';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1947" (
"title" text,
"series" text,
"director" text,
"production_number" text,
"release_date" text,
"reissue" text
);
Question: What was the release date of the feature with a production number of 1018, BR 1352?
<|assistant|>
SELECT "release_date" FROM "1947" WHERE "production_number"='1018, br 1352';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1947" (
"title" text,
"series" text,
"director" text,
"production_number" text,
"release_date" text,
"reissue" text
);
Question: What is the reissue value for the feature titled "Catch as Cats Can"?
<|assistant|>
SELECT "reissue" FROM "1947" WHERE "title"='catch as cats can';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
Question: what is the name when the constituency number is 150?
<|assistant|>
SELECT "name" FROM "assembly_segments" WHERE "constituency_number"='150';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "assembly_segments" (
"constituency_number" text,
"name" text,
"reserved_for_sc_st_none" text,
"district" text,
"number_of_electorates_2009" real
);
Question: what is the total number of electorates (2009) when the name is govindpura?
<|assistant|>
SELECT COUNT("number_of_electorates_2009") FROM "assembly_segments" WHERE "name"='govindpura';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_ten_medals" (
"rank" real,
"province" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: What is the rank of Si Sa Ket province with less than 14 bronze medals?
<|assistant|>
SELECT COUNT("rank") FROM "top_ten_medals" WHERE "province"='si sa ket' AND "bronze"<14;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_ten_medals" (
"rank" real,
"province" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many total medals does rank 3 with less than 40 silver medals?
<|assistant|>
SELECT MAX("total") FROM "top_ten_medals" WHERE "silver"<40 AND "rank"=3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "top_ten_medals" (
"rank" real,
"province" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: How many average gold medals for provinces higher than rank 9 with 25 bronzes?
<|assistant|>
SELECT AVG("gold") FROM "top_ten_medals" WHERE "bronze"=25 AND "rank"<9;<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.