instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
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 * FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '59811387' AND hz_info.YLJGDM = '9835816' AND wdmzjzjlb.JZKSMC LIKE '%护理%' UNION SELECT * FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz_i... | css |
CREATE TABLE table_27383 (
"Language" text,
"Punata Municipality" real,
"Villa Rivero Municipality" real,
"San Benito Municipality" real,
"Tacachi Municipality" real,
"Cuchumuela Municipality" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What ... | SELECT COUNT("Language") FROM table_27383 WHERE "Tacachi Municipality" = '3' | wikisql |
CREATE TABLE table_27450976_1 (
title VARCHAR,
production_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title of the episode with a production code of 2j5504?
| SELECT title FROM table_27450976_1 WHERE production_code = "2J5504" | sql_create_context |
CREATE TABLE table_203_123 (
id number,
"year" number,
"title" text,
"b-side" text,
"mediums" text,
"label (catalog)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what title is listed next in the table after autumn beds ?
| SELECT "title" FROM table_203_123 WHERE id = (SELECT id FROM table_203_123 WHERE "title" = '"autumn beds"') + 1 | squall |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT wdmzjzjlb.ZYZDBM, wdmzjzjlb.ZYZDMC FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '27129454' UNION SELECT bdmzjzjlb.ZYZDBM, bdmzjzjlb.ZYZDMC FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz... | css |
CREATE TABLE table_48017 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What round was the game against Cedric Marks?
| SELECT "Round" FROM table_48017 WHERE "Opponent" = 'cedric marks' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "47" AND lab.fluid = "Urine" | mimicsql_data |
CREATE TABLE table_26074 (
"Round" text,
"Clubs remaining" real,
"Clubs involved" real,
"Winners from previous round" text,
"New entries this round" text,
"Leagues entering at this round" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which roun... | SELECT "Round" FROM table_26074 WHERE "New entries this round" = '24' | wikisql |
CREATE TABLE table_name_52 (
cuts_made INTEGER,
events VARCHAR,
top_5 VARCHAR,
top_10 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the most cuts made for events with 1 top-5, 2 top-10s, and more than 13 total events?
| SELECT MAX(cuts_made) FROM table_name_52 WHERE top_5 = 1 AND top_10 = 2 AND events > 13 | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugst... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'naloxone 0.4 mg/ml inj soln')) AND DATETIME(co... | eicu |
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_ORG_DEPT_CD, qtb.OUT_DIAG_DIS_CD, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '0081088' GROUP BY qtb.MED_ORG_DEPT_CD, qtb.OUT_DIAG_DIS_CD UNION SELECT gyb.MED_ORG_DEPT_CD, gyb.OUT_DIAG_DIS_CD, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '0081088' GROUP BY gyb.MED_ORG_DEPT_CD, gyb.... | css |
CREATE TABLE broadcast (
channel_id VARCHAR,
time_of_day VARCHAR
)
CREATE TABLE channel (
name VARCHAR,
channel_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the names of the channels that are broadcast in the morning.
| SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' | sql_create_context |
CREATE TABLE table_6888 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the sum of Events, when Wins were less than 1, when Top-... | SELECT SUM("Events") FROM table_6888 WHERE "Wins" < '1' AND "Top-25" = '3' AND "Top-5" < '1' | wikisql |
CREATE TABLE customer (
cust_ID varchar(3),
cust_name varchar(20),
acc_type char(1),
acc_bal int,
no_of_loans int,
credit_score int,
branch_ID int,
state varchar(20)
)
CREATE TABLE bank (
branch_ID int,
bname varchar(20),
no_of_customers int,
city varchar(10),
state ... | SELECT cust_name, credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_ID = T2.cust_ID ORDER BY cust_name DESC | nvbench |
CREATE TABLE table_29765 (
"Stadium" text,
"City" text,
"Capacity" real,
"Matches played" real,
"Overall attendance" real,
"Average attendance per match" real,
"Average attendance as % of Capacity" text,
"Overall goals scored" real,
"Average goals scored per match" text,
"Elevati... | SELECT "Average attendance per match" FROM table_29765 WHERE "Elevation" = '1500 m' | wikisql |
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
-- Using valid SQLite, answer the following questions fo... | SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Nationality ORDER BY COUNT(Nationality) DESC | nvbench |
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_kc22.AMOUNT) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '26631603' AND gwyjzb.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2008-09-20' AND '2015-10-18' AND t_kc22.MED_INV_ITEM_TYPE = '手术费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fg... | css |
CREATE TABLE table_23285805_8 (
date VARCHAR,
location_attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On which datebis arco arena 17361 the location attendance?
| SELECT date FROM table_23285805_8 WHERE location_attendance = "Arco Arena 17361" | sql_create_context |
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 prescriptions (
row_id number,
subject_id number,
h... | 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 = 'atrial flutter') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25216) AND DATETIME(diagnoses_icd.char... | mimic_iii |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM ... | SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjz... | css |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM person_info JOIN hz_info JOIN mzjzjlb 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 = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHE... | css |
CREATE TABLE table_name_75 (
team__number1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 1st leg that has hapoel jerusalem?
| SELECT 1 AS st_leg FROM table_name_75 WHERE team__number1 = "hapoel jerusalem" | sql_create_context |
CREATE TABLE table_203_270 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many consecutive years did pavel loskutov run in the joongang ... | SELECT COUNT("year") FROM table_203_270 WHERE "competition" = 'joongang seoul marathon' | squall |
CREATE TABLE table_55723 (
"Yard Name" text,
"Location (City, State)" text,
"1st Ship Delivery Date" text,
"Ship Types Delivered" text,
"Total Number of Ways" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What types of ships were made at the Froemm... | SELECT "Ship Types Delivered" FROM table_55723 WHERE "Yard Name" = 'froemming brothers' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.dob_year < "2083" | mimicsql_data |
CREATE TABLE table_21801 (
"Year" real,
"Domestic freight" real,
"Domestic mail" real,
"International freight" real,
"International mail" real,
"Total freight and mail" real,
"Change" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the n... | SELECT COUNT("International freight") FROM table_21801 WHERE "Domestic mail" = '260' | wikisql |
CREATE TABLE table_28628309_8 (
player VARCHAR,
category VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the player when the category is listed as field goal percentage?
| SELECT player FROM table_28628309_8 WHERE category = "Field goal percentage" | sql_create_context |
CREATE TABLE table_34406 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team (League)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Position has a Nationality of canada, and a Player of pat janostin?... | SELECT "Position" FROM table_34406 WHERE "Nationality" = 'canada' AND "Player" = 'pat janostin' | wikisql |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE c... | SELECT MAX(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1205) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'chloride, whole blood') GROUP BY STRFTIME('%y', labevents.charttime) | 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 Name, SUM(Revenue) FROM Manufacturers GROUP BY Name ORDER BY SUM(Revenue) DESC | nvbench |
CREATE TABLE table_3875 (
"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.
-- How man... | SELECT COUNT("High points") FROM table_3875 WHERE "Date" = 'October 16' | wikisql |
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 patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '006-10390' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY patient.hospitaladmittime LIMIT 1 | eicu |
CREATE TABLE table_21679 (
"Date" text,
"Opponent" text,
"Home / Away" 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.... | SELECT "Date" FROM table_21679 WHERE "Score" = '95-101' | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "70" AND procedures.short_title = "Arterial catheterization" | mimicsql_data |
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 (((flight.departure_time BETWEEN 0 AND 1200) AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_nam... | atis |
CREATE TABLE region (
region_name VARCHAR,
region_id VARCHAR
)
CREATE TABLE affected_region (
region_id VARCHAR,
storm_id VARCHAR
)
CREATE TABLE storm (
storm_id VARCHAR,
number_deaths VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are... | SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10 | sql_create_context |
CREATE TABLE table_751 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What candidates were in the election when james patrick sutton was incumbe... | SELECT "Candidates" FROM table_751 WHERE "Incumbent" = 'James Patrick Sutton' | wikisql |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number... | SELECT * FROM Posts WHERE RAND() = 0.3 | sede |
CREATE TABLE table_17588 (
"Rank" real,
"Peak" text,
"Elevation (m)" real,
"Prominence (m)" real,
"Isolation (km)" real,
"Municipality" text,
"County" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of rank of peak fresvikb... | SELECT COUNT("Rank") FROM table_17588 WHERE "Peak" = 'Fresvikbreen' | wikisql |
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 mzjzjlb (
HXPLC number,
HZXM ... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND hz_info_mzjzjlb.JZLSH = mzjzjl... | css |
CREATE TABLE table_20174050_24 (
format VARCHAR,
author VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many formats of books authored by day, martin martin day
| SELECT COUNT(format) FROM table_20174050_24 WHERE author = "Day, Martin Martin Day" | 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 d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses (
row_id number... | 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 = 'acute kidney failure nos') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 50286) AND DATETIME(diagnose... | mimic_iii |
CREATE TABLE table_60957 (
"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.
-- What is the median househol... | SELECT "Median household income" FROM table_60957 WHERE "County" = 'cape girardeau' | wikisql |
CREATE TABLE train (
Train_ID int,
Name text,
Time text,
Service text
)
CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
Main_Services text,
Number_of_Platforms int
)
CREATE TABLE t... | SELECT Location, COUNT(Location) FROM station GROUP BY Location | nvbench |
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Stateme... | SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code ORDER BY Document_Type_Code DESC | nvbench |
CREATE TABLE table_1057316_1 (
operational_owner_s_ VARCHAR,
build_date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who were the operational owners during the construction date of April 1892?
| SELECT operational_owner_s_ FROM table_1057316_1 WHERE build_date = "April 1892" | sql_create_context |
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 * FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '50999365' AND hz_info.YLJGDM = '7538695' AND NOT wdmzjzjlb.JZZDSM LIKE '%过敏症%' UNION SELECT * FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND... | css |
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 WHERE demographic.admission_type = "URGENT" AND diagnoses.short_title = "Myelodysplastic synd NOS" | mimicsql_data |
CREATE TABLE table_2181798_1 (
position VARCHAR,
avg_start VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the position for 23.7 avg start
| SELECT COUNT(position) FROM table_2181798_1 WHERE avg_start = "23.7" | sql_create_context |
CREATE TABLE table_203_84 (
id number,
"rank" number,
"name" text,
"height\nft (m)" text,
"floors" number,
"year" text,
"coordinates" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many total floors is the ordway buildi... | SELECT "floors" FROM table_203_84 WHERE "name" = 'ordway building' | squall |
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
)
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_Payment_Made DATE,... | SELECT Date_Payment_Made, AVG(Amount_Payment) FROM Payments WHERE Payment_Method_Code = 'Visa' | nvbench |
CREATE TABLE table_51366 (
"Year" real,
"Property Taxes" text,
"Investment Earnings" text,
"Other Local Sources" text,
"State & Federal" text,
"Total Revenue" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the investment earnings in a ... | SELECT "Investment Earnings" FROM table_51366 WHERE "Year" > '2001' AND "Other Local Sources" = '$2,670,060' | wikisql |
CREATE TABLE table_name_73 (
tie_no VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the tie number when the away team is Lewes?
| SELECT tie_no FROM table_name_73 WHERE away_team = "lewes" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND prescriptions.drug = "Milk of Magnesia" | mimicsql_data |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
sy... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT intakeoutput.patientunitstayid FROM intakeoutput WHERE intakeoutput.celllabel = 'pantoprazole (ns)-in' AND intakeoutput.cellpath LIKE '%input%' AND STRFTIME('%y', intakeoutput.intakeoutputtime) <= '2104') | eicu |
CREATE TABLE table_name_73 (
laps INTEGER,
class VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the highest amount of laps for class c1 and driver Derek Bell?
| SELECT MAX(laps) FROM table_name_73 WHERE class = "c1" AND driver = "derek bell" | sql_create_context |
CREATE TABLE table_name_68 (
circuit VARCHAR,
team VARCHAR,
series VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which circuit did winfield team nissan win for the tooheys 1000?
| SELECT circuit FROM table_name_68 WHERE team = "winfield team nissan" AND series = "tooheys 1000" | sql_create_context |
CREATE TABLE table_37035 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" real,
"Finish" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Total smaller than 285, and a To par larger than 1 belongs to what player?
| SELECT "Player" FROM table_37035 WHERE "Total" < '285' AND "To par" > '1' | wikisql |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE T... | SELECT p.Id AS "post_link", LEN(p.Body) AS BodyLength, p.ParentId, parentUser.DisplayName AS ParentOwner, p.Body FROM Posts AS p INNER JOIN Users AS u ON u.Id = p.OwnerUserId INNER JOIN Posts AS parentPost ON parentPost.Id = p.ParentId INNER JOIN Users AS parentUser ON parentUser.Id = parentPost.OwnerUserId WHERE p.Pos... | sede |
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 * FROM jybgb WHERE JZLSH = '29424118209' | css |
CREATE TABLE table_44059 (
"Model number" text,
"sSpec number" text,
"Frequency" text,
"GPU frequency" text,
"L2 cache" text,
"I/O bus" text,
"Memory" text,
"Voltage" text,
"Socket" text,
"Release date" text,
"Part number(s)" text,
"Release price ( USD )" text
)
-- Usin... | SELECT "Model number" FROM table_44059 WHERE "GPU frequency" = '320 mhz' | wikisql |
CREATE TABLE table_67535 (
"Country" text,
"2012" real,
"2011" real,
"2010" real,
"2009" real,
"2008" real,
"2007" real,
"2006" real,
"2005" real,
"2004" real,
"2003" real,
"2002" real,
"2001" real,
"2000" real,
"1999" real,
"1998" real,
"1997" real,
... | SELECT AVG("2005") FROM table_67535 WHERE "1995" > '3' AND "1996" < '4' AND "2011" > '5' | wikisql |
CREATE TABLE student (
city_code VARCHAR,
age INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the average age of all students living in the each city.
| SELECT AVG(age), city_code FROM student GROUP BY city_code | sql_create_context |
CREATE TABLE table_48461 (
"Year" text,
"Date" text,
"Circuit" text,
"Winning driver" text,
"Winning constructor" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which circuit did Jim Clark win in 1962?
| SELECT "Circuit" FROM table_48461 WHERE "Winning driver" = 'jim clark' AND "Year" = '1962' | 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 zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jyb... | css |
CREATE TABLE table_58230 (
"Production no." real,
"Episode no." real,
"Original Airdate" text,
"Episode Title" text,
"Host" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the episode number of the episode that originally aired on February 4,... | SELECT "Episode no." FROM table_58230 WHERE "Original Airdate" = 'february 4, 2008' | wikisql |
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Apartment_Bookin... | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id ORDER BY COUNT(booking_start_date) | nvbench |
CREATE TABLE table_12981 (
"Week 1" text,
"Week 2" text,
"Week 3" text,
"Week 4" text,
"Week 5" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Week 5 has a Week 1 of mysti sherwood?
| SELECT "Week 5" FROM table_12981 WHERE "Week 1" = 'mysti sherwood' | wikisql |
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 labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24029)) AND DATETIME(outputevents.charttim... | mimic_iii |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... | SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypophosphatemia' AND DATETIME(diagnosis.diagnosisti... | eicu |
CREATE TABLE table_name_94 (
score VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score in the game where the record was 10-9-7?
| SELECT score FROM table_name_94 WHERE record = "10-9-7" | sql_create_context |
CREATE TABLE table_name_28 (
draws INTEGER,
byes VARCHAR,
wins VARCHAR,
peel VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Draws has a Wins of 10, and a Peel of south mandurah, and a Byes larger than 0?
| SELECT AVG(draws) FROM table_name_28 WHERE wins = 10 AND peel = "south mandurah" AND byes > 0 | sql_create_context |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT HIRE_DATE, SALARY FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE DESC | nvbench |
CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
)
CREATE TABLE certificate (
eid number(9,0),
aid number(9,0)
)
CREATE TABLE employee (
ei... | SELECT destination, COUNT(*) FROM flight GROUP BY destination ORDER BY destination | nvbench |
CREATE TABLE table_25461827_2 (
country VARCHAR,
contestant VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country was Danissa Zurek from?
| SELECT country FROM table_25461827_2 WHERE contestant = "Danissa Zurek" | sql_create_context |
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 All_Games, ACC_Percent FROM basketball_match | nvbench |
CREATE TABLE table_42833 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest amount of points had a los... | SELECT MIN("Points") FROM table_42833 WHERE "Lost" = '2' AND "Position" < '1' | wikisql |
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 patient (
uniquep... | SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'anticonvulsants - valproate')) AND DATETIME(... | eicu |
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.ethnicity = "HISPANIC OR LATINO" AND demographic.age < "48" | mimicsql_data |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT zyjybgb.BBDM, zyjybgb.BBMC, zyjybgb.BBZT FROM zyjybgb WHERE zyjybgb.BGDH = '51372448750' UNION SELECT mzjybgb.BBDM, mzjybgb.BBMC, mzjybgb.BBZT FROM mzjybgb WHERE mzjybgb.BGDH = '51372448750' | css |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
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,
... | SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybg... | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemics... | SELECT 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 = '011-53628')) AND NOT vitalperiodic.systemicsystolic... | eicu |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE pat... | SELECT COUNT(*) > 0 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 = 22897)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'sao2' AND d_items... | mimic_iii |
CREATE TABLE table_25282151_1 (
supply_sector___percentage_of_gdp_in_current_prices_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the GDP for 2002-2005 for the construction center?
| SELECT 2002 AS _2005 FROM table_25282151_1 WHERE supply_sector___percentage_of_gdp_in_current_prices_ = "Construction" | sql_create_context |
CREATE TABLE table_1382 (
"Year" real,
"January" text,
"February" text,
"March" text,
"April" text,
"May" text,
"June" text,
"July" text,
"August" text,
"September" text,
"October" text,
"November" text,
"December" text,
"Annual Additions(in millions)" text,
"... | SELECT "July" FROM table_1382 WHERE "March" = '0.41' | wikisql |
CREATE TABLE table_30429 (
"Emperor" text,
"Heir" text,
"Relationship to emperor and status" text,
"Became heir" text,
"Ceased to be heir" text,
"Next in line" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many next in lines had heirs of Ar... | SELECT COUNT("Next in line") FROM table_30429 WHERE "Heir" = 'Archduke Karl' | wikisql |
CREATE TABLE table_name_46 (
country VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which country had a total of 295?
| SELECT country FROM table_name_46 WHERE total = 295 | sql_create_context |
CREATE TABLE table_48312 (
"Wicket" text,
"Runs" text,
"Batsmen" text,
"Opponent" text,
"Venue" text,
"Season" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where were jamie cox & scott kremerskothen paired?
| SELECT "Venue" FROM table_48312 WHERE "Batsmen" = 'jamie cox & scott kremerskothen' | wikisql |
CREATE TABLE table_29864 (
"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 assists" FROM table_29864 WHERE "Game" = '75' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | SELECT 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 = "Hypertension NOS" AND prescriptions.route = "PO/NG" | mimicsql_data |
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 airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minu... | 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 (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MIAMI' AND NOT fare.round_trip_cost IS NULL AND flight_fare.fare_id = ... | atis |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 99883) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE... | mimic_iii |
CREATE TABLE table_name_41 (
people_per_km² INTEGER,
regions VARCHAR,
area VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of people per km2 for the sandoy region with an area of 112.1?
| SELECT SUM(people_per_km²) FROM table_name_41 WHERE regions = "sandoy" AND area = 112.1 | sql_create_context |
CREATE TABLE table_name_30 (
position VARCHAR,
height INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the position of the player who is taller than 2.12?
| SELECT position FROM table_name_30 WHERE height > 2.12 | sql_create_context |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
Rejectio... | SELECT COUNT(CASE WHEN Score < 0 THEN 1 ELSE 0 END) FROM Posts WHERE CreationDate BETWEEN @start AND @end | sede |
CREATE TABLE table_16759 (
"Race Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Constructor" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is te name of the constructors dated 26 march?
| SELECT "Constructor" FROM table_16759 WHERE "Date" = '26 March' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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... | SELECT mzjzjlb.YLJGDM 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 = '张天蓝' UNION SELECT zyjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_i... | css |
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE Customer_Policies (
Policy_ID INTEGER,
Customer_ID INTEGER,
Policy_Type_Code CHAR(15),
Start_Date DATE,
End_Date DATE
)
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Cla... | SELECT Date_Payment_Made, AVG(Amount_Payment) FROM Payments WHERE Payment_Method_Code = 'Visa' ORDER BY AVG(Amount_Payment) DESC | nvbench |
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 T2.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T1.Code | nvbench |
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 Sex, SUM(Weight) FROM people GROUP BY Sex ORDER BY Sex | nvbench |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.