instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_57851 (
"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.
-- Where was the game played when Geelong was the a... | SELECT "Venue" FROM table_57851 WHERE "Away team" = 'geelong' | wikisql |
CREATE TABLE table_204_292 (
id number,
"no." number,
"name" text,
"class" number,
"games" number,
"minutes" number,
"points" number,
"2 points\n(made/attempts)" text,
"2 points\n(%)" number,
"3 points\n(made/attempts)" text,
"3 points\n(%)" number,
"free throws\n(made/at... | SELECT COUNT("name") FROM table_204_292 WHERE "games" >= 7 AND "points" > 30 | squall |
CREATE TABLE bdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT wdmzjzjlb.JZKSBM, wdmzjzjlb.JZKSMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '98899980007' UNION SELECT bdmzjzjlb.JZKSBM, bdmzjzjlb.JZKSMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '98899980007' | css |
CREATE TABLE table_59725 (
"Outcome" text,
"Year" real,
"Championship" text,
"Opponent in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Opponent in the final after 2008 at the Paul Hunter Classic?
| SELECT "Opponent in the final" FROM table_59725 WHERE "Year" > '2008' AND "Championship" = 'paul hunter classic' | wikisql |
CREATE TABLE artwork (
artwork_id number,
type text,
name text
)
CREATE TABLE nomination (
artwork_id number,
festival_id number,
result text
)
CREATE TABLE festival_detail (
festival_id number,
festival_name text,
chair_name text,
location text,
year number,
num_of_aud... | SELECT T1.festival_id, T3.festival_name, COUNT(*) FROM nomination AS T1 JOIN artwork AS T2 ON T1.artwork_id = T2.artwork_id JOIN festival_detail AS T3 ON T1.festival_id = T3.festival_id GROUP BY T1.festival_id | spider |
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE pape... | SELECT DISTINCT writes.paperid FROM author, writes WHERE author.authorname = 'daniel epstein' AND writes.authorid = author.authorid | scholar |
CREATE TABLE table_name_72 (
placings VARCHAR,
total VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many placings did Jacqueline du Bief earn where her total score is greater than 131.26?
| SELECT placings FROM table_name_72 WHERE total > 131.26 AND name = "jacqueline du bief" | sql_create_context |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT icustays.hadm_id FROM icustays WHERE icustays.icustay_id IN (SELECT inputevents_cv.icustay_id FROM inputevents_cv WHERE inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'cariporide cc/hr' A... | mimic_iii |
CREATE TABLE table_54868 (
"Call Letters" text,
"Market" text,
"Frequency" text,
"AOR Years" text,
"Current Format" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the frequency of WMAD?
| SELECT "Frequency" FROM table_54868 WHERE "Call Letters" = 'wmad' | wikisql |
CREATE TABLE table_20998 (
"Year" real,
"Mens Open" text,
"Womens Open" text,
"Mixed Open" text,
"Mens u20" text,
"Womens u20" text,
"Senior Mixed" text,
"Mens 30" text,
"Womens 30" text,
"Mens 35" text,
"Womens 35" text,
"Mens 40" text,
"Womens 40" text,
"Mens 45... | SELECT "Mens 45" FROM table_20998 WHERE "Mens 40" = 'SunWest Razorbacks def Sydney Mets' | 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 COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '2152272' AND jybgb.BGRQ BETWEEN '2008-07-27' AND '2012-07-13' GROUP BY jybgb.KSBM HAVING COUNT(*) < 2) AS T | css |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_i... | advising |
CREATE TABLE table_name_7 (
week INTEGER,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the highest week for result of w 38-13
| SELECT MAX(week) FROM table_name_7 WHERE result = "w 38-13" | sql_create_context |
CREATE TABLE table_name_50 (
rank VARCHAR,
studio VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the ranking of the movie made at Walt Disney Pictures?
| SELECT rank FROM table_name_50 WHERE studio = "walt disney pictures" | sql_create_context |
CREATE TABLE table_name_77 (
date VARCHAR,
opponent VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was Motherwell the opponent at Fir Park?
| SELECT date FROM table_name_77 WHERE opponent = "motherwell" AND venue = "fir park" | sql_create_context |
CREATE TABLE table_dev_17 (
"id" int,
"gender" string,
"white_blood_cell_count_wbc" int,
"hemoglobin_a1c_hba1c" float,
"cd4_count" int,
"dyslipidemia" bool,
"renal_disease" bool,
"fasting_blood_glucose_fbg" float,
"creatinine_clearance_cl" float,
"platelet_count" float,
"high... | SELECT * FROM table_dev_17 WHERE (gender = 'female' AND hemoglobin_a1c_hba1c < 10) OR (gender = 'male' AND hemoglobin_a1c_hba1c < 11) AND white_blood_cell_count_wbc < 3000 AND platelet_count < 150000 AND cd4_count < 500 | criteria2sql |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2162" AND procedures.long_title = "Percutaneous [endoscopic] gastrojejunostomy" | mimicsql_data |
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 station (
id INTEG... | SELECT date, COUNT(date) FROM weather WHERE max_temperature_f > 85 ORDER BY COUNT(date) DESC | nvbench |
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 WHERE demographic.gender = "M" AND demographic.diagnosis = "HYPERGLYCEMIA;HYPONATREMIA" | mimicsql_data |
CREATE TABLE table_21477 (
"Downstream" text,
"Upstream" text,
"Bandwidth" text,
"Price TL" text,
"Every 1 GB" text,
"MAX" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many upstream speeds are there for downstream of 20 mbit/s and bandwidt... | SELECT COUNT("Upstream") FROM table_21477 WHERE "Downstream" = '20 Mbit/s' AND "Bandwidth" = '40 GB' | wikisql |
CREATE TABLE Customers (
customer_id INTEGER,
payment_method VARCHAR(10),
customer_name VARCHAR(80),
customer_phone VARCHAR(80),
customer_email VARCHAR(80),
date_became_customer DATETIME
)
CREATE TABLE Employees (
employee_id INTEGER,
employee_address_id INTEGER,
employee_name VARCH... | 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 COUNT(*) DESC | nvbench |
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE T... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop, state WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWARK' AND CIT... | atis |
CREATE TABLE table_name_32 (
score VARCHAR,
to_par VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Justin Leonard with a To par of 7's Score?
| SELECT score FROM table_name_32 WHERE to_par = "–7" AND player = "justin leonard" | sql_create_context |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id nu... | 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 = 24921)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label... | mimic_iii |
CREATE TABLE table_203_670 (
id number,
"pos" text,
"driver" text,
"entrant" text,
"constructor" text,
"time/retired" text,
"grid" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how long did innes ireland take to complete the 8th glover tr... | SELECT "time/retired" FROM table_203_670 WHERE "driver" = 'innes ireland' | squall |
CREATE TABLE table_name_10 (
score VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the score when Orient was home?
| SELECT score FROM table_name_10 WHERE home_team = "orient" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJ... | css |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id ... | SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7375)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ... | mimic_iii |
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 Price, Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder | nvbench |
CREATE TABLE table_4944 (
"Rank" text,
"Name" text,
"Height m / feet" text,
"Floors" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the height for shanghai x-1 financial building?
| SELECT "Height m / feet" FROM table_4944 WHERE "Name" = 'shanghai x-1 financial building' | wikisql |
CREATE TABLE table_1341690_9 (
incumbent VARCHAR,
first_elected VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the incumbent in 1940?
| SELECT incumbent FROM table_1341690_9 WHERE first_elected = 1940 | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9cod... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'bradycardia - s... | eicu |
CREATE TABLE table_204_88 (
id number,
"year" number,
"english title" text,
"japanese" text,
"romanization" text,
"type" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- were more air on tv or video ?
| SELECT "type" FROM table_204_88 WHERE "type" IN ('tv', 'video') GROUP BY "type" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_name_30 (
assembled VARCHAR,
elected VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Assembled has Elected of 1562/63?
| SELECT assembled FROM table_name_30 WHERE elected = "1562/63" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
ic... | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-187132')) AND medication.routeadmin = 'ng tube' ORDER BY medica... | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Diabetes mellitus without mention of complication, type II or unspecified type, uncontrolle... | mimicsql_data |
CREATE TABLE table_name_51 (
score VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score on January 23?
| SELECT score FROM table_name_51 WHERE date = "january 23" | sql_create_context |
CREATE TABLE table_name_18 (
crowd VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the crowd size at Victoria Park?
| SELECT crowd FROM table_name_18 WHERE venue = "victoria park" | sql_create_context |
CREATE TABLE table_20597634_3 (
poll_source VARCHAR,
scott_mcadams__d_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 30% is scott mcadams (d) percentage how many poll sources are there?
| SELECT COUNT(poll_source) FROM table_20597634_3 WHERE scott_mcadams__d_ = "30%" | sql_create_context |
CREATE TABLE table_31377 (
"Result" text,
"Date" text,
"Race" text,
"Venue" text,
"Group" text,
"Distance" text,
"Weight (kg)" text,
"Jockey" text,
"Winner/2nd" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What many times was the v... | SELECT COUNT("Date") FROM table_31377 WHERE "Race" = 'Victoria Derby' | wikisql |
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.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.Y... | css |
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 medication (
medi... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-9636')) AND NOT vitalperiodic.systemicdiastolic... | eicu |
CREATE TABLE Undergoes (
Patient INTEGER,
Procedures INTEGER,
Stay INTEGER,
DateUndergoes DATETIME,
Physician INTEGER,
AssistingNurse INTEGER
)
CREATE TABLE Block (
BlockFloor INTEGER,
BlockCode INTEGER
)
CREATE TABLE Stay (
StayID INTEGER,
Patient INTEGER,
Room INTEGER,
... | SELECT Name, COUNT(Name) FROM Appointment AS T1 JOIN Patient AS T2 ON T1.Patient = T2.SSN GROUP BY Name ORDER BY COUNT(Name) | nvbench |
CREATE TABLE table_14477002_1 (
time___et__ VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show all the time(et) where the opponent is the Cincinnati Bengals.
| SELECT time___et__ FROM table_14477002_1 WHERE opponent = "Cincinnati Bengals" | sql_create_context |
CREATE TABLE table_name_68 (
record VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the record on March 22?
| SELECT record FROM table_name_68 WHERE date = "march 22" | sql_create_context |
CREATE TABLE table_name_56 (
drawn INTEGER,
played VARCHAR,
points VARCHAR,
lost VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which average Drawn has Points smaller than 14, and a Lost smaller than 4, and a Played larger than 9?
| SELECT AVG(drawn) FROM table_name_56 WHERE points < 14 AND lost < 4 AND played > 9 | sql_create_context |
CREATE TABLE table_name_89 (
third_place VARCHAR,
total_wins VARCHAR,
winners VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is third-place with less than 5 total wins with china b as the winners?
| SELECT third_place FROM table_name_89 WHERE total_wins < 5 AND winners = "china b" | sql_create_context |
CREATE TABLE table_63481 (
"Year" real,
"Title" text,
"Director" text,
"Studio(s)" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the director of Antz?
| SELECT "Director" FROM table_63481 WHERE "Title" = 'antz' | wikisql |
CREATE TABLE table_name_74 (
unit VARCHAR,
type VARCHAR,
origin VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the unit for a submarine type ship from Norway?
| SELECT unit FROM table_name_74 WHERE type = "submarine" AND origin = "norway" | sql_create_context |
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 text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.diagnosis = "INFECTED RIGHT THIGH GRAFT" | mimicsql_data |
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND procedures.short_title = "Oth uni salpingo-oophor" | mimicsql_data |
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 COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '8187686' AND jybgb.BGRQ BETWEEN '2013-10-06' AND '2017-08-03' GROUP BY jybgb.KSBM HAVING COUNT(*) > 23) AS T | css |
CREATE TABLE table_name_37 (
liberal VARCHAR,
new_democratic VARCHAR,
dates VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- According to the August 2008 poll that reported 36% New Demcratic, what percentage aligned with the Liberal party?
| SELECT liberal FROM table_name_37 WHERE new_democratic = "36%" AND dates = "august 2008" | sql_create_context |
CREATE TABLE table_train_45 (
"id" int,
"child_pugh_class" string,
"consent" bool,
"renal_disease" bool,
"hepatic_disease" bool,
"intestinal_obstruction" bool,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- patients... | SELECT * FROM table_train_45 WHERE age >= 16 | criteria2sql |
CREATE TABLE table_52433 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average rank of a country with less than 13 bronze medals, a total of 11 medals,... | SELECT AVG("Rank") FROM table_52433 WHERE "Bronze" < '13' AND "Total" = '11' AND "Gold" > '4' | wikisql |
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 COUNT(*) FROM zyjzjlb WHERE zyjzjlb.JZKSDM = '901' AND zyjzjlb.RYDJSJ BETWEEN '2004-09-08' AND '2008-02-06' | css |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
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,
... | SELECT * FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy... | css |
CREATE TABLE table_name_15 (
venue VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the game held that resulted in a score of 9-2?
| SELECT venue FROM table_name_15 WHERE score = "9-2" | sql_create_context |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostHistoryTypes (
Id number,
Name te... | SELECT t1.TagName, COUNT(t1.TagName) FROM Posts AS p LEFT JOIN Tags AS t1 ON p.Tags LIKE '%<' + t1.TagName + '>%' WHERE p.PostTypeId = 1 AND p.Tags LIKE '%<' + @Tag + '>%' AND t1.TagName != @Tag GROUP BY t1.TagName ORDER BY COUNT(t1.TagName) DESC | sede |
CREATE TABLE table_train_1 (
"id" int,
"sinusal_rhythm" bool,
"severe_sepsis" bool,
"hemodynamic_instability" bool,
"social_security" bool,
"septic_shock" bool,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- patient... | SELECT * FROM table_train_1 WHERE social_security = 1 | criteria2sql |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
... | 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 = 'DALLAS' AND date_day.day_number = 27 AND date_day.month_number = 8 AND d... | atis |
CREATE TABLE table_name_76 (
city VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What city is University Gym (Gold Mine) in?
| SELECT city FROM table_name_76 WHERE venue = "university gym (gold mine)" | sql_create_context |
CREATE TABLE table_203_338 (
id number,
"#" number,
"title" text,
"date" text,
"director" text,
"story" text,
"synopsis" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the last date of the cartoon directed by gerry ... | SELECT "date" FROM table_203_338 WHERE "director" = 'gerry chiniquy' ORDER BY "date" DESC LIMIT 1 | squall |
CREATE TABLE table_15499 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was European Championships held with notes of 61.46 m?
| SELECT "Venue" FROM table_15499 WHERE "Competition" = 'european championships' AND "Notes" = '61.46 m' | wikisql |
CREATE TABLE table_68899 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the place in Australia that had a score of 70?
| SELECT "Place" FROM table_68899 WHERE "Score" = '70' AND "Country" = 'australia' | wikisql |
CREATE TABLE chip_model (
model_name VARCHAR,
launch_year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List all the model names sorted by their launch year.
| SELECT model_name FROM chip_model ORDER BY launch_year | sql_create_context |
CREATE TABLE table_name_87 (
album VARCHAR,
label VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Album has a Label of msb 801?
| SELECT album FROM table_name_87 WHERE label = "msb 801" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.admityear < "2158" | mimicsql_data |
CREATE TABLE table_7710 (
"Draw" real,
"Artist" text,
"Song" text,
"Televote" real,
"Place" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total of televote for the artist Pokeris when the place was less than 10?
| SELECT SUM("Televote") FROM table_7710 WHERE "Artist" = 'pokeris' AND "Place" < '10' | wikisql |
CREATE TABLE table_name_31 (
venue VARCHAR,
score VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What venue hosted a match with a 3-0 score on December 7, 2002?
| SELECT venue FROM table_name_31 WHERE score = "3-0" AND date = "december 7, 2002" | sql_create_context |
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TAB... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE area.area LIKE '%theory%' AND program_course.workload < (SELECT MIN(PROGRAM_COURSEalias1.... | advising |
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '69712527074' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY SUM(t_kc22.SELF_PAY_AMO) DES... | css |
CREATE TABLE albums (
id number,
title text,
artist_id number
)
CREATE TABLE invoices (
id number,
customer_id number,
invoice_date time,
billing_address text,
billing_city text,
billing_state text,
billing_country text,
billing_postal_code text,
total number
)
CREATE T... | SELECT COUNT(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = "Billy Cobham" | spider |
CREATE TABLE category (
id int,
business_id varchar,
category_name varchar
)
CREATE TABLE review (
rid int,
business_id varchar,
user_id varchar,
rating float,
text longtext,
year int,
month varchar
)
CREATE TABLE tip (
tip_id int,
business_id varchar,
text longtext... | SELECT COUNT(DISTINCT (business.name)) FROM business, category WHERE business.city = 'Edinburgh' AND category.business_id = business.business_id AND category.category_name = 'Pet Groomers' | yelp |
CREATE TABLE employees (
first_name VARCHAR,
department_id VARCHAR
)
CREATE TABLE departments (
department_name VARCHAR,
department_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Display the first name and department name for each employee.
| SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id | sql_create_context |
CREATE TABLE table_11621915_1 (
location VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the location with tournament value of quicksilver classic
| SELECT location FROM table_11621915_1 WHERE tournament = "Quicksilver Classic" | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.admityear < "2107" | 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 demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "30" AND diagnoses.short_title = "Chr diastolic hrt fail" | mimicsql_data |
CREATE TABLE table_name_63 (
to_par INTEGER,
player VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which To par has a Player of jack nicklaus, and a Total smaller than 146?
| SELECT AVG(to_par) FROM table_name_63 WHERE player = "jack nicklaus" AND total < 146 | sql_create_context |
CREATE TABLE Medication (
Code INTEGER,
Name VARCHAR(30),
Brand VARCHAR(30),
Description VARCHAR(30)
)
CREATE TABLE Department (
DepartmentID INTEGER,
Name VARCHAR(30),
Head INTEGER
)
CREATE TABLE Physician (
EmployeeID INTEGER,
Name VARCHAR(30),
Position VARCHAR(30),
SSN I... | SELECT Name, COUNT(*) FROM Medication AS T1 JOIN Prescribes AS T2 ON T1.Code = T2.Medication GROUP BY T1.Brand ORDER BY COUNT(*) | nvbench |
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 MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.admission_location = "EMERGENCY ROOM ADMIT" | mimicsql_data |
CREATE TABLE table_name_61 (
time_retired VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the Time/Retired of Ivan Capelli?
| SELECT time_retired FROM table_name_61 WHERE driver = "ivan capelli" | sql_create_context |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jo... | SELECT COUNT(DISTINCT instructor.instructor_id) FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'GEOSCI' AND course.number = 503 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.off... | advising |
CREATE TABLE table_name_16 (
lyrics__l____music__m_ VARCHAR,
position VARCHAR,
place VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the Lyrics (l) and Music (m) for the Artist who was in a Position higher than 3 and who earned 1st Place?
| SELECT lyrics__l____music__m_ FROM table_name_16 WHERE position > 3 AND place = "1st" | sql_create_context |
CREATE TABLE table_46253 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Event" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Year, when Venue is Rio De Janeiro, Brazil?
| SELECT MIN("Year") FROM table_46253 WHERE "Venue" = 'rio de janeiro, brazil' | wikisql |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | SELECT COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '水锐逸' AND mzjzjlb.JZKSRQ BETWEEN '2001-09-03' AND '2020-09-18' AND mzjzjlb.YLJGDM = '2777621' | css |
CREATE TABLE table_name_8 (
team VARCHAR,
position VARCHAR,
pick VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the team that has a pick less than 154 and an offensive guard position?
| SELECT team FROM table_name_8 WHERE position = "offensive guard" AND pick < 154 | 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 diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime ti... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'status autm crd dfbrltr')) AND STRFTIME('%y', cost.chargetime) ... | mimic_iii |
CREATE TABLE table_name_74 (
nationality VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the nationality of the player Tom Boswell?
| SELECT nationality FROM table_name_74 WHERE player = "tom boswell" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
a... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age >= 60) AND STRFTIME('%y', treatment.treatmenttime) = '2103' GROUP BY treatment.treatmentname... | eicu |
CREATE TABLE table_9698 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the home team when the away team was Bristol Rovers?
| SELECT "Home team" FROM table_9698 WHERE "Away team" = 'bristol rovers' | wikisql |
CREATE TABLE table_44138 (
"Poll" text,
"Pre- season" text,
"Mar 3" text,
"Mar 17" text,
"Mar 24" text,
"Mar 31" text,
"April 7" text,
"April 14" text,
"April 21" text,
"April 28" text,
"May 5" text,
"May 12" text,
"May 19" text,
"May 26" text,
"Final" text
)
... | SELECT "April 28" FROM table_44138 WHERE "Final" = '20' AND "Mar 17" = '22' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT qtb.MED_CLINIC_ID FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.PERSON_NM = '周兴业' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2004-02-07' AND '2017-11-24' UNION SELECT gyb.MED_CLINIC_ID FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gyb.PERSON_NM = '周兴业' AND t_kc24.CL... | css |
CREATE TABLE table_name_60 (
event VARCHAR,
method VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the event when the method was tko (punches), and the record was 7-1?
| SELECT event FROM table_name_60 WHERE method = "tko (punches)" AND record = "7-1" | sql_create_context |
CREATE TABLE table_57058 (
"VCTP" text,
"VCA 155" text,
"VCTM" text,
"VCPC" text,
"VCLC" text,
"VCRT" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If there is a VCPC of 75km/h (47mph) what is the VCA?
| SELECT "VCA 155" FROM table_57058 WHERE "VCPC" = '75km/h (47mph)' | wikisql |
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_kc24 WHERE t_kc21_t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4849032' AND t_kc21.MED_ORG_DEPT_CD = '690') AND t_kc24.CLINIC_SLT_DATE BETWEEN '2003-09-05' AND '2009-06-13' | css |
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 JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '吴莹华' AND t_kc22.STA_DATE BETWEEN '2003-12-27' AND '2019-01-29' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.... | css |
CREATE TABLE table_name_40 (
height VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The year 1972 has what written in Height column?
| SELECT height FROM table_name_40 WHERE year = 1972 | sql_create_context |
CREATE TABLE table_12404 (
"Place" real,
"Nation" text,
"First Exercise" real,
"Second Exercise" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total for the first exercise and has 18 as the second exercise?
| SELECT SUM("First Exercise") FROM table_12404 WHERE "Second Exercise" = '18' | wikisql |
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,... | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city... | atis |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.