instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_203_754 (
id number,
"no." number,
"player" text,
"position" text,
"career" text,
"date no. retired" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- harry howell is before who
| SELECT "player" FROM table_203_754 WHERE id = (SELECT id FROM table_203_754 WHERE "player" = 'harry howell') + 1 | squall |
CREATE TABLE table_28752 (
"Episode number (Production number)" text,
"Title" text,
"Original air date" text,
"Total viewers on FX" text,
"Total viewers on FX+" text,
"Total viewers" text,
"Rank on channel" text
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT "Title" FROM table_28752 WHERE "Total viewers on FX" = '483,000' | wikisql |
CREATE TABLE table_204_396 (
id number,
"country" text,
"masters" number,
"u.s. open" number,
"the open" number,
"pga" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many countries have produced the same number of champ... | SELECT COUNT("country") FROM table_204_396 WHERE "country" <> 'canada' AND "total" = (SELECT "total" FROM table_204_396 WHERE "country" = 'canada') | squall |
CREATE TABLE table_name_72 (
rank INTEGER,
gold VARCHAR,
silver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rank of the team with 0 gold and less than 0 silvers?
| SELECT SUM(rank) FROM table_name_72 WHERE gold = 0 AND silver < 0 | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT AVG(demographic.days_stay) FROM demographic WHERE demographic.ethnicity = "HISPANIC OR LATINO" | mimicsql_data |
CREATE TABLE table_41101 (
"Administrative Panel" real,
"Agricultural Panel" real,
"Cultural and Educational Panel" real,
"Industrial and Commercial Panel" real,
"Labour Panel" real,
"National University of Ireland" real,
"University of Dublin" real,
"Nominated by the Taoiseach" real,
... | SELECT MAX("Labour Panel") FROM table_41101 WHERE "University of Dublin" < '2' AND "Agricultural Panel" > '5' | wikisql |
CREATE TABLE table_29598261_1 (
last_school_college VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the school for chris mcnamara?
| SELECT last_school_college FROM table_29598261_1 WHERE name = "Chris McNamara" | sql_create_context |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype tex... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'proximal gastrectomy')) AND DATETIME(cost.chargetime, 'st... | mimic_iii |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-3289')) AND intakeoutput.cellpath LIKE '%intake%'... | eicu |
CREATE TABLE table_69122 (
"Place" real,
"Team" text,
"Played" real,
"Draw" real,
"Lost" real,
"Goals Scored" real,
"Goals Conceded" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Goals Scored, ... | SELECT MAX("Goals Scored") FROM table_69122 WHERE "Team" = 'san salvador f.c.' AND "Points" < '10' | wikisql |
CREATE TABLE table_66277 (
"Date Released" text,
"Polling institute" text,
"Social Democratic" text,
"Socialist" text,
"Green-Communist" text,
"People's Party" text,
"Left Bloc" text,
"Lead" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
--... | SELECT "Socialist" FROM table_66277 WHERE "People's Party" = '6.8%' | wikisql |
CREATE TABLE table_57778 (
"Rocket launch" text,
"Launch Date" text,
"Mission" text,
"Institutional authority" text,
"Launch Site" text,
"Outcomes" text,
"Derivatives" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Derivative has a Lau... | SELECT "Derivatives" FROM table_57778 WHERE "Launch Date" = 'july 15, 1970; 15:05 gmt' | wikisql |
CREATE TABLE table_name_90 (
year_s__of_manufacture VARCHAR,
quantity VARCHAR,
type VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Year(s) of manufacture has a Quantity larger than 39, and a Type of 1 c1 h2t?
| SELECT year_s__of_manufacture FROM table_name_90 WHERE quantity > 39 AND type = "1′c1′ h2t" | sql_create_context |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- 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, T1.Name ORDER BY T1.Code | nvbench |
CREATE TABLE table_24232 (
"Competition" text,
"Round" text,
"Opponent" text,
"Result" text,
"Score" text,
"Home/Away" text,
"Venue" text,
"Attendance" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number... | SELECT COUNT("Opponent") FROM table_24232 WHERE "Date" = '05/09/2009' | wikisql |
CREATE TABLE table_21422977_2 (
ministries VARCHAR,
duration VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the ministries number when duration is 4 years, 4 days (1,465 days)?
| SELECT ministries FROM table_21422977_2 WHERE duration = "4 years, 4 days (1,465 days)" | sql_create_context |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.IN_DIAG_DIS_CD = 'L27.784' | css |
CREATE TABLE table_31414 (
"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.
-- what r... | SELECT "High assists" FROM table_31414 WHERE "Date" = 'January 29' | wikisql |
CREATE TABLE table_name_62 (
total INTEGER,
coppa_italia VARCHAR,
champions_league VARCHAR,
serie_a VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the total when the champions league was 0, the coppa italia was less than 0, and the Serie A was... | SELECT SUM(total) FROM table_name_62 WHERE champions_league = 0 AND serie_a > 1 AND coppa_italia < 0 | sql_create_context |
CREATE TABLE table_57365 (
"No. in series" real,
"No. in season" 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.
-- When did Boyd Hale's Julie gets Validated originally a... | SELECT "Original air date" FROM table_57365 WHERE "Written By" = 'boyd hale' AND "Title" = 'julie gets validated' | wikisql |
CREATE TABLE visits (
visit_id number,
tourist_attraction_id number,
tourist_id number,
visit_date time,
visit_details text
)
CREATE TABLE visitors (
tourist_id number,
tourist_details text
)
CREATE TABLE tourist_attractions (
tourist_attraction_id number,
attraction_type_code text... | SELECT price_range FROM hotels | spider |
CREATE TABLE school (
Location VARCHAR,
School_ID VARCHAR
)
CREATE TABLE school_details (
Nickname VARCHAR,
School_ID VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show locations and nicknames of schools.
| SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID | sql_create_context |
CREATE TABLE table_name_78 (
visitor VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the visitor when the score was 136 120?
| SELECT visitor FROM table_name_78 WHERE score = "136–120" | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid ... | SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'obstructive uropathy') AS t1 GROUP BY t1.uniquepid HAVING MIN(t1... | eicu |
CREATE TABLE management (
temporary_acting VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many acting statuses are there?
| SELECT COUNT(DISTINCT temporary_acting) FROM management | sql_create_context |
CREATE TABLE table_name_50 (
year VARCHAR,
player VARCHAR,
earnings__$_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many years have a Player of joe durant, and Earnings ($) larger than 396,000?
| SELECT COUNT(year) FROM table_name_50 WHERE player = "joe durant" AND earnings__$_ > 396 OFFSET 000 | sql_create_context |
CREATE TABLE table_20437 (
"Engine type" text,
"Scenario" text,
"SFC in lb/(lbf\u00b7h)" text,
"SFC in g/(kN\u00b7s)" text,
"Specific impulse (s)" real,
"Effective exhaust velocity (m/s)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What engin... | SELECT "Engine type" FROM table_20437 WHERE "Scenario" = 'Space shuttle vacuum' | wikisql |
CREATE TABLE table_name_12 (
cover VARCHAR,
published VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What cover has a published date of May 27, 2009 (hc) May 20, 2009 (tpb)?
| SELECT cover FROM table_name_12 WHERE published = "may 27, 2009 (hc) may 20, 2009 (tpb)" | 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 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '006-47576' AND patient.hospitaldischargetime IS NULL | eicu |
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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | 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.long_title = "Embolism and thrombosis of iliac artery" AND lab.flag = "delta" | mimicsql_data |
CREATE TABLE table_1979203_1 (
callsign VARCHAR,
branding VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many callsigns are for the branding telemundo 47
| SELECT COUNT(callsign) FROM table_1979203_1 WHERE branding = "Telemundo 47" | sql_create_context |
CREATE TABLE fgwyjzb (
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 gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '3882330' AND gwyjzb.IN_HOSP_DATE BETWEEN '2012-07-12' AND '2017-05-14' AND gwyjzb.REMOTE_SETTLE_FLG = '异地1' OR gwyjzb.REMOTE_SETTLE_FLG = '异地2' UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '3882330' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2012-07... | css |
CREATE TABLE table_204_451 (
id number,
"component" text,
"model 01" text,
"model 01+" text,
"model 02" text,
"model e2" text,
"model 2+ (pre-production)" text,
"model 03 (china copy)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- are t... | SELECT (SELECT COUNT("component") FROM table_204_451) >= 13 | squall |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'laxatives - lactulose' AND DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-1 year')) AS t1 J... | eicu |
CREATE TABLE table_name_91 (
overall VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the overall of the running back player?
| SELECT overall FROM table_name_91 WHERE position = "running back" | sql_create_context |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicatio... | SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-11660')) AND lab.labname = 'mchc' AND DATETIME(lab.labresulttime, 'start of year') =... | eicu |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Descri... | SELECT (((SELECT CAST(COUNT(*) AS FLOAT) FROM Users WHERE Reputation < 125) / (SELECT CAST(COUNT(*) AS FLOAT) FROM Users)) * 100) AS "% of users with < 125 rep." | sede |
CREATE TABLE table_77354 (
"Name" text,
"Birth" text,
"Marriage" text,
"Became Dauphine" text,
"Ceased to be Dauphine" text,
"Death" text,
"Husband" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who has a birth of 16 august 1401?
| SELECT "Name" FROM table_77354 WHERE "Birth" = '16 august 1401' | wikisql |
CREATE TABLE table_name_17 (
date VARCHAR,
set_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of the 21:12 Set 2?
| SELECT date FROM table_name_17 WHERE set_2 = "21:12" | sql_create_context |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT MED_ORG_DEPT_CD, IN_DIAG_DIS_NM, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '2125522' GROUP BY MED_ORG_DEPT_CD, IN_DIAG_DIS_NM | css |
CREATE TABLE table_24481478_1 (
attendance INTEGER,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How man fans showed up to watch the game versus the raleigh-durham skyhawks?
| SELECT MAX(attendance) FROM table_24481478_1 WHERE opponent = "Raleigh-Durham Skyhawks" | sql_create_context |
CREATE TABLE table_63249 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of attendance values for ties having an opponent of Middlesbrough and result of 3-1?... | SELECT COUNT("Attendance") FROM table_63249 WHERE "Opponent" = 'middlesbrough' AND "Result" = '3-1' | wikisql |
CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
end_station_name TEXT,
end_station_id INTEGER,
bike_id INTEGER,
subscription_type TEXT,
zip_code INTEGER
)
CREATE TABLE weather (
date TEX... | SELECT start_station_name, start_station_id FROM trip ORDER BY start_station_id DESC | nvbench |
CREATE TABLE table_44210 (
"Name of peak" text,
"Height (m)" real,
"Height (ft)" real,
"Prominence (m)" real,
"Prominence (ft)" real,
"Nearest Higher Neighbor" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total height of the peak w... | SELECT COUNT("Height (m)") FROM table_44210 WHERE "Prominence (ft)" = '12,867' AND "Prominence (m)" > '3,922' | wikisql |
CREATE TABLE table_73258 (
"Name" text,
"Nationality" text,
"from" real,
"to" text,
"League Apps" real,
"League Goals" real,
"Finals Apps" real,
"Finals Goals" real,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the ... | SELECT "to" FROM table_73258 WHERE "League Apps" = '19' | wikisql |
CREATE TABLE table_24590 (
"Year" text,
"MAAC" text,
"Overall" text,
"Regular Season Results" text,
"MAAC Tournament Result" text,
"NCAA Seed" text,
"NCAA Round" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the regular season resul... | SELECT "Regular Season Results" FROM table_24590 WHERE "Year" = '2011-2012' | wikisql |
CREATE TABLE table_name_10 (
studio_host VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Year of 2006-07 had what studio host?
| SELECT studio_host FROM table_name_10 WHERE year = "2006-07" | sql_create_context |
CREATE TABLE table_18204 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Status" text,
"Opponent" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who are the opponents in Massachusetts5 district?
| SELECT "Opponent" FROM table_18204 WHERE "District" = 'Massachusetts5' | wikisql |
CREATE TABLE table_25773116_2 (
location VARCHAR,
pole_position VARCHAR,
fastest_lap VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the race where Cole Morgan had the fastest lap and Daniel Erickson had pole position?
| SELECT location FROM table_25773116_2 WHERE pole_position = "Daniel Erickson" AND fastest_lap = "Cole Morgan" | sql_create_context |
CREATE TABLE table_name_8 (
r_51_o VARCHAR,
d_42_o VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which R 51 O value corresponds to a D 42 O value of r 19?
| SELECT r_51_o FROM table_name_8 WHERE d_42_o = "r 19" | sql_create_context |
CREATE TABLE table_32786 (
"Texas vs." text,
"Overall Record" text,
"at Austin" text,
"at Opponent's Venue" text,
"at Neutral Site" text,
"Last 5 Meetings" text,
"Last 10 Meetings" text,
"Current Streak" text
)
-- Using valid SQLite, answer the following questions for the tables provid... | SELECT "at Austin" FROM table_32786 WHERE "Texas vs." = 'kansas state' | wikisql |
CREATE TABLE table_33509 (
"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 smallest crowd at victoria park?
| SELECT MIN("Crowd") FROM table_33509 WHERE "Venue" = 'victoria park' | wikisql |
CREATE TABLE table_name_27 (
rank INTEGER,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Rank is the lowest one that has a Name of maribor cathedral?
| SELECT MIN(rank) FROM table_name_27 WHERE name = "maribor cathedral" | sql_create_context |
CREATE TABLE table_name_70 (
place INTEGER,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest rank of a rider whose time was 1:19.02.8?
| SELECT MAX(place) FROM table_name_70 WHERE time = "1:19.02.8" | sql_create_context |
CREATE TABLE table_31628 (
"Species" text,
"Lived when ( mya )" text,
"Lived where" text,
"Fossil record" text,
"Discovery / publication of name" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the discovery/publication for red deer cave peop... | SELECT "Discovery / publication of name" FROM table_31628 WHERE "Species" = 'red deer cave people' | wikisql |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
d... | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'soft tissue incision nec') | mimic_iii |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT All_Games, All_Games_Percent FROM basketball_match ORDER BY All_Games | nvbench |
CREATE TABLE table_1644857_2 (
stolen_ends VARCHAR,
country VARCHAR,
France VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times is a score for stolen ends recorded for France?
| SELECT COUNT(stolen_ends) FROM table_1644857_2 WHERE country = France | sql_create_context |
CREATE TABLE table_11127 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Competition with a Score of 1 0, and a Result with 3 0?
| SELECT "Competition" FROM table_11127 WHERE "Score" = '1–0' AND "Result" = '3–0' | wikisql |
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_SER_ORG_NO FROM t_kc21 WHERE PERSON_NM = '喻奇文' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE SOC_SRT_DIRE_NM = '氯雷他定片') | css |
CREATE TABLE table_71581 (
"Elector" text,
"Order" text,
"Title" text,
"Elevated" text,
"Elevator" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's listed for the Elevated category that has an Order of Cardinal-Bishop?
| SELECT "Elevated" FROM table_71581 WHERE "Order" = 'cardinal-bishop' | wikisql |
CREATE TABLE table_name_70 (
tyres VARCHAR,
class VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which tires were in Class C in years before 1983?
| SELECT tyres FROM table_name_70 WHERE class = "c" AND year < 1983 | sql_create_context |
CREATE TABLE table_78943 (
"City" text,
"Country" text,
"Airport" text,
"IATA" text,
"ICAO" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Airport in Oslo?
| SELECT "Airport" FROM table_78943 WHERE "City" = 'oslo' | wikisql |
CREATE TABLE table_70011 (
"Date" text,
"City" text,
"Country" text,
"Venue" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Attendance has Mandalay Bay Resort
| SELECT "Attendance" FROM table_70011 WHERE "Venue" = 'mandalay bay resort' | wikisql |
CREATE TABLE table_48965 (
"Team #1" text,
"Agg." text,
"Team #2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the first team when the second team was Kalise Gran Canaria?
| SELECT "Team #1" FROM table_48965 WHERE "Team #2" = 'kalise gran canaria' | wikisql |
CREATE TABLE table_name_74 (
ground VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the ground of the Geelong Away team?
| SELECT ground FROM table_name_74 WHERE away_team = "geelong" | sql_create_context |
CREATE TABLE table_23799417_2 (
rating VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rating if the rating/share (18-49) is 3.6?
| SELECT rating FROM table_23799417_2 WHERE rating / SHARE(18 AS –49) = 3.6 | sql_create_context |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Na... | SELECT COUNT(Id) AS Amount, CONCAT(YEAR(CreationDate), '/', MONTH(CreationDate)) AS per FROM Posts WHERE Tags LIKE '%reactjs%' GROUP BY CONCAT(YEAR(CreationDate), '/', MONTH(CreationDate)) | sede |
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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Respiratory distress syn" AND prescriptions.drug_type = "MAIN" | mimicsql_data |
CREATE TABLE table_12169 (
"Tournament" text,
"2000" text,
"2001" text,
"2002" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"Win %" text
)
-- Using valid SQLite, answer the following q... | SELECT "2005" FROM table_12169 WHERE "2002" = 'a' AND "2010" = '3r' | 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 procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "27" | mimicsql_data |
CREATE TABLE table_name_79 (
english_title VARCHAR,
original_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Original title of / vozvrashcheniye had what English title?
| SELECT english_title FROM table_name_79 WHERE original_title = "возвращение / vozvrashcheniye" | sql_create_context |
CREATE TABLE table_27700375_8 (
high_assists VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who got high assists for team @ Indiana?
| SELECT high_assists FROM table_27700375_8 WHERE team = "@ Indiana" | sql_create_context |
CREATE TABLE table_19373 (
"Tour" text,
"Mens singles" text,
"Womens singles" text,
"Mens doubles" text,
"Womens doubles" text,
"Mixed doubles" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the tour when mens singles is chen jin and womens... | SELECT "Tour" FROM table_19373 WHERE "Mens singles" = 'Chen Jin' AND "Womens doubles" = 'Zhang Yawen Zhao Tingting' | wikisql |
CREATE TABLE table_name_86 (
opponent VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Opponent has an Attendance that is 26,880?
| SELECT opponent FROM table_name_86 WHERE attendance = "26,880" | sql_create_context |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT SUM(t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '9853882' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-09-25' AND '2006-02-25' | css |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,... | SELECT AVG(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 6215 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'p... | mimic_iii |
CREATE TABLE table_10749367_3 (
test_taker VARCHAR,
challenge VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had the challenge of night driving?
| SELECT test_taker FROM table_10749367_3 WHERE challenge = "Night Driving" | sql_create_context |
CREATE TABLE table_name_5 (
investing_dragon_s_ VARCHAR,
company_or_product_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the investing dragon for razzamataz
| SELECT investing_dragon_s_ FROM table_name_5 WHERE company_or_product_name = "razzamataz" | sql_create_context |
CREATE TABLE table_name_92 (
d_43 VARCHAR,
d_41 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the D43 associated with a D41 of r 16?
| SELECT d_43 FROM table_name_92 WHERE d_41 = "r 16" | sql_create_context |
CREATE TABLE table_25225 (
"Rnd" real,
"Date" text,
"Length" text,
"Race Name" text,
"Track" text,
"Location" text,
"Pole Position" text,
"Winning Driver" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What lengths did Phoenix Internatio... | SELECT "Length" FROM table_25225 WHERE "Track" = 'Phoenix International Raceway' | wikisql |
CREATE TABLE field (
fieldid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename... | SELECT DISTINCT COUNT(cite.citingpaperid) FROM cite, paper, venue WHERE paper.paperid = cite.citedpaperid AND venue.venueid = paper.venueid AND venue.venuename = 'ACL' GROUP BY cite.citingpaperid HAVING COUNT(DISTINCT cite.citedpaperid) > 2 | scholar |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'infusion of vasopressor') AND DATETIME(procedures_ic... | mimic_iii |
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "PNEUMONIA" AND prescriptions.route = "IV DRIP" | mimicsql_data |
CREATE TABLE table_18950570_2 (
live_births_per_year VARCHAR,
life_expectancy_females VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many live births per year are there in the period where the life expectancy for females is 73.3?
| SELECT live_births_per_year FROM table_18950570_2 WHERE life_expectancy_females = "73.3" | sql_create_context |
CREATE TABLE table_1175233_1 (
communes VARCHAR,
chief_town VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many communes have the chief town as dijon?
| SELECT COUNT(communes) FROM table_1175233_1 WHERE chief_town = "Dijon" | 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 CYBQDM, CYBQMC, CYCWH FROM zyjzjlb WHERE JZLSH = '79904903869' | css |
CREATE TABLE table_68345 (
"Rank" real,
"Team" text,
"Country" text,
"Value ($M)" real,
"Debt as % of value" real,
"% change on year" text,
"Revenue ($M)" real,
"Operating income ($m)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name ... | SELECT COUNT("Revenue ($M)") FROM table_68345 WHERE "Country" = 'italy' AND "Team" = 'internazionale' AND "Operating income ($m)" < '27' | wikisql |
CREATE TABLE table_204_146 (
id number,
"tie" number,
"home team" text,
"score" text,
"away team" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which match had the least in attendance ?
| SELECT "home team" FROM table_204_146 ORDER BY "attendance" LIMIT 1 | squall |
CREATE TABLE table_name_77 (
rank VARCHAR,
athlete VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times is the athlete jin di and the total less than 118?
| SELECT COUNT(rank) FROM table_name_77 WHERE athlete = "jin di" AND total < 118 | sql_create_context |
CREATE TABLE table_5676 (
"County" text,
"Per capita income" text,
"Median household income" text,
"Median family income" text,
"Population" real,
"Number of households" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the county is Carroll w... | SELECT MIN("Population") FROM table_5676 WHERE "County" = 'carroll' | wikisql |
CREATE TABLE table_5159 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Points have a Team of rusport, and Laps of 45?
| SELECT COUNT("Points") FROM table_5159 WHERE "Team" = 'rusport' AND "Laps" = '45' | wikisql |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT * FROM Users WHERE LOWER(Location) LIKE '%vietnam%' ORDER BY Reputation DESC | sede |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "S/P FALL" AND demographic.dod_year <= "2133.0" | mimicsql_data |
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 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 Regular_Order_Products (
regular_order_id INTEGER,
product_id INTEGER
)
CREATE TABLE Addresses (
address_id INTEGER,
address_details VARCHAR(80),
city VARCHAR(50),
zip_postcode VARCHAR(20),
state_province_county VARCHAR(50),
country VARCHAR(50)
)
CREATE TABLE Products (
... | SELECT state_province_county, COUNT(*) FROM Customer_Addresses AS t1 JOIN Addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county ORDER BY state_province_county | nvbench |
CREATE TABLE table_203_612 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- does guam have a larger amount of bronze medals than palau ?
| SELECT (SELECT "bronze" FROM table_203_612 WHERE "nation" = 'guam') > (SELECT "bronze" FROM table_203_612 WHERE "nation" = 'palau') | squall |
CREATE TABLE table_name_51 (
yards INTEGER,
avg VARCHAR,
player VARCHAR,
rec VARCHAR,
long VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Yards is the highest one that has a Rec smaller than 54, and a Long smaller than 5, and a Player of to... | SELECT MAX(yards) FROM table_name_51 WHERE rec < 54 AND long < 5 AND player = "todd herremans" AND avg > 1 | sql_create_context |
CREATE TABLE table_28677723_11 (
christer_tornell VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many for christer tornell where the total is 30?
| SELECT COUNT(christer_tornell) FROM table_28677723_11 WHERE total = 30 | sql_create_context |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location te... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.i... | mimic_iii |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.