instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_3574 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times is the opponents in the final is b... | SELECT COUNT("Score") FROM table_3574 WHERE "Opponents in the final" = 'Beti Sekulovski Cindy Watson' | wikisql |
CREATE TABLE table_name_15 (
score VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was Fred Couples' score?
| SELECT COUNT(score) FROM table_name_15 WHERE player = "fred couples" | sql_create_context |
CREATE TABLE table_name_49 (
score VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What score has august 25 as the date?
| SELECT score FROM table_name_49 WHERE date = "august 25" | sql_create_context |
CREATE TABLE table_27700530_13 (
location_attendance VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the location and attendance on March 9?
| SELECT location_attendance FROM table_27700530_13 WHERE date = "March 9" | sql_create_context |
CREATE TABLE table_name_93 (
year INTEGER,
event VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which year was the 100 m event played in Thessaloniki, Greece?
| SELECT MIN(year) FROM table_name_93 WHERE event = "100 m" AND venue = "thessaloniki, greece" | sql_create_context |
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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.admityear < "2164" | mimicsql_data |
CREATE TABLE table_name_78 (
co_drivers VARCHAR,
laps VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Co-Drivers, when Laps is greater than 196, and when Year is before 2010?
| SELECT co_drivers FROM table_name_78 WHERE laps > 196 AND year < 2010 | sql_create_context |
CREATE TABLE table_name_26 (
division_two VARCHAR,
premier_division VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Division Two team were champions as the same time the Premier Division Leominster town team were champs?
| SELECT division_two FROM table_name_26 WHERE premier_division = "leominster town" | sql_create_context |
CREATE TABLE table_33301 (
"Rank" real,
"Score" real,
"Date" text,
"Player" text,
"Opponent" text,
"Minutes" real,
"FGM-FGA" text,
"3PM-3PA" text,
"FTM-FTA" text,
"Off Reb" real,
"Def Reb" real,
"Assists" real,
"Steals" real,
"Blocks" real,
"Turnovers" real,
... | SELECT AVG("Off Reb") FROM table_33301 WHERE "FTM-FTA" = '16-17' AND "Steals" < '8' | wikisql |
CREATE TABLE table_79154 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( \u00a3 )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the money won by Frank Nobilo?
| SELECT COUNT("Money ( \u00a3 )") FROM table_79154 WHERE "Player" = 'frank nobilo' | wikisql |
CREATE TABLE table_name_43 (
english_name VARCHAR,
stat VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the name in English that had a Stat of 7th cut?
| SELECT english_name FROM table_name_43 WHERE stat = "7th cut" | sql_create_context |
CREATE TABLE table_32901 (
"Stage" text,
"Winner" text,
"General classification" text,
"Points classification" text,
"Young rider classification" text,
"Team classification" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Young rider classif... | SELECT "Young rider classification" FROM table_32901 WHERE "Stage" = '18' | wikisql |
CREATE TABLE table_61506 (
"Year" real,
"Binibining Pilipinas-Universe" text,
"Binibining Pilipinas-World" text,
"Binibining Pilipinas International" text,
"Miss Maja Pilipinas" text,
"First runner-up" text,
"Second runner-up" text
)
-- Using valid SQLite, answer the following questions fo... | SELECT "Binibining Pilipinas International" FROM table_61506 WHERE "Binibining Pilipinas-World" = 'sharmaine gutierrez' | wikisql |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT t1.culturesite FROM (SELECT microlab.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microlab WHERE DATETIME(microlab.culturetakentime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY microlab.culturesite) AS t1 WHERE t1.c1 <= 4 | eicu |
CREATE TABLE table_59814 (
"Member" text,
"Party" text,
"Electorate" text,
"State" text,
"Term of office" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What state shows for Cunningham?
| SELECT "State" FROM table_59814 WHERE "Electorate" = 'cunningham' | wikisql |
CREATE TABLE table_name_54 (
date VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date did Carlton play as the away team?
| SELECT date FROM table_name_54 WHERE away_team = "carlton" | sql_create_context |
CREATE TABLE table_61456 (
"Date" text,
"Tournament" text,
"Surface" text,
"Partnering" text,
"Opponent in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the Surface that of Tournament of valencia , spain?
| SELECT "Surface" FROM table_61456 WHERE "Tournament" = 'valencia , spain' | wikisql |
CREATE TABLE table_31392 (
"Season" text,
"Season premiere" text,
"Season finale" text,
"TV season" text,
"Ranking" text,
"Viewers (in millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did the season premiere that saw 8.4 million vi... | SELECT "Season premiere" FROM table_31392 WHERE "Viewers (in millions)" = '8.4' | wikisql |
CREATE TABLE table_29359 (
"Episode No. Episode No. refers to the episodes number in the overall series, whereas Series No. refers to the episodes number in this particular series." real,
"Series No." real,
"Episode" text,
"Director" text,
"Writer" text,
"Original airdate" text
)
-- Using vali... | SELECT COUNT("Episode") FROM table_29359 WHERE "Writer" = 'Sam Snape' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2165" AND diagnoses.long_title = "Hepatitis, unspecified" | mimicsql_data |
CREATE TABLE table_45997 (
"Player" text,
"Nationality" text,
"Jersey Number(s)" real,
"Position" text,
"Years" text,
"From" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is jersey number 3 from?
| SELECT "From" FROM table_45997 WHERE "Jersey Number(s)" = '3' | wikisql |
CREATE TABLE table_name_96 (
general_classification VARCHAR,
stage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What general classification has 4 as the stage?
| SELECT general_classification FROM table_name_96 WHERE stage = "4" | sql_create_context |
CREATE TABLE table_37586 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was the record 8 6 3?
| SELECT "Date" FROM table_37586 WHERE "Record" = '8–6–3' | wikisql |
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE (((NOT fare.round_trip_cost IS NULL AND flight_fare.fare_id = fare.fare_id AND flight.arrival_time < 1600 AND flight.flight_id = flight_fare.f... | atis |
CREATE TABLE table_9088 (
"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.
-- How many rounds was the fight when the record was 4-... | SELECT COUNT("Round") FROM table_9088 WHERE "Record" = '4-0' | wikisql |
CREATE TABLE table_32644 (
"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.
-- Who is the away team at western oval?
| SELECT "Away team score" FROM table_32644 WHERE "Venue" = 'western oval' | wikisql |
CREATE TABLE qtb (
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 COUNT(*) FROM qtb WHERE qtb.MED_SER_ORG_NO = '1165324' AND qtb.IN_HOSP_DATE BETWEEN '2002-04-26' AND '2008-06-23' AND qtb.INSU_TYPE = '儿童' UNION SELECT COUNT(*) FROM gyb WHERE gyb.MED_SER_ORG_NO = '1165324' AND gyb.IN_HOSP_DATE BETWEEN '2002-04-26' AND '2008-06-23' AND gyb.INSU_TYPE = '儿童' UNION SELECT COUNT(*) ... | css |
CREATE TABLE table_train_158 (
"id" int,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"moca_score" int,
"diastolic_blood_pressure_dbp" int,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables... | SELECT * FROM table_train_158 WHERE age >= 45 AND age <= 75 | criteria2sql |
CREATE TABLE table_203_545 (
id number,
"single/ep" text,
"release date" text,
"label" text,
"format(s)" text,
"uk singles chart position" number,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which format was used the most accordin... | SELECT "format(s)" FROM table_203_545 GROUP BY "format(s)" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departur... | SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'SEATTLE' AND flight.from_airport = airport_service.airport_code | atis |
CREATE TABLE table_name_16 (
draws INTEGER,
against VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the least amount of draws with an against of 1261?
| SELECT MIN(draws) FROM table_name_16 WHERE against = 1261 | sql_create_context |
CREATE TABLE table_2076608_3 (
founded VARCHAR,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year was Hartland College founded?
| SELECT founded FROM table_2076608_3 WHERE school = "Hartland College" | sql_create_context |
CREATE TABLE table_name_5 (
region VARCHAR,
coach VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which region is Coach Trevor Gleeson in?
| SELECT region FROM table_name_5 WHERE coach = "trevor gleeson" | sql_create_context |
CREATE TABLE table_65943 (
"Peak" text,
"Country" text,
"Elevation (m)" real,
"Prominence (m)" real,
"Col (m)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest elevation in m of moldoveanu peak, which has a prominence in m less than... | SELECT MIN("Elevation (m)") FROM table_65943 WHERE "Prominence (m)" < '2,103' AND "Peak" = 'moldoveanu peak' AND "Col (m)" < '498' | wikisql |
CREATE TABLE table_4107 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Viewers *" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many episode titles does epis... | SELECT COUNT("Title") FROM table_4107 WHERE "No. in season" = '19' | wikisql |
CREATE TABLE table_3195 (
"Episode #" real,
"Production Count" real,
"Original Airdate" text,
"Prod. Code" text,
"Title" text,
"Viewing Figures millions" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the 1st air date for the episode with a... | SELECT "Original Airdate" FROM table_3195 WHERE "Prod. Code" = 'ICEB786E' | wikisql |
CREATE TABLE table_19846 (
"No." real,
"Date" text,
"Tournament" text,
"Winning score" text,
"To par" text,
"Margin of victory" text,
"Runner-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The tournament Buick Classic occured on what dat... | SELECT "Date" FROM table_19846 WHERE "Tournament" = 'Buick Classic' | wikisql |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
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,
J... | SELECT mzjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN mzjzjlb 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 person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND per... | css |
CREATE TABLE table_62962 (
"Hampden FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many wins when the draws are less than 1 and more than 4 losses?
| SELECT AVG("Wins") FROM table_62962 WHERE "Draws" < '1' AND "Losses" > '4' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
... | (SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN 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 = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_info.RYBH = ... | css |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'spironolactone') AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY cost.hadm_id) AS t1 | mimic_iii |
CREATE TABLE table_32217 (
"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 date of the game that had a crowd la... | SELECT "Date" FROM table_32217 WHERE "Crowd" > '25,000' | wikisql |
CREATE TABLE table_6166 (
"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.
-- Which Population is the lowe... | SELECT MIN("Population") FROM table_6166 WHERE "Median family income" = '$74,905' AND "Number of households" < '145,790' | wikisql |
CREATE TABLE table_name_99 (
home_team VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who played home team at the Arden Street Oval game?
| SELECT home_team FROM table_name_99 WHERE venue = "arden street oval" | sql_create_context |
CREATE TABLE table_20475 (
"Headphone Model" text,
"Headphone Class" text,
"Driver-matched dB" text,
"Construction" text,
"Earpads" text,
"Termination" text,
"US MSRP" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many values for earpad... | SELECT COUNT("Earpads") FROM table_20475 WHERE "Headphone Class" = 'Prestige' AND "US MSRP" = '$79' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text
)
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,
... | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb 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 person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_i... | css |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'csru' AND DATETIME(transfers.intime) <= DATETIME(CURRENT_TIME(), '-4 year')) | mimic_iii |
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType ORDER BY AVG(basePrice) | nvbench |
CREATE TABLE table_53328 (
"Unit" text,
"Reactor Type" text,
"Net Capacity" text,
"Gross Capacity" text,
"Construction Start" text,
"Grid Connection" text,
"Commercial Operation" text,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "Status" FROM table_53328 WHERE "Net Capacity" = '1212 mw' | wikisql |
CREATE TABLE list (
lastname text,
firstname text,
grade number,
classroom number
)
CREATE TABLE teachers (
lastname text,
firstname text,
classroom number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find all first-grade students who are NOT ... | SELECT DISTINCT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER" | spider |
CREATE TABLE table_75177 (
"Pick #" real,
"Round" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the pick# for Lorenzo Freeman as defensive tackle?
| SELECT "Pick #" FROM table_75177 WHERE "Position" = 'defensive tackle' AND "Player" = 'lorenzo freeman' | wikisql |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate, admissions.hadm_id FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'chlorothiazide sodium' AND DATETIME(prescript... | mimic_iii |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
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,
X... | SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.JZKSMC = '放射科' AND mzjzjlb.JZKSRQ BETWEEN '2019-12-12' AND '2020-01-20' | css |
CREATE TABLE customers (
customer_id number,
customer_first_name text,
customer_last_name text,
customer_address text,
customer_phone text,
customer_email text,
other_customer_details text
)
CREATE TABLE customers_cards (
card_id number,
customer_id number,
card_type_code text,
... | SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM customers | spider |
CREATE TABLE table_62367 (
"Year" text,
"Title" text,
"Sales certified" text,
"Certification (France)" text,
"Peak position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title in 1991?
| SELECT "Title" FROM table_62367 WHERE "Year" = '1991' | wikisql |
CREATE TABLE table_52609 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home team when the visiting team is the Maverick... | SELECT "Home" FROM table_52609 WHERE "Visitor" = 'mavericks' | 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 prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND demographic.dob_year < "1850" | mimicsql_data |
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE... | SELECT DISTINCT flight_id FROM flight WHERE ((flight_days IN (SELECT DAYSalias0.days_code FROM days AS DAYSalias0 WHERE DAYSalias0.day_name IN (SELECT DATE_DAYalias0.day_name FROM date_day AS DATE_DAYalias0 WHERE DATE_DAYalias0.day_number = 27 AND DATE_DAYalias0.month_number = 8 AND DATE_DAYalias0.year = 1991)) AND to_... | atis |
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 cost (
costid num... | SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '017-49538' AND STRFTIME('%y', patient.hospitaladmittime) = '2103' | eicu |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellv... | SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-118236' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) AND NOT patient.admissionweight IS N... | eicu |
CREATE TABLE table_23015 (
"Call sign" text,
"Frequency" text,
"City of License" text,
"Licensee" text,
"Format" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 1180 am is the frequency how many call signs are there?
| SELECT COUNT("Call sign") FROM table_23015 WHERE "Frequency" = '1180 AM' | wikisql |
CREATE TABLE table_10934 (
"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 ha... | SELECT "High points" FROM table_10934 WHERE "Date" = 'march 24' | wikisql |
CREATE TABLE table_3063 (
"Week" real,
"Date" text,
"Kickoff" text,
"Opponent" text,
"Final score" text,
"Team record" text,
"Game site" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What game date was the game at AOL... | SELECT "Date" FROM table_3063 WHERE "Game site" = 'AOL Arena' | wikisql |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE icustays (
row_id number,
s... | SELECT inputevents_cv.charttime FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25997)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label... | mimic_iii |
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Dorm (
dormid INTEGER,
dor... | SELECT dorm_name, AVG(T1.Age) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name ORDER BY dorm_name | nvbench |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', medication.drugstarttime)) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-18... | eicu |
CREATE TABLE table_32092 (
"Player" text,
"Nationality" text,
"Position" text,
"Years in Toronto" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position did Jimmy Oliver of the United States play?
| SELECT "Position" FROM table_32092 WHERE "Nationality" = 'united states' AND "Player" = 'jimmy oliver' | 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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT demographic.diagnosis, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Michelle Skidmore" | mimicsql_data |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPriv... | SELECT TOP(150) AS Id, DisplayName, Age, Reputation, CreationDate, LastAccessDate, 'http://stackoverflow.com/users/' + CAST(Id AS VARCHAR) AS Url FROM Users WHERE NOT Age IS NULL AND Age <= 17 AND Reputation > 1000 ORDER BY Age, Reputation DESC | sede |
CREATE TABLE table_61850 (
"Poison/Klesha" text,
"Sanskrit" text,
"Pali" text,
"Tibetan" text,
"Alternate translations" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the pali word for pride in poison/klesha?
| SELECT "Pali" FROM table_61850 WHERE "Poison/Klesha" = 'pride' | wikisql |
CREATE TABLE table_204_15 (
id number,
"year" number,
"date" text,
"venue" text,
"city" text,
"country" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- in the chart is nara before firenze ?
| SELECT (SELECT id FROM table_204_15 WHERE "city" = 'nara') < (SELECT id FROM table_204_15 WHERE "city" = 'firenze') | squall |
CREATE TABLE table_name_48 (
game INTEGER,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the earliest game with a record of 23 6 4?
| SELECT MIN(game) FROM table_name_48 WHERE record = "23–6–4" | sql_create_context |
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 demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "LOPE2" | mimicsql_data |
CREATE TABLE table_name_42 (
home_team VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the home team in the game played at arden street oval?
| SELECT home_team AS score FROM table_name_42 WHERE venue = "arden street oval" | sql_create_context |
CREATE TABLE table_name_87 (
winner VARCHAR,
stage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won stage 16?
| SELECT winner FROM table_name_87 WHERE stage = "16" | sql_create_context |
CREATE TABLE table_2501754_2 (
original_airdate VARCHAR,
prod_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the original air date(s) for episodes with production code ipea345a?
| SELECT original_airdate FROM table_2501754_2 WHERE prod_code = "IPEA345A" | sql_create_context |
CREATE TABLE gwyjzb (
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 = '8674269' AND gwyjzb.IN_HOSP_DATE BETWEEN '2004-07-15' AND '2005-02-17' AND gwyjzb.CLINIC_TYPE = '购药' UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '8674269' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2004-07-15' AND '2005-02-17' AND fgwyjzb.CLINIC_TY... | css |
CREATE TABLE table_43077 (
"Club" text,
"Winners" real,
"Runners-up" real,
"Winning Years" text,
"Runner-up Years" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of runners-up for a club with winning years of 2010?
| SELECT COUNT("Runners-up") FROM table_43077 WHERE "Winning Years" = '2010' | wikisql |
CREATE TABLE table_26139 (
"Series episode" real,
"Season episode" real,
"Title" text,
"U.S. viewers (millions)" text,
"Original U.S. airdate" text,
"Prod. code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many millions of U.S. viewers wa... | SELECT "U.S. viewers (millions)" FROM table_26139 WHERE "Title" = 'Here Comes the Neighborhood' | wikisql |
CREATE TABLE table_name_28 (
opponent VARCHAR,
loss VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which opponent has a Loss of corcoran (4-4)?
| SELECT opponent FROM table_name_28 WHERE loss = "corcoran (4-4)" | sql_create_context |
CREATE TABLE table_16468 (
"No. in season" real,
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times did ... | SELECT COUNT("Original air date") FROM table_16468 WHERE "No. in series" = '79' | wikisql |
CREATE TABLE table_2495 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" real,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If there is 16 ... | SELECT "Position" FROM table_2495 WHERE "Points" = '16' | wikisql |
CREATE TABLE table_57796 (
"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 home team for the Princes Park venue... | SELECT "Home team" FROM table_57796 WHERE "Venue" = 'princes park' | wikisql |
CREATE TABLE table_31694 (
"Region" text,
"Host" text,
"Venue" text,
"City" text,
"State" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What venue is in Long Beach?
| SELECT "Venue" FROM table_31694 WHERE "City" = 'long beach' | wikisql |
CREATE TABLE salary (
year number,
team_id text,
league_id text,
player_id text,
salary number
)
CREATE TABLE player_award_vote (
award_id text,
year number,
league_id text,
player_id text,
points_won number,
points_max number,
votes_first text
)
CREATE TABLE player_awa... | SELECT T2.team_id FROM hall_of_fame AS T1 JOIN salary AS T2 ON T1.player_id = T2.player_id AND T1.yearid = T2.year WHERE T1.inducted = "Y" GROUP BY T2.team_id ORDER BY COUNT(*) DESC LIMIT 10 | thehistoryofbaseball |
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_req... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND date_day.day_number = 22 AND date_day.month_number = 3 AN... | atis |
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE cine... | SELECT Name, SUM(T1.Show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.Cinema_ID = T2.Cinema_ID GROUP BY T1.Cinema_ID ORDER BY SUM(T1.Show_times_per_day) DESC | nvbench |
CREATE TABLE table_10850 (
"Season" real,
"Overall" real,
"Slalom" real,
"Giant Slalom" text,
"Super G" text,
"Downhill" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Super G had a slalom of less than 5 when the giant slalom was 1?
| SELECT "Super G" FROM table_10850 WHERE "Slalom" < '5' AND "Giant Slalom" = '1' | wikisql |
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE program (
program_id int,
name varchar,
... | SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM semester INNER JOIN course_offering ON semester.semester_id = course_o... | advising |
CREATE TABLE table_name_7 (
position VARCHAR,
fa_cup_apps VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Gary Barnett who has been in 0 FA Cups plays what position?
| SELECT position FROM table_name_7 WHERE fa_cup_apps = "0" AND name = "gary barnett" | sql_create_context |
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 status (
station_i... | SELECT date, SUM(mean_temperature_f) FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3 | nvbench |
CREATE TABLE table_44402 (
"Country" text,
"CO2 emissions" text,
"Area (in km 2 )" real,
"Population" real,
"Emission / Person" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the average population of Mexico if the area is 1,972,550 kilometer... | SELECT AVG("Population") FROM table_44402 WHERE "Country" = 'mexico' AND "Area (in km 2 )" > '1,972,550' | wikisql |
CREATE TABLE table_13318 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Kickoff Time" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the kickoff time for the December 14, 2003 game?
| SELECT "Kickoff Time" FROM table_13318 WHERE "Date" = 'december 14, 2003' | wikisql |
CREATE TABLE table_name_51 (
result VARCHAR,
venue VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the outcome for Emerson Fittipaldi in the race held at Jarama?
| SELECT result FROM table_name_51 WHERE venue = "jarama" AND driver = "emerson fittipaldi" | sql_create_context |
CREATE TABLE table_69119 (
"Name" text,
"Years" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the roll number of Te Puke Intermediate, which has a decile of 4... | SELECT "Roll" FROM table_69119 WHERE "Decile" = '4' AND "Name" = 'te puke intermediate' | 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 SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '沈文乐' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2004-10-30' AND '2012-03-27' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE table_25094 (
"Year" real,
"Network" text,
"Race caller" text,
"s Host" text,
"s Analyst" text,
"Reporters" text,
"Trophy presentation" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many reporters for the year 1993?
| SELECT COUNT("Reporters") FROM table_25094 WHERE "Year" = '1993' | wikisql |
CREATE TABLE table_80412 (
"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.
-- What was the 2nd leg result in the match that scored a 2-0 in the 1st leg?
| SELECT "2nd leg" FROM table_80412 WHERE "1st leg" = '2-0' | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "2760" AND lab."CATEGORY" = "Chemistry" | mimicsql_data |
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,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | SELECT KSBM, KSMC FROM jybgb WHERE BGDH = '18891516065' | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.