instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_43 (
state VARCHAR,
home_venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the State with a home venue of suwon sports complex?
| SELECT state FROM table_name_43 WHERE home_venue = "suwon sports complex" | sql_create_context |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT labevents.itemid FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22782) AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ... | mimic_iii |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ tim... | SELECT jybgb.SHRGH, jybgb.SHRXM FROM jybgb WHERE jybgb.BGDH = '19700369409' | css |
CREATE TABLE zyb (
CLINIC_ID 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,
INSU_TYPE text,
IN... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '3979463' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY SUM(t_kc22.AMOUNT) DESC LIMIT 18 UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gyb JOIN t_kc22 ON gyb.ME... | css |
CREATE TABLE table_166346_1 (
population__july_2012_ INTEGER,
area__km²_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest poplulation in July 2012 in the country with an area of 2149690 square kilometers?
| SELECT MAX(population__july_2012_) FROM table_166346_1 WHERE area__km²_ = 2149690 | sql_create_context |
CREATE TABLE table_name_62 (
college VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The safety position is represented in the draft by which colleges?
| SELECT college FROM table_name_62 WHERE position = "safety" | sql_create_context |
CREATE TABLE table_16661199_2 (
attendance INTEGER,
giants_points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most attendance for giants points of 10
| SELECT MAX(attendance) FROM table_16661199_2 WHERE giants_points = 10 | sql_create_context |
CREATE TABLE table_74194 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who di... | SELECT "High rebounds" FROM table_74194 WHERE "Date" = 'April 6' | wikisql |
CREATE TABLE table_31154 (
"Division" text,
"Brigade" text,
"Regiment" text,
"Colonel" text,
"County" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- in how many of the arkansas colomel the county was pope
| SELECT COUNT("Colonel") FROM table_31154 WHERE "County" = 'Pope' | wikisql |
CREATE TABLE table_27293285_2 (
bonus_points VARCHAR,
points_for VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many bonus points did the club who had 379 points for have?
| SELECT bonus_points FROM table_27293285_2 WHERE points_for = "379" | 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 = '2203428' AND BGRQ BETWEEN '2002-06-28' AND '2011-08-03' GROUP BY JCZBMC, JCZBJGDW ORDER BY AVG(JCZBJGDL) LIMIT 20 | css |
CREATE TABLE table_20569 (
"Year" real,
"GDP Nominal ($ billions)" text,
"GDP Adjusted ($ billions)" text,
"Population (millions)" text,
"GDP per capita Nominal ($)" real,
"GDP per capita Adjusted ($)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "GDP Adjusted ($ billions)" FROM table_20569 WHERE "GDP Nominal ($ billions)" = '8.43' | wikisql |
CREATE TABLE table_7946 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Player, when Score is '71-69-72-72=284'?
| SELECT "Player" FROM table_7946 WHERE "Score" = '71-69-72-72=284' | wikisql |
CREATE TABLE table_203_637 (
id number,
"player" text,
"for" text,
"against" text,
"result" text,
"date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the result of the match between queens park rangers and everton ?
| SELECT "result" FROM table_203_637 WHERE "for" = 'queens park rangers' AND "against" = 'everton' | squall |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BG... | css |
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 STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', patient.hospitaladmittime) FROM patient WHERE patient.uniquepid = '028-23341' AND NOT patient.hospitaladmittime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1 | eicu |
CREATE TABLE table_18042409_1 (
alma_mater VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What university did Steve Hoar attend.
| SELECT alma_mater FROM table_18042409_1 WHERE player = "Steve Hoar" | sql_create_context |
CREATE TABLE Settlements (
Date_Claim_Made VARCHAR,
Date_Claim_Settled VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the claim dates and settlement dates of all the settlements?
| SELECT Date_Claim_Made, Date_Claim_Settled FROM Settlements | sql_create_context |
CREATE TABLE table_19915 (
"Series Ep." text,
"Episode" real,
"Netflix" text,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Whats the name of segment D in the episode where s... | SELECT "Segment D" FROM table_19915 WHERE "Segment A" = 'Tequila' | wikisql |
CREATE TABLE table_name_11 (
player VARCHAR,
to_par VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Player has a +3 To par?
| SELECT player FROM table_name_11 WHERE to_par = "+3" | sql_create_context |
CREATE TABLE table_40742 (
"Television service" text,
"Country" text,
"Language" text,
"Content" text,
"HDTV" text,
"Package/Option" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What content is provided by the television service ewtn?
| SELECT "Content" FROM table_40742 WHERE "Television service" = 'ewtn' | wikisql |
CREATE TABLE table_name_84 (
away_team VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the away score when the home team was Melbourne?
| SELECT away_team AS score FROM table_name_84 WHERE home_team = "melbourne" | sql_create_context |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT jyjgzbb.SBBM, jyjgzbb.YQBH, jyjgzbb.YQMC FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '87001092804' | css |
CREATE TABLE table_78938 (
"City" text,
"Country" text,
"Airport" text,
"IATA" text,
"ICAO" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what Country is Haugesund?
| SELECT "Country" FROM table_78938 WHERE "City" = 'haugesund' | wikisql |
CREATE TABLE table_46903 (
"Game" real,
"Date" real,
"Opponent" text,
"Score" text,
"Decision" text,
"Location/Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Score, when Date is greater than 7, and when Gam... | SELECT "Score" FROM table_46903 WHERE "Date" > '7' AND "Game" = '82' | 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 ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE LOWER('%##CountryName##%') AND Reputation > '##Reputation##' ORDER BY Reputation DESC | sede |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '27160966' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2007-10-30') | css |
CREATE TABLE table_3609 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who were the incumbent(s) in the election featuring john murray (dr) 50.4... | SELECT "Incumbent" FROM table_3609 WHERE "Candidates" = 'John Murray (DR) 50.4% George Denison (DR) 49.6%' AND "Result" = 'Retired Democratic-Republican hold' | wikisql |
CREATE TABLE table_177273_2 (
surface VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what surface was the game played with a score of 6 4, 6 4?
| SELECT surface FROM table_177273_2 WHERE score = "6–4, 6–4" | sql_create_context |
CREATE TABLE table_13336122_6 (
us_viewers__million_ VARCHAR,
no_in_season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of shows when there was 2 million views
| SELECT COUNT(us_viewers__million_) FROM table_13336122_6 WHERE no_in_season = 2 | sql_create_context |
CREATE TABLE table_13116 (
"Shooter" text,
"Event" text,
"Rank points" text,
"Score points" text,
"Total" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who got 13 score points at wc kerrville?
| SELECT "Shooter" FROM table_13116 WHERE "Score points" = '13' AND "Event" = 'wc kerrville' | wikisql |
CREATE TABLE diagnoses (
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 demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND procedures.short_title = "Closed liver biopsy" | mimicsql_data |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/HAITIAN" AND demographic.dob_year < "2087" | mimicsql_data |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number... | SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 's/p thoracoscopic procedure - lung reduction' AND ST... | eicu |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemics... | SELECT (SELECT vitalperiodic.sao2 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-23724') AND NOT patient.unitdischargetime IS NULL ... | eicu |
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Minor_in (
StuID INTEGER,
DNO INTEGER
)
CREATE TABLE Member_of (
FacID INTEGER,
DNO INTEGER,... | SELECT CID, DNO FROM Course ORDER BY Credits | nvbench |
CREATE TABLE table_name_78 (
attendance VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Attendance has an Opponent of crawley town?
| SELECT attendance FROM table_name_78 WHERE opponent = "crawley town" | sql_create_context |
CREATE TABLE table_71382 (
"Name" text,
"Street address" text,
"Years as tallest" text,
"Height ft / m" text,
"Floors" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the height with 9 floors
| SELECT "Height ft / m" FROM table_71382 WHERE "Floors" = '9' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2155" AND lab.label = "Homocysteine" | mimicsql_data |
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 diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Crbl art ocl NOS w infrc" AND lab.flag = "abnormal" | mimicsql_data |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 11 AND program_course.category LIKE 'ULCS' | advising |
CREATE TABLE table_16444 (
"Series #" real,
"Episode #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the original air date for Series 36?
| SELECT "Original air date" FROM table_16444 WHERE "Series #" = '36' | wikisql |
CREATE TABLE table_13044 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What week was the December 24, 1994 game?
| SELECT SUM("Week") FROM table_13044 WHERE "Date" = 'december 24, 1994' | wikisql |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(DEPARTMENT_ID) DESC | nvbench |
CREATE TABLE table_2668199_2 (
candidates VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who were the candidates in districk Pennsylvania 12?
| SELECT candidates FROM table_2668199_2 WHERE district = "Pennsylvania 12" | sql_create_context |
CREATE TABLE table_6499 (
"Outcome" text,
"Date" text,
"Surface" text,
"Partner" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the score for 21 may 2011
| SELECT "Score" FROM table_6499 WHERE "Date" = '21 may 2011' | wikisql |
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 mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzj... | css |
CREATE TABLE table_name_67 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2000 value if the 1998 value is 1.5?
| SELECT 2000 FROM table_name_67 WHERE 1998 = "1.5" | sql_create_context |
CREATE TABLE table_name_18 (
frequency__per_hour_ VARCHAR,
line VARCHAR,
destination VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many frequencies have a line of East London and destination of Crystal Palace?
| SELECT COUNT(frequency__per_hour_) FROM table_name_18 WHERE line = "east london" AND destination = "crystal palace" | sql_create_context |
CREATE TABLE table_name_24 (
wounded VARCHAR,
killed VARCHAR,
unit VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many were Wounded in the Artillery Corps unit while having 0 off 0 men Killed?
| SELECT wounded FROM table_name_24 WHERE killed = "0 off 0 men" AND unit = "artillery corps" | sql_create_context |
CREATE TABLE performers_in_bookings (
order_id number,
performer_id number
)
CREATE TABLE ref_service_types (
service_type_code text,
parent_service_type_code text,
service_type_description text
)
CREATE TABLE services (
service_id number,
service_type_code text,
workshop_group_id numb... | SELECT T1.city_town FROM addresses AS T1 JOIN stores AS T2 ON T1.address_id = T2.address_id WHERE T2.store_name = "FJA Filming" | spider |
CREATE TABLE table_2266762_1 (
date VARCHAR,
average_speed__mph_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On how many dates was the average speed of the race 91.033 MPH?
| SELECT COUNT(date) FROM table_2266762_1 WHERE average_speed__mph_ = "91.033" | 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 demographic ... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.days_stay = "2" | mimicsql_data |
CREATE TABLE table_36978 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the opponent in the final of the match on 26 March 2006?
| SELECT "Opponent in the final" FROM table_36978 WHERE "Date" = '26 march 2006' | wikisql |
CREATE TABLE table_49908 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the Place with a Score of 72-68=140?
| SELECT "Place" FROM table_49908 WHERE "Score" = '72-68=140' | wikisql |
CREATE TABLE table_14016079_1 (
winner VARCHAR,
circuit VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the winner on the Symmons Plains Raceway?
| SELECT winner FROM table_14016079_1 WHERE circuit = "Symmons Plains Raceway" | sql_create_context |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
... | SELECT FIRST_NAME, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SALARY | nvbench |
CREATE TABLE table_name_70 (
bronze INTEGER,
total VARCHAR,
gold VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many bronze medals were won when the total was larger than 2 and the more than 2 gold medals were won?
| SELECT SUM(bronze) FROM table_name_70 WHERE total > 2 AND gold > 2 | sql_create_context |
CREATE TABLE table_10093 (
"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.
-- Which sporting location is where Richmond plays?... | SELECT "Venue" FROM table_10093 WHERE "Home team" = 'richmond' | wikisql |
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 COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '0862388' AND t_kc21.IN_HOSP_DATE BETWEEN '2000-02-09' AND '2011-08-18' AND t_kc21.CLINIC_TYPE = '购药' | css |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ... | css |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Lower extremity embolism" AND lab."CATEGORY" = "Blood Gas" | mimicsql_data |
CREATE TABLE table_31324 (
"Series #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many millions of U... | SELECT "U.S. viewers (million)" FROM table_31324 WHERE "Directed by" = 'Andy Wolk' | wikisql |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE cour... | SELECT DISTINCT course_offering.end_time, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'department0' AND (course.number = 596 OR course.number = 851) AND course_offeri... | advising |
CREATE TABLE table_17539 (
"Country" text,
"Currency" text,
"1 Euro =" text,
"1 USD =" text,
"Central bank" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the value of 1 Euro in the country where the value of 1 USD is 483.050 of the local cur... | SELECT "1 Euro =" FROM table_17539 WHERE "1 USD =" = '483.050' | wikisql |
CREATE TABLE table_name_23 (
total INTEGER,
nation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest total when the nation is Sweden?
| SELECT MIN(total) FROM table_name_23 WHERE nation = "sweden" | sql_create_context |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE diagnosis (
diagn... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-10988')) AND intakeoutput.cellpath LIKE '%intake%' AND D... | eicu |
CREATE TABLE table_12002 (
"Name" text,
"District (Region)" text,
"Took Office" text,
"Left Office" text,
"Party" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Fran ois Gendron was in which party?
| SELECT "Party" FROM table_12002 WHERE "Name" = 'françois gendron' | wikisql |
CREATE TABLE table_26095 (
"Province" text,
"Contestant" text,
"Age" real,
"Height (in)" text,
"Height (mt)" text,
"Hometown" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the hometown of contestants who are from the province of Huesca?... | SELECT "Hometown" FROM table_26095 WHERE "Province" = 'Huesca' | wikisql |
CREATE TABLE table_204_81 (
id number,
"rank" number,
"bib" number,
"name" text,
"country" text,
"time" text,
"deficit" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which players came in a place before lukas bauer ?
| SELECT "name" FROM table_204_81 WHERE id < (SELECT id FROM table_204_81 WHERE "name" = 'lukas bauer') | squall |
CREATE TABLE diagnoses (
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 demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ACIDOSIS" AND demographic.age < "79" | mimicsql_data |
CREATE TABLE table_15459 (
"Date" text,
"Tournament" text,
"Winning score" text,
"To par" text,
"Margin of victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the margin of victory for the win with a score of 71... | SELECT "Margin of victory" FROM table_15459 WHERE "Winning score" = '71-69-71-70=281' | wikisql |
CREATE TABLE table_12051 (
"Points" real,
"Name" text,
"Club" text,
"Apps" real,
"Tries" real,
"Drop" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was part of Club Munster with 1 try?
| SELECT "Name" FROM table_12051 WHERE "Tries" = '1' AND "Club" = 'munster' | wikisql |
CREATE TABLE playlist_tracks (
playlist_id VARCHAR,
track_id VARCHAR
)
CREATE TABLE playlists (
name VARCHAR,
id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the name of playlist which has number of tracks greater than 100.
| SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING COUNT(T1.track_id) > 100 | sql_create_context |
CREATE TABLE table_66457 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What venue did the 2000 tiger cup take place at on November 10, 2000?
| SELECT "Venue" FROM table_66457 WHERE "Competition" = '2000 tiger cup' AND "Date" = 'november 10, 2000' | wikisql |
CREATE TABLE table_53883 (
"Episode" text,
"Air Date" text,
"Timeslot" text,
"Rating" real,
"Share" real,
"18-49 (Rating/Share)" text,
"Viewers (m)" real,
"Rank (Timeslot)" real,
"Rank (Night)" text,
"Rank (Overall)" real
)
-- Using valid SQLite, answer the following questions ... | SELECT "Viewers (m)" FROM table_53883 WHERE "Air Date" = 'march 20, 2008' AND "18-49 (Rating/Share)" = '2.3/7' | wikisql |
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDat... | SELECT t1.Id, t1.ParentId, t1.PostTypeId, t1.CreationDate, t1.AcceptedAnswerId, t1.ViewCount, t1.Title, t1.Body, t1.Score, t2.PostTypeId, t2.CreationDate, t2.ViewCount, t2.Title, t2.Body, t2.Score, t1.OwnerUserId, Users.Id, Users.Reputation FROM Posts AS t1 INNER JOIN Posts AS t2 ON t2.Id = t1.ParentId INNER JOIN Users... | sede |
CREATE TABLE table_64482 (
"interval name" text,
"size (steps)" real,
"size (cents)" real,
"just ratio" text,
"just (cents)" real,
"error" text,
"audio" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the value of the size (steps) tha... | SELECT COUNT("size (steps)") FROM table_64482 WHERE "just ratio" = '10:9' AND "size (cents)" > '160' | wikisql |
CREATE TABLE team (
team_id number,
name text
)
CREATE TABLE country (
country_id number,
country_name text,
capital text,
official_native_language text
)
CREATE TABLE match_season (
season number,
player text,
position text,
country number,
team number,
draft_pick_numb... | SELECT T2.season, T2.player, T1.country_name FROM country AS T1 JOIN match_season AS T2 ON T1.country_id = T2.country | spider |
CREATE TABLE table_20026 (
"Date" text,
"Tournament" text,
"Location" text,
"Purse( $ )" real,
"Winner" text,
"Score" text,
"1st Prize( $ )" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what day was the tournament in Alabama?
| SELECT "Date" FROM table_20026 WHERE "Location" = 'Alabama' | wikisql |
CREATE TABLE table_204_244 (
id number,
"year" number,
"album" text,
"peak\nus" number,
"peak\nus\nholiday" number,
"certifications\n(sales threshold)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- the oldest year listed is what ?
| SELECT "year" FROM table_204_244 ORDER BY "year" LIMIT 1 | squall |
CREATE TABLE student (
stuid VARCHAR,
fname VARCHAR,
lname VARCHAR
)
CREATE TABLE club (
clubid VARCHAR
)
CREATE TABLE member_of_club (
clubid VARCHAR,
stuid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many clubs does 'Linda Smith' b... | SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Linda" AND t3.lname = "Smith" | sql_create_context |
CREATE TABLE table_79757 (
"Exam" text,
"2006 First Time" text,
"2006 All" text,
"2007 First Time" text,
"2007 All" text,
"2008 First Time" text,
"2008 All" text,
"2009 First Time" text,
"2009 All" text,
"2010 First Time" text,
"2011 First Time" text,
"2012 First Time" te... | SELECT "2012 First Time" FROM table_79757 WHERE "2009 All" = '82%' | wikisql |
CREATE TABLE table_name_61 (
country VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Country has azeri tv tower?
| SELECT country FROM table_name_61 WHERE name = "azeri tv tower" | sql_create_context |
CREATE TABLE table_7959 (
"Team" text,
"Location" text,
"Venue" text,
"Capacity" real,
"Position in 2007" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the venue that is located in zhodino?
| SELECT "Venue" FROM table_7959 WHERE "Location" = 'zhodino' | wikisql |
CREATE TABLE table_225100_4 (
vacator VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the vacator when south carolina 4th is the district?
| SELECT vacator FROM table_225100_4 WHERE district = "South Carolina 4th" | sql_create_context |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE ... | WITH tagshistory_cte AS (SELECT Id AS phid, REPLACE(value, '>', '') AS TagName FROM PostHistory JOIN LATERAL STRING_SPLIT(Text, '<') WHERE PostHistoryTypeId IN (3, 6, 9) AND LENGTH(value) > 0) SELECT th.TagName, COUNT(DISTINCT ph.PostId) AS "count" FROM tagshistory_cte AS th INNER JOIN PostHistory AS ph ON ph.Id = th.p... | sede |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT zyjzjlb.JZKSDM, zyjzjlb.JZKSMC FROM zyjzjlb WHERE zyjzjlb.JZLSH = '77388683029' | css |
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,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ... | css |
CREATE TABLE table_name_2 (
runners_up VARCHAR,
venue VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team was runner-up at Bergisch Gladbach in 1983?
| SELECT runners_up FROM table_name_2 WHERE venue = "bergisch gladbach" AND year = "1983" | sql_create_context |
CREATE TABLE table_22207 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the original air dat... | SELECT "Original air date" FROM table_22207 WHERE "Season #" = '9' | wikisql |
CREATE TABLE table_14532_1 (
region VARCHAR,
capital VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the region where Milan is located?
| SELECT region FROM table_14532_1 WHERE capital = "Milan" | sql_create_context |
CREATE TABLE table_73349 (
"Episode" real,
"Song" text,
"Average grade" text,
"Detailed grades" text,
"Classification (Judges)" text,
"Classification (Viewers)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the average grade for mar k tark... | SELECT "Average grade" FROM table_73349 WHERE "Song" = 'Şımarık Tarkan' | 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 demographic.diagnosis, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Heather Vineyard" | mimicsql_data |
CREATE TABLE table_31235 (
"Round" text,
"Clubs remaining" real,
"Clubs involved" real,
"Winners from previous round" real,
"New entries this round" text,
"Leagues entering at this round" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many c... | SELECT "Clubs remaining" FROM table_31235 WHERE "Winners from previous round" = '4' | wikisql |
CREATE TABLE table_67402 (
"Rank" text,
"Bowling" text,
"Player" text,
"Venue" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what venue does tim southee bowl at?
| SELECT "Venue" FROM table_67402 WHERE "Player" = 'tim southee' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2154.0" AND prescriptions.drug = "Prismasate (B22 K4)" | mimicsql_data |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),... | SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID DESC | nvbench |
CREATE TABLE table_31747 (
"Nomination" text,
"Actor's Name" text,
"Film Name" text,
"Director" text,
"Country" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the actor's name for anastasiya slutskaya belarus
| SELECT "Actor's Name" FROM table_31747 WHERE "Film Name" = 'anastasiya slutskaya' AND "Country" = 'belarus' | wikisql |
CREATE TABLE table_22880 (
"Performer" text,
"Performances" real,
"Category" text,
"First performance" text,
"Last performance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- when was the last performance of the first performance on 11/15/1909
| SELECT "Last performance" FROM table_22880 WHERE "First performance" = '11/15/1909' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.