instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_1337525_1 (
region_1 VARCHAR,
region_4 VARCHAR,
complete_series VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the region 1 where region 4 is tba is the complete eighth series?
| SELECT region_1 FROM table_1337525_1 WHERE region_4 = "TBA" AND complete_series = "The Complete Eighth Series" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
... | SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '08218858' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2020-10-17') | css |
CREATE TABLE table_name_92 (
hanzi VARCHAR,
regional_population_2010_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Hanzi has a Regional Population of 4,591,972 in 2010?
| SELECT hanzi FROM table_name_92 WHERE regional_population_2010_ = "4,591,972" | sql_create_context |
CREATE TABLE table_2840500_2 (
player VARCHAR,
nhl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many players were drafted by the Edmonton Oilers?
| SELECT COUNT(player) FROM table_2840500_2 WHERE nhl_team = "Edmonton Oilers" | sql_create_context |
CREATE TABLE table_name_22 (
score VARCHAR,
tie_no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Score has a Tie no of 1?
| SELECT score FROM table_name_22 WHERE tie_no = "1" | sql_create_context |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT SUM(t_kc24.PER_ACC_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '邹鹏举' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2013-09-04' AND '2019-06-28' | css |
CREATE TABLE table_19760_1 (
understanding VARCHAR,
reason VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the understanding of the one that has nous reasoning?
| SELECT understanding FROM table_19760_1 WHERE reason = "νοῦς Nous" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ATRIAL FIBRILLATION\THORACOSCOPIC MAZE PROCEDURE BILATERAL/SDA" AND demographic.age < "68" | mimicsql_data |
CREATE TABLE table_44540 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is To Par, when Player is K. J. Choi?
| SELECT "To par" FROM table_44540 WHERE "Player" = 'k. j. choi' | wikisql |
CREATE TABLE table_15581223_8 (
tackles INTEGER,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least amount of tackles for danny clark
| SELECT MIN(tackles) FROM table_15581223_8 WHERE player = "Danny Clark" | sql_create_context |
CREATE TABLE table_name_47 (
spouse VARCHAR,
birth VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the Spouse of the Duchess that has a Birth on 29 october 1451?
| SELECT spouse FROM table_name_47 WHERE birth = "29 october 1451" | sql_create_context |
CREATE TABLE table_53915 (
"Number & Name" text,
"Description" text,
"Livery" text,
"Owner(s)" text,
"Date" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the number & name for the date after 1954?
| SELECT "Number & Name" FROM table_53915 WHERE "Date" > '1954' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2120" AND diagnoses.long_title = "Hemoptysis, unspecified" | mimicsql_data |
CREATE TABLE table_name_2 (
frequency INTEGER,
callsign VARCHAR,
webcast VARCHAR,
city_of_license VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which long range AM station has the lowest frequency and includes a webcast of listen live, was licensed ... | SELECT MIN(frequency) FROM table_name_2 WHERE webcast = "listen live" AND city_of_license = "monterrey" AND callsign = "xet" | sql_create_context |
CREATE TABLE table_10361625_1 (
round INTEGER,
overall VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the greatest round of overall 83?
| SELECT MAX(round) FROM table_10361625_1 WHERE overall = 83 | sql_create_context |
CREATE TABLE table_11345 (
"Rank" real,
"Player" text,
"Country" text,
"Earnings ( $ )" real,
"Events" real,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the low win total for players ranked below 4?
| SELECT MIN("Wins") FROM table_11345 WHERE "Rank" > '4' | wikisql |
CREATE TABLE table_6103 (
"Celebrity" text,
"Known for" text,
"Entered" text,
"Exited" text,
"Finished" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who exited on Day 12?
| SELECT "Celebrity" FROM table_6103 WHERE "Exited" = 'day 12' | wikisql |
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_nam... | SELECT facility_code, COUNT(facility_code) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4 GROUP BY facility_code | nvbench |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT MED_EXP_DET_ID FROM t_kc22 WHERE MED_CLINIC_ID = '41826058654' AND (REMOTE_SETTLE_FLG = '异地1' OR REMOTE_SETTLE_FLG = '异地2') | css |
CREATE TABLE table_name_58 (
second VARCHAR,
home VARCHAR,
team VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the second of the North America team from Edmonton, Canada?
| SELECT second FROM table_name_58 WHERE team = "north america" AND country = "canada" AND home = "edmonton" | sql_create_context |
CREATE TABLE table_26129 (
"Election Year" real,
"Assembly" text,
"Winning Party/Coalition" text,
"Chief Minister" text,
"Speaker" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the speaker is Munu Adhi (2) K. Rajaram, what is the election year m... | SELECT MAX("Election Year") FROM table_26129 WHERE "Speaker" = 'Munu Adhi (2) K. Rajaram' | wikisql |
CREATE TABLE table_20274 (
"Name" text,
"Overs Bowled" text,
"Maidens" real,
"Runs Conceded" real,
"Wickets" real,
"Extras" real,
"E.R." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most runs conceded
| SELECT MAX("Runs Conceded") FROM table_20274 | wikisql |
CREATE TABLE table_23287683_1 (
title VARCHAR,
directed_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many episodes were directed by Sarah Pia Anderson?
| SELECT COUNT(title) FROM table_23287683_1 WHERE directed_by = "Sarah Pia Anderson" | sql_create_context |
CREATE TABLE Document_locations (
location_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location code with the most documents?
| SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1 | sql_create_context |
CREATE TABLE table_name_7 (
English VARCHAR,
winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which English winning song had the winner aris runtuwene?
| SELECT WINNING_SONG(English AS Title) FROM table_name_7 WHERE winner = "aris runtuwene" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,... | SELECT JCZBMC, JCZBJGDW, AVG(JCZBJGDL) FROM jyjgzbb WHERE YLJGDM = '7418379' AND BGRQ BETWEEN '2008-06-02' AND '2011-05-19' GROUP BY JCZBMC, JCZBJGDW ORDER BY AVG(JCZBJGDL) LIMIT 1 | css |
CREATE TABLE table_name_80 (
frequency_mhz VARCHAR,
erp_w VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the frequence MHz for ERP W of 55
| SELECT frequency_mhz FROM table_name_80 WHERE erp_w = 55 | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Tizanidine" | mimicsql_data |
CREATE TABLE wrestler (
Wrestler_ID int,
Name text,
Reign text,
Days_held text,
Location text,
Event text
)
CREATE TABLE Elimination (
Elimination_ID text,
Wrestler_ID text,
Team text,
Eliminated_By text,
Elimination_Move text,
Time text
)
-- Using valid SQLite, answer... | SELECT Team, COUNT(*) FROM Elimination GROUP BY Team ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_name_51 (
city VARCHAR,
iata VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the City with an IATA of MUC?
| SELECT city FROM table_name_51 WHERE iata = "muc" | sql_create_context |
CREATE TABLE table_60181 (
"Week" text,
"Theme" text,
"Song Sung" text,
"Artist" text,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Status does Freddie Jackson have?
| SELECT "Status" FROM table_60181 WHERE "Artist" = 'freddie jackson' | wikisql |
CREATE TABLE table_37842 (
"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
)
-- Using valid SQLite, answer the following questions for the tables provi... | SELECT "Try bonus" FROM table_37842 WHERE "Tries against" = '19' | wikisql |
CREATE TABLE table_1999350_1 (
playoffs VARCHAR,
open_canada_cup VARCHAR,
regular_season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the playoffs result in years where Open Canada Cup was 'N/A' and regular season result was '2nd, New England'?... | SELECT playoffs FROM table_1999350_1 WHERE open_canada_cup = "N/A" AND regular_season = "2nd, New England" | sql_create_context |
CREATE TABLE table_63007 (
"Rank" real,
"Heat" real,
"Athlete" text,
"Country" text,
"Time" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average heat ranked at 30?
| SELECT AVG("Heat") FROM table_63007 WHERE "Rank" = '30' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "COLANGITIS" AND demographic.admityear < "2125" | mimicsql_data |
CREATE TABLE table_45197 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the tie no when Oxford city was the away team?
| SELECT "Tie no" FROM table_45197 WHERE "Away team" = 'oxford city' | wikisql |
CREATE TABLE table_name_62 (
defending_forces VARCHAR,
population VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which defending forces has a population of 230?
| SELECT defending_forces FROM table_name_62 WHERE population = "230" | sql_create_context |
CREATE TABLE table_24648983_1 (
title VARCHAR,
us_viewers__million_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the episode that had 9.89 million U.S. viewers?
| SELECT title FROM table_24648983_1 WHERE us_viewers__million_ = "9.89" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-16601')) AND DATETIME(medication.drugstarttime, 'start of year') = DATETIM... | eicu |
CREATE TABLE table_name_78 (
place VARCHAR,
country VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Place when Fuzzy Zoeller plated in the United States?
| SELECT place FROM table_name_78 WHERE country = "united states" AND player = "fuzzy zoeller" | sql_create_context |
CREATE TABLE table_2562113_1 (
type VARCHAR,
institution VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What type of institution is San Diego Christian college?
| SELECT type FROM table_2562113_1 WHERE institution = "San Diego Christian College" | sql_create_context |
CREATE TABLE table_30434 (
"Club name" text,
"Name of team song" text,
"Basis for team song" text,
"First used as team song" text,
"Writer/composer" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many team songs does fremantle have?
| SELECT COUNT("Basis for team song") FROM table_30434 WHERE "Club name" = 'Fremantle' | wikisql |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT Posts.Id AS "post_link", Posts.OwnerDisplayName, Posts.CreationDate, Votes.VoteTypeId, Votes.UserId FROM Posts JOIN Votes ON Votes.PostId = Posts.Id WHERE Posts.PostTypeId = 1 ORDER BY Posts.CreationDate DESC LIMIT 200 | sede |
CREATE TABLE table_14984050_1 (
week VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of weeks for 50073 attendance
| SELECT COUNT(week) FROM table_14984050_1 WHERE attendance = 50073 | sql_create_context |
CREATE TABLE table_name_75 (
position VARCHAR,
round VARCHAR,
pick VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Position has a Round smaller than 5, and a Pick of 5?
| SELECT position FROM table_name_75 WHERE round < 5 AND pick = 5 | sql_create_context |
CREATE TABLE table_69083 (
"Name" text,
"Creator" text,
"Latest stable version" text,
"Standard cost (USD)" text,
"Software license" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Standard cost (USD) by hans Oischinger Creator ?
| SELECT "Standard cost (USD)" FROM table_69083 WHERE "Creator" = 'hans oischinger' | wikisql |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Methadone" | mimicsql_data |
CREATE TABLE table_1425958_1 (
density__pop_km²_ VARCHAR,
_percentage_change VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the change is 8.8%, what is the density (pop/km )?
| SELECT density__pop_km²_ FROM table_1425958_1 WHERE _percentage_change = "8.8" | sql_create_context |
CREATE TABLE table_name_75 (
result VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result when the record was 62 12?
| SELECT result FROM table_name_75 WHERE record = "62–12" | sql_create_context |
CREATE TABLE table_57509 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What dates were the matches at windy hill?
| SELECT "Date" FROM table_57509 WHERE "Venue" = 'windy hill' | wikisql |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_typ... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 94229)) AND STRFTIME('%y-%m-%d', outputeve... | mimic_iii |
CREATE TABLE table_6868 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Top-25 when events shows 12, the top-5 is 1, a... | SELECT MIN("Top-25") FROM table_6868 WHERE "Events" = '12' AND "Top-5" = '1' AND "Cuts made" < '11' | wikisql |
CREATE TABLE table_28397 (
"Institution" text,
"Location" text,
"Nickname" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined MAC" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year did the the school with the nickname eagle... | SELECT MIN("Joined MAC") FROM table_28397 WHERE "Nickname" = 'Eagles' | wikisql |
CREATE TABLE table_name_40 (
opponent VARCHAR,
march VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which opponent was present on March 28?
| SELECT opponent FROM table_name_40 WHERE march = 28 | sql_create_context |
CREATE TABLE table_23915973_1 (
coverage VARCHAR,
power_kw VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the coverage when power kw is 25kw?
| SELECT coverage FROM table_23915973_1 WHERE power_kw = "25kW" | sql_create_context |
CREATE TABLE table_55155 (
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine \u2020" text,
"Tyre" text,
"Driver" text,
"Rounds" text,
"Free Practice driver(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the construct... | SELECT "Constructor" FROM table_55155 WHERE "Driver" = 'juan pablo montoya' | wikisql |
CREATE TABLE table_9070 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which date has a Week smaller than 14, and an Opponent of san francisco 49ers?
| SELECT "Date" FROM table_9070 WHERE "Week" < '14' AND "Opponent" = 'san francisco 49ers' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD ... | SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4511217' AND t_kc21.HOSP_STS > 0 | css |
CREATE TABLE table_76322 (
"Game" real,
"January" real,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the total number of games on January 20?
| SELECT COUNT("Game") FROM table_76322 WHERE "January" = '20' | wikisql |
CREATE TABLE dorm (
dorm_name VARCHAR,
gender VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the name of dorms only for female (F gender).
| SELECT dorm_name FROM dorm WHERE gender = 'F' | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE txmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
K... | SELECT jybgb.BGDH FROM hz_info JOIN txmzjzjlb JOIN jybgb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '03485032' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FRO... | css |
CREATE TABLE table_50129 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Attendance has a Week of 8?
| SELECT AVG("Attendance") FROM table_50129 WHERE "Week" = '8' | wikisql |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
View... | SELECT TIME_TO_STR(p.CreationDate, '%Y') + (TIME_TO_STR(p.CreationDate, '%m') - 1) / 12.0 AS "date", COUNT(*) AS N FROM Posts AS p WHERE p.OwnerUserId = '##userId##' AND p.PostTypeId = 2 AND TIME_TO_STR(p.CreationDate, '%Y') >= '##startYear?2010##' AND TIME_TO_STR(p.CreationDate, '%Y') <= '##endYear?2015##' GROUP BY TI... | sede |
CREATE TABLE table_203_305 (
id number,
"round" number,
"#" number,
"player" text,
"nationality" text,
"college/junior/club team (league)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many players were from the united states ?
| SELECT COUNT("player") FROM table_203_305 WHERE "nationality" = 'united states' | squall |
CREATE TABLE Events (
Event_ID INTEGER,
Service_ID INTEGER,
Event_Details VARCHAR(255)
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15)
)
CREATE TABLE Participants (
Participant_ID INTEGER,
Participant_Type_Code CHAR(15),
Participant_Details VARCHAR(255)
)
CREA... | SELECT Participant_Type_Code, COUNT(Participant_Type_Code) FROM Participants GROUP BY Participant_Type_Code ORDER BY Participant_Type_Code DESC | nvbench |
CREATE TABLE table_17848 (
"Club" text,
"Played" text,
"Won" 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
)
-- Using valid SQLite, answer the follo... | SELECT "Points for" FROM table_17848 WHERE "Tries for" = '29' | wikisql |
CREATE TABLE table_74084 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Points" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many tries for were... | SELECT "Tries for" FROM table_74084 WHERE "Points for" = '396' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2145" AND procedures.icd9_code = "17" | mimicsql_data |
CREATE TABLE table_name_79 (
react INTEGER,
name VARCHAR,
lane VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest React, when Name is 'Candice Davis', and when Lane is less than 3?
| SELECT MIN(react) FROM table_name_79 WHERE name = "candice davis" AND lane < 3 | sql_create_context |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate ... | SELECT Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%India%' ORDER BY Reputation DESC LIMIT 10 | sede |
CREATE TABLE table_60095 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is John Shadegg's First Elected date?
| SELECT AVG("First elected") FROM table_60095 WHERE "Incumbent" = 'john shadegg' | wikisql |
CREATE TABLE table_19569 (
"Rank" real,
"Country" text,
"International tourist arrivals (2011)" text,
"International tourist arrivals (2010)" text,
"Change (2010 to 2011)" text,
"Change (2009 to 2010)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "International tourist arrivals (2011)" FROM table_19569 WHERE "Country" = 'Senegal' | wikisql |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE Tags (
Id number,
... | SELECT 'http://stackoverflow.com/q/' + CONCAT(Id, ''), Tags FROM Posts WHERE PostTypeId = 1 AND CreationDate < '2010.01.01' AND Score > 20 AND STR_POSITION(Tags, @Tag) > 0 AND AnswerCount <= @MaxAnswerCount AND ClosedDate IS NULL ORDER BY Score DESC | sede |
CREATE TABLE table_3254 (
"Information" text,
"James E. Holmes" text,
"Reidsville" text,
"Rockingham County" text,
"Western Rockingham Middle School" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the reidsville for enrollment
| SELECT "Reidsville" FROM table_3254 WHERE "Information" = 'Enrollment' | wikisql |
CREATE TABLE table_15314901_1 (
coordinate_velocity_v_dx_dt_in_units_of_c VARCHAR,
velocity_angle_η_in_i_radians VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the coordinate velocity v dx/dt in units of c total number if the velocity angle in i-radi... | SELECT COUNT(coordinate_velocity_v_dx_dt_in_units_of_c) FROM table_15314901_1 WHERE velocity_angle_η_in_i_radians = "ln[2 + √5] ≅ 1.444" | sql_create_context |
CREATE TABLE table_name_73 (
grid INTEGER,
driver VARCHAR,
laps VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the top grid that roger williamson lapped less than 7?
| SELECT MAX(grid) FROM table_name_73 WHERE driver = "roger williamson" AND laps < 7 | sql_create_context |
CREATE TABLE table_4911 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the away team for the game at Windy Hill?... | SELECT "Away team" FROM table_4911 WHERE "Venue" = 'windy hill' | wikisql |
CREATE TABLE table_1057316_1 (
build_date VARCHAR,
serial_number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the train 2053 built?
| SELECT build_date FROM table_1057316_1 WHERE serial_number = "2053" | sql_create_context |
CREATE TABLE table_15015 (
"Country" text,
"Film title used in nomination" text,
"Language" text,
"Original name" text,
"Director" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the film about the garden of the finzi-continis made?
| SELECT "Country" FROM table_15015 WHERE "Film title used in nomination" = 'the garden of the finzi-continis' | wikisql |
CREATE TABLE table_24115 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Black Knights points" real,
"Opponents" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many dates have boston college as the opponent?
| SELECT COUNT("Date") FROM table_24115 WHERE "Opponent" = 'Boston College' | wikisql |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Tags (
Id number,
TagName text,
Cou... | SELECT TOP(10) AS Reputation, DisplayName, Location FROM Users WHERE Location LIKE '%Cyprus%' AND Reputation > 0 ORDER BY Reputation DESC | sede |
CREATE TABLE table_name_71 (
silver INTEGER,
total VARCHAR,
gold VARCHAR,
nation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Silver has a Gold of 2, and a Nation of puerto rico, and a Total smaller than 12?
| SELECT SUM(silver) FROM table_name_71 WHERE gold = 2 AND nation = "puerto rico" AND total < 12 | sql_create_context |
CREATE TABLE table_name_90 (
prize VARCHAR,
winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Prize, when the Winner is Aaron Gustavson?
| SELECT prize FROM table_name_90 WHERE winner = "aaron gustavson" | sql_create_context |
CREATE TABLE table_19529639_3 (
original_toronto_cast VARCHAR,
current_broadway_cast VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who in the original Toronto cast played the character played by Kate Rockwell in the current Broadway cast?
| SELECT original_toronto_cast FROM table_19529639_3 WHERE current_broadway_cast = "Kate Rockwell" | sql_create_context |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Code DESC | nvbench |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
... | SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 555 | advising |
CREATE TABLE table_name_25 (
date VARCHAR,
outcome VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date with outcome of winner and score of 4 6 6 2 7 6 (7 4)
| SELECT date FROM table_name_25 WHERE outcome = "winner" AND score = "4–6 6–2 7–6 (7–4)" | sql_create_context |
CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
)
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
... | SELECT start_station_name, start_station_id FROM trip ORDER BY start_station_id DESC | nvbench |
CREATE TABLE table_name_49 (
contribution VARCHAR,
album VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For the album Board Up the House, what is the contribution?
| SELECT contribution FROM table_name_49 WHERE album = "board up the house" | sql_create_context |
CREATE TABLE ship (
ship_id number,
name text,
type text,
nationality text,
tonnage number
)
CREATE TABLE mission (
mission_id number,
ship_id number,
code text,
launched_year number,
location text,
speed_knots number,
fate text
)
-- Using valid SQLite, answer the foll... | SELECT type, COUNT(*) FROM ship GROUP BY type | spider |
CREATE TABLE table_79836 (
"Year" real,
"Stage" real,
"Category" text,
"Start" text,
"Finish" text,
"Leader at the summit" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the start of an event in Catagory 2 of the year 1947.
| SELECT "Start" FROM table_79836 WHERE "Category" = '2' AND "Year" = '1947' | wikisql |
CREATE TABLE table_name_67 (
outcome VARCHAR,
opponent_in_the_final VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Outcome when All England Open is the Opponent in the final?
| SELECT outcome FROM table_name_67 WHERE opponent_in_the_final = "all england open" | sql_create_context |
CREATE TABLE table_73755 (
"Season" real,
"Winner" text,
"Runner-Up" text,
"Third Place" text,
"Contestants" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what season was the winner Dado Dolabella?
| SELECT MAX("Season") FROM table_73755 WHERE "Winner" = 'Dado Dolabella' | wikisql |
CREATE TABLE table_name_20 (
song VARCHAR,
language VARCHAR,
draw VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Song has a Draw smaller than 7, and Points larger than 41, and a Language of german?
| SELECT song FROM table_name_20 WHERE draw < 7 AND points > 41 AND language = "german" | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (... | SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '007-3099' AND STRFTIME('%y', patient.hospitaladmittime) >= '2105' ORDER BY patient.hospitaladmittime LIMIT 1 | eicu |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,... | SELECT ViewCount, Id, OwnerUserId, OwnerDisplayName FROM Posts LIMIT 10 | sede |
CREATE TABLE table_71629 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the event of the match with a round larger ... | SELECT "Event" FROM table_71629 WHERE "Round" > '2' AND "Method" = 'ko (kick)' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
c... | SELECT AVG(t1.c1) FROM (SELECT COUNT(DISTINCT diagnosis.patientunitstayid) AS c1 FROM diagnosis WHERE diagnosis.diagnosisname = 'cardiomyopathy - dilated' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY STRFTIME('%y', diagnosis.diagnosistime)) AS t1 | eicu |
CREATE TABLE table_26106 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Prod. Code" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who directed episode no. 44 in ... | SELECT "Directed by" FROM table_26106 WHERE "No. in series" = '44' | wikisql |
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(20)... | SELECT card_type_code, COUNT(card_type_code) FROM Customers_Cards GROUP BY card_type_code | nvbench |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.