instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "React-oth vasc dev/graft" AND lab.flag = "abnormal" | mimicsql_data |
CREATE TABLE table_38083 (
"Rank" real,
"Club" text,
"Seasons" real,
"Played" real,
"Drew" real,
"Lost" real,
"Points" real,
"Avg. Points" real,
"Goals for" real,
"Goals against" real,
"Goal diff" real
)
-- Using valid SQLite, answer the following questions for the tables p... | SELECT COUNT("Drew") FROM table_38083 WHERE "Rank" = '5' AND "Played" > '30' | wikisql |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREA... | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '031-13920' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '031-13920' AND patient.hospitaldischargetime IS NULL)) AND tr... | eicu |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE T... | SELECT COUNT(*) AS Total, COUNT(p.AcceptedAnswerId) AS Answered, (CAST(COUNT(p.AcceptedAnswerId) AS FLOAT) / COUNT(*) * 100) AS Percentage FROM Posts AS p JOIN PostTags AS pt ON p.Id = pt.PostId JOIN Tags AS t ON pt.TagId = t.Id WHERE t.TagName = @TagName AND p.PostTypeId = 1 | sede |
CREATE TABLE table_204_939 (
id number,
"year" number,
"chassis" text,
"engine" text,
"start" text,
"finish" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- did 1979 or 1985 have the larger finish place ?
| SELECT "year" FROM table_204_939 WHERE "year" IN (1979, 1985) ORDER BY "finish" DESC LIMIT 1 | squall |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "NEWBORN" AND prescriptions.drug_type = "MAIN" | mimicsql_data |
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 lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-16572' AND patient.hospitaldischargetime IS NULL)) ORDER BY lab.labresulttime LIMIT 1 | eicu |
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | SELECT Date_of_Birth, Height FROM people ORDER BY Height DESC | nvbench |
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_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '73598639069' | css |
CREATE TABLE table_53826 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the Runner(s)-up on the Date 4 Oct 2009?
| SELECT "Runner(s)-up" FROM table_53826 WHERE "Date" = '4 oct 2009' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2172" AND diagnoses.long_title = "Contact dermatitis and other eczema, unspecified cause" | mimicsql_data |
CREATE TABLE Discount_Coupons (
coupon_amount VARCHAR,
coupon_id VARCHAR
)
CREATE TABLE customers (
coupon_id VARCHAR,
good_or_bad_customer VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the coupon amount of the coupons owned by both good a... | SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'good' INTERSECT SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'bad' | sql_create_context |
CREATE TABLE table_52982 (
"Season" text,
"Pyramid Level" text,
"Regular Season 1" text,
"Playoffs 1" text,
"Regular Season 2" text,
"Playoffs 2" text,
"Copa M\u00e9xico" text,
"CONCACAF" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT "Regular Season 1" FROM table_52982 WHERE "Copa M\u00e9xico" = 'no longer played' AND "Pyramid Level" = '2' AND "Regular Season 2" = '15th' | wikisql |
CREATE TABLE table_name_21 (
position VARCHAR,
height_in_ft VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Position, when Height in Ft. is 6-10?
| SELECT position FROM table_name_21 WHERE height_in_ft = "6-10" | sql_create_context |
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 patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'cerebral subdural hematoma - secondary to trauma' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-4 year')) | eicu |
CREATE TABLE table_name_4 (
tournament VARCHAR,
outcome VARCHAR,
surface VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Tournament has an Outcome of winner, and a Surface of hard (i)?
| SELECT tournament FROM table_name_4 WHERE outcome = "winner" AND surface = "hard (i)" | 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 COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '2335631' AND t_kc21.IN_HOSP_DATE BETWEEN '2011-06-24' AND '2021-07-31' AND t_kc21.INSURED_STS = '未就业' AND t_kc21.MED_AMOUT >= 7979.89 | css |
CREATE TABLE table_35889 (
"Date" text,
"Competition" text,
"Opponents" text,
"Venue" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent at the away game with a score of 5-4?
| SELECT "Opponents" FROM table_35889 WHERE "Venue" = 'away' AND "Score" = '5-4' | wikisql |
CREATE TABLE table_35200 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When is the most recent year with more than 27 points and more than 5 wins?
| SELECT MAX("Year") FROM table_35200 WHERE "Points" > '27' AND "Wins" > '5' | wikisql |
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 SUM(cost.cost) FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-69150' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1) | eicu |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT mzjzjlb.JZLSH 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 pers... | css |
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 t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '37030215' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 2381.99) | css |
CREATE TABLE table_1231892_4 (
number_in_series VARCHAR,
broadcast_order VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the number of episodes with a broadcast order s04 e07?
| SELECT COUNT(number_in_series) FROM table_1231892_4 WHERE broadcast_order = "S04 E07" | sql_create_context |
CREATE TABLE table_52247 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who constructed the car with laps more than 70 and a time/retired of +12.535?
| SELECT "Constructor" FROM table_52247 WHERE "Laps" > '70' AND "Time/Retired" = '+12.535' | wikisql |
CREATE TABLE table_73062 (
"Parliament" text,
"Name" text,
"Period in office" text,
"Birth and death years" text,
"General election contested" real,
"Constituency contested" text,
"Political party" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "Period in office" FROM table_73062 WHERE "Parliament" = '11th' | 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 WHERE demographic.language = "SPAN" AND demographic.admission_location = "CLINIC REFERRAL/PREMATURE" | mimicsql_data |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id nu... | SELECT t2.drug FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 64136 AND diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'chr pu... | mimic_iii |
CREATE TABLE table_204_526 (
id number,
"name" text,
"#" number,
"position" text,
"height" text,
"weight" number,
"year" text,
"home town" text,
"high school" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the number of fres... | SELECT COUNT(*) FROM table_204_526 WHERE "year" = 'freshman' | squall |
CREATE TABLE table_73692 (
"Series #" real,
"Season #" text,
"Episode" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Viewers (in millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the season number is 2.08... | SELECT "Written by" FROM table_73692 WHERE "Season #" = '2.08' | wikisql |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskStates (
Id number,
... | SELECT Id AS "post_link", Tags, ViewCount, Score FROM Posts WHERE Tags LIKE '%##Tag?lvm##%' AND NOT Tags LIKE '%##Filter1?llvm##%' AND NOT Tags LIKE '%##Filter2?visualvm##%' AND NOT AcceptedAnswerId IS NULL AND ClosedDate IS NULL AND CommunityOwnedDate IS NULL AND Score > 0 ORDER BY ViewCount DESC LIMIT 100 | sede |
CREATE TABLE table_70255 (
"Institution" text,
"Main Campus Location" text,
"Founded" real,
"Mascot" text,
"School Colors" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which School Colors were Founded of 1969, with an Institution of barton communi... | SELECT "School Colors" FROM table_70255 WHERE "Founded" = '1969' AND "Institution" = 'barton community college' | wikisql |
CREATE TABLE county_public_safety (
county_id number,
name text,
population number,
police_officers number,
residents_per_officer number,
case_burden number,
crime_rate number,
police_force text,
location text
)
CREATE TABLE city (
city_id number,
county_id number,
name ... | SELECT T1.white, T2.crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.county_id = T2.county_id | spider |
CREATE TABLE table_name_72 (
car__number VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Brendan Gaughan's Car #?
| SELECT car__number FROM table_name_72 WHERE driver = "brendan gaughan" | sql_create_context |
CREATE TABLE table_train_247 (
"id" int,
"mini_mental_state_examination_mmse" int,
"creatinine_consistently" float,
"creatinine_clearance_cl" float,
"seizure_disorder" bool,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-... | SELECT * FROM table_train_247 WHERE seizure_disorder = 1 | criteria2sql |
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 demographic ... | SELECT prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "Caphosol" | mimicsql_data |
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 t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'cultures - blood' AND DATETIME(treatment.treatment... | eicu |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodi... | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-28507')) AND treatment.treatmentname = 'vte prophylaxis - compression st... | eicu |
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 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 '2002-04-08' AND '2016-02-13' AND t_kc22.SELF_PAY_AMO > 3400.0 UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwyjzb.PE... | css |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEP... | SELECT LAST_NAME, COUNT(LAST_NAME) FROM employees WHERE SALARY > (SELECT SALARY FROM employees WHERE EMPLOYEE_ID = 163) GROUP BY LAST_NAME ORDER BY COUNT(LAST_NAME) DESC | nvbench |
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 TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_... | SELECT DISTINCT flight.flight_id FROM fare, flight, flight_fare WHERE (((flight.departure_time < 800 AND flight.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 = 24 AND DATE_D... | atis |
CREATE TABLE table_51234 (
"Driver" text,
"Car #" real,
"Make" text,
"Points" real,
"Laps" real,
"Winnings" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many laps did Jeff Burton have when he drove car with a # over 9 and more than 118 poi... | SELECT COUNT("Laps") FROM table_51234 WHERE "Car #" > '9' AND "Driver" = 'jeff burton' AND "Points" > '118' | wikisql |
CREATE TABLE zyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT qtb.IN_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '3775508' GROUP BY qtb.IN_DIAG_DIS_NM UNION SELECT gyb.IN_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '3775508' GROUP BY gyb.IN_DIAG_DIS_NM UNION SELECT zyb.IN_DIAG_DIS_NM, AVG(zyb.PERSON_AGE) FROM zyb WHERE zyb.... | css |
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What ... | SELECT title, AVG(stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title ORDER BY title DESC | nvbench |
CREATE TABLE table_36946 (
"Season" text,
"Tropical Lows" real,
"Tropical Cyclones" real,
"Severe Tropical Cyclones" real,
"Strongest storm" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the least number of tropical cyclones when the strong... | SELECT MIN("Severe Tropical Cyclones") FROM table_36946 WHERE "Strongest storm" = 'tiffany' AND "Tropical Lows" > '10' | wikisql |
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 = "URGENT" AND demographic.insurance = "Medicare" | mimicsql_data |
CREATE TABLE table_name_55 (
years VARCHAR,
decile VARCHAR,
area VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which years have a Decile larger than 4, and an Area of thames?
| SELECT years FROM table_name_55 WHERE decile > 4 AND area = "thames" | sql_create_context |
CREATE TABLE organisations (
organisation_id number,
organisation_type text,
organisation_details text
)
CREATE TABLE project_outcomes (
project_id number,
outcome_code text,
outcome_details text
)
CREATE TABLE research_outcomes (
outcome_code text,
outcome_description text
)
CREATE T... | SELECT project_details FROM projects WHERE NOT project_id IN (SELECT project_id FROM project_staff WHERE role_code = 'researcher') | spider |
CREATE TABLE table_50227 (
"Player" text,
"Sacks" real,
"Ints" real,
"Int Yds" real,
"Int LG" real,
"Int TD" real,
"Fumb R." real,
"Fumb Yds" real,
"Fumb LG" real,
"Fumb TD" real,
"Fumb F." real
)
-- Using valid SQLite, answer the following questions for the tables provided... | SELECT MAX("Fumb Yds") FROM table_50227 WHERE "Fumb F." = '0' AND "Int LG" < '0' | wikisql |
CREATE TABLE table_name_51 (
role VARCHAR,
registration VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the role of the aircraft that has a registration of s5-hpb?
| SELECT role FROM table_name_51 WHERE registration = "s5-hpb" | sql_create_context |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '张采文' AND NOT zyjzjlb.JZLSH IN (SELECT zyjybgb.JZLSH FROM zyjybgb WHERE zyjybgb.BGRQ <= '2006-07-17' UNI... | css |
CREATE TABLE table_name_99 (
points VARCHAR,
laps VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points have 88 laps and a grid of 14?
| SELECT points FROM table_name_99 WHERE laps = "88" AND grid = "14" | sql_create_context |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9... | SELECT COUNT(*) > 0 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'renal sclerosis nos') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52604) AND STRFTIME('%y', diagnos... | mimic_iii |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtim... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypomagnesemia' AND STRFTIME('%y', diagnosis.diagn... | eicu |
CREATE TABLE gyb (
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 = '1577129' AND qtb.IN_HOSP_DATE BETWEEN '2001-12-14' AND '2004-04-11' AND qtb.INSU_TYPE = '儿童' UNION SELECT COUNT(*) FROM gyb WHERE gyb.MED_SER_ORG_NO = '1577129' AND gyb.IN_HOSP_DATE BETWEEN '2001-12-14' AND '2004-04-11' AND gyb.INSU_TYPE = '儿童' UNION SELECT COUNT(*) ... | css |
CREATE TABLE table_train_36 (
"id" int,
"do_not_resuscitate_dnr" bool,
"active_infection" bool,
"sepsis" bool,
"vasospastic_diathesis" bool,
"septic_shock" bool,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- must b... | SELECT * FROM table_train_36 WHERE age >= 18 | criteria2sql |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT ACC_Road, COUNT(ACC_Road) FROM basketball_match GROUP BY ACC_Road ORDER BY COUNT(ACC_Road) | nvbench |
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
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_s... | 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN... | atis |
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Personal history of venous thrombosis and embolism" AND lab.flag = "delta" | mimicsql_data |
CREATE TABLE table_49763 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is score of a team with tie of 4?
| SELECT "Score" FROM table_49763 WHERE "Tie no" = '4' | wikisql |
CREATE TABLE table_51611 (
"Date" text,
"Opponents" text,
"Score" text,
"Competition" text,
"Match Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the match report for July 10, 2005?
| SELECT "Match Report" FROM table_51611 WHERE "Date" = 'july 10, 2005' | wikisql |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY... | SELECT LAST_NAME, COUNT(LAST_NAME) FROM employees WHERE SALARY > (SELECT SALARY FROM employees WHERE EMPLOYEE_ID = 163) GROUP BY LAST_NAME ORDER BY LAST_NAME DESC | nvbench |
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 PostFeedback (
Id number,
PostId numb... | SELECT p.Id, p.Tags, p.Title, CAST((JULIANDAY(CreationDate) - JULIANDAY(p.CreationDate)) * 24.0 AS INT) FROM Posts AS p INNER JOIN Posts AS p2 ON p.AcceptedAnswerId = p2.Id WHERE p.Id IN (12999100) | sede |
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.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 = jyjgzbb.YLJGDM AND jyb... | css |
CREATE TABLE table_80311 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What shows for nationality when there is a rank larger than 6, and a Time of 2:14.95?
| SELECT "Nationality" FROM table_80311 WHERE "Rank" > '6' AND "Time" = '2:14.95' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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,
C... | SELECT t_kc22.CHA_ITEM_LEV 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 = '33093402015' AND t_kc22.SOC_SRT_DIRE_CD = '9444' | css |
CREATE TABLE table_54613 (
"Stage" real,
"Date" text,
"Course" text,
"Distance" text,
"Winner" text,
"GC Leader" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the GC leader at vila - segovia?
| SELECT "GC Leader" FROM table_54613 WHERE "Course" = 'ávila - segovia' | 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 SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '86180866510') INTERSECT (SELECT SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '58178153397') | css |
CREATE TABLE table_29041 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided a... | SELECT "Title" FROM table_29041 WHERE "Directed by" = 'Jeff Woolnough' AND "Written by" = 'Christopher Ambrose' | wikisql |
CREATE TABLE table_1341598_22 (
result VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of results for james shannon?
| SELECT COUNT(result) FROM table_1341598_22 WHERE incumbent = "James Shannon" | sql_create_context |
CREATE TABLE table_22856 (
"Year" real,
"Worldwide" real,
"Africa" real,
"America" real,
"Asia" real,
"Australia" real,
"Europe" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the latest year that Europe had 471895?
| SELECT MAX("Year") FROM table_22856 WHERE "Europe" = '471895' | wikisql |
CREATE TABLE table_73397 (
"State (class)" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date of successors formal installation" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are all the states (class) when the successor w... | SELECT "State (class)" FROM table_73397 WHERE "Successor" = 'Joseph Anderson ( DR )' | wikisql |
CREATE TABLE people (
people_id number,
sex text,
name text,
date_of_birth text,
height number,
weight number
)
CREATE TABLE candidate (
candidate_id number,
people_id number,
poll_source text,
date text,
support_rate number,
consider_rate number,
oppose_rate number,... | SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate ... | SELECT u1.Id AS "user_link", u2.Reputation FROM StackOverflow.dbo.Users AS u1 INNER JOIN "stackexchange.meta".dbo.Users AS u2 ON u1.AccountId = u2.AccountId WHERE u1.Reputation BETWEEN 65000 AND 67000 AND u2.Reputation BETWEEN 12000 AND 14000 LIMIT 10 | sede |
CREATE TABLE table_28780 (
"Year (Ceremony)" text,
"English title" text,
"Arabic title" text,
"Director" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 2012 (85th) is the year (ceremony) how many results?
| SELECT COUNT("Result") FROM table_28780 WHERE "Year (Ceremony)" = '2012 (85th)' | wikisql |
CREATE TABLE table_204_647 (
id number,
"year" number,
"film" text,
"role" text,
"language" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many languages has he been in that are in the telugu language ?
| SELECT COUNT(*) FROM table_204_647 WHERE "language" = 'telugu' | squall |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayNa... | SELECT Id, AnswerCount, Body, Tags FROM Posts WHERE Id IN (SELECT PostId FROM PostTags WHERE TagId = '5990' INTERSECT SELECT PostId FROM PostTags WHERE TagId = '16' INTERSECT SELECT PostId FROM PostTags WHERE TagId = '12408') | sede |
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 demographic.marital_status, demographic.admittime FROM demographic WHERE demographic.subject_id = "29767" | mimicsql_data |
CREATE TABLE table_49550 (
"Volume:Issue" text,
"Issue date(s)" text,
"Weeks at number one" real,
"Song" text,
"Artist(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Song has an Issue date(s) of 29 may - 26 june?
| SELECT "Song" FROM table_49550 WHERE "Issue date(s)" = '29 may - 26 june' | wikisql |
CREATE TABLE table_20620 (
"Missouri vs." text,
"Overall Record" text,
"at Columbia" text,
"at Opponents Venue" text,
"at Neutral Site" text,
"Last 5 Meetings" text,
"Last 10 Meetings" text,
"Current Streak" text,
"Since Joining SEC" text
)
-- Using valid SQLite, answer the followi... | SELECT "Last 5 Meetings" FROM table_20620 WHERE "Overall Record" = 'UM, 2-1' | wikisql |
CREATE TABLE table_2950964_1 (
title VARCHAR,
_number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title of book number 8?
| SELECT title FROM table_2950964_1 WHERE _number = "8" | sql_create_context |
CREATE TABLE table_24800 (
"District" text,
"Municipalities" real,
"Parishes" real,
"Province of 1936" text,
"Region" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name province of 1936 viana do castelo
| SELECT "Province of 1936" FROM table_24800 WHERE "District" = 'Viana do Castelo' | wikisql |
CREATE TABLE table_name_22 (
oppose VARCHAR,
poll_source VARCHAR,
unsure VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What percentage of people were opposed to the candidate based on the Time Poll poll that showed 6% of people were unsure?
| SELECT oppose FROM table_name_22 WHERE poll_source = "time poll" AND unsure = "6%" | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CEREBRAL ANEURYSM/SDA" AND demographic.dob_year < "2126" | mimicsql_data |
CREATE TABLE song (
song_name varchar2(50),
artist_name varchar2(50),
country varchar2(20),
f_id number(10),
genre_is varchar2(20),
rating number(10),
languages varchar2(20),
releasedate Date,
resolution number(10)
)
CREATE TABLE artist (
artist_name varchar2(50),
country va... | SELECT T1.country, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = "Female" AND T2.languages = "bangla" GROUP BY T1.country | nvbench |
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id WHERE program_cour... | advising |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
... | SELECT CAST(DATEADD(week, DATEDIFF(week, @epoch, CreationDate), @epoch) AS DATE) AS week, COUNT(CASE WHEN VoteTypeId = 2 THEN 1 END) * 1.0 / COUNT(*) AS up_down_ratio, AVG(Score * 1.0) AS avg_score FROM Posts AS p JOIN Votes AS v ON PostId = p.Id WHERE PostTypeId = 1 AND VoteTypeId IN (2, 3) AND p.CreationDate > @First... | sede |
CREATE TABLE table_name_57 (
years VARCHAR,
runners_up VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the year of the competition in which Odd Grenland was the runner-up?
| SELECT years FROM table_name_57 WHERE runners_up = "odd grenland" | sql_create_context |
CREATE TABLE table_79663 (
"Date" text,
"Series" text,
"Circuit" text,
"City / State" text,
"Winner" text,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the Winner of the Nissan Motorsport Australia Team at the Oran Park Raceway?
| SELECT "Winner" FROM table_79663 WHERE "Team" = 'nissan motorsport australia' AND "Circuit" = 'oran park raceway' | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Mild intellect disabilty" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE table_name_97 (
attendance INTEGER,
loss VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Loss of de la rosa (8 8) has what average attendance?
| SELECT AVG(attendance) FROM table_name_97 WHERE loss = "de la rosa (8–8)" | sql_create_context |
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,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | SELECT person_info.XM FROM person_info JOIN hz_info JOIN zyjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND zyjzjlb.YLJGDM = jybgb.YLJGDM_ZYJZJLB AND zyjzjlb.JZLSH = jybgb.JZLSH_ZYJZJLB WHERE jybgb.BGDH = '44927016411' | css |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name | nvbench |
CREATE TABLE table_name_23 (
ntsc_m VARCHAR,
pal_m VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the NTSC M for Pal M 525/60?
| SELECT ntsc_m FROM table_name_23 WHERE pal_m = "525/60" | sql_create_context |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH ... | SELECT BGRQ FROM jybgb WHERE BGDH = '11288812225' | css |
CREATE TABLE table_201_43 (
id number,
"name" text,
"canton" text,
"district" text,
"area\n(km2)" number,
"population\n(as of 2005)" number,
"date of law" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many diekirch districts also have d... | SELECT COUNT("district") FROM table_201_43 WHERE "canton" = 'diekirch' | squall |
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 COUNT(*) FROM (SELECT gwyjzb.MED_ORG_DEPT_CD FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '5878641' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2008-10-14' AND '2015-11-15' GROUP BY gwyjzb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) >= 1815.95 UNION SELECT fgwyjzb... | css |
CREATE TABLE table_name_16 (
score VARCHAR,
away_team VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the game which featured the gold coast blaze as the away team and the adelaide 36ers as the home team?
| SELECT score FROM table_name_16 WHERE away_team = "gold coast blaze" AND home_team = "adelaide 36ers" | sql_create_context |
CREATE TABLE table_45414 (
"Position" real,
"Name" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the least drawn when the name is sv apfeldorf and the position is more than 8?
| SELECT MIN("Drawn") FROM table_45414 WHERE "Name" = 'sv apfeldorf' AND "Position" > '8' | wikisql |
CREATE TABLE table_15778392_1 (
theme VARCHAR,
week__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHERE THE WEEK NUMBER WAS TOP 8, WHAT WAS THE THEME?
| SELECT theme FROM table_15778392_1 WHERE week__number = "Top 8" | sql_create_context |
CREATE TABLE table_name_87 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2007 value with NMS in 2011?
| SELECT 2007 FROM table_name_87 WHERE 2011 = "nms" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.