context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_15 (
paul_mccartney VARCHAR,
linda_mccartney VARCHAR
) | Which Paul McCartney has a Linda McCartney of keyboards or drum? | SELECT paul_mccartney FROM table_name_15 WHERE linda_mccartney = "keyboards or drum" | sql_create_context |
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 lab (
subject_id text,
hadm_id text,
... | what is minimum days of hospital stay of patients whose year of death is less than 2173? | SELECT MIN(demographic.days_stay) FROM demographic WHERE demographic.dod_year < "2173.0" | mimicsql_data |
CREATE TABLE table_5732 (
"Year" real,
"Venue" text,
"Champion" text,
"Country" text,
"Score" text
) | What was japan's score? | SELECT "Score" FROM table_5732 WHERE "Country" = 'japan' | wikisql |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | count the number of patients whose admission type is emergency and diagnoses long title is transient neonatal thrombocytopenia? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Transient neonatal thrombocytopenia" | mimicsql_data |
CREATE TABLE table_52531 (
"Round" real,
"Overall" real,
"Player" text,
"Nationality" text,
"Club team" text
) | What is the name of the player with an overall less than 209 for the Victoriaville tigres (qmjhl), and a Round of 1? | SELECT "Player" FROM table_52531 WHERE "Overall" < '209' AND "Club team" = 'victoriaville tigres (qmjhl)' AND "Round" = '1' | wikisql |
CREATE TABLE table_204_860 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
) | what the the top score result ? | SELECT "score" FROM table_204_860 ORDER BY id LIMIT 1 | squall |
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... | calculate the number of morbid obesity/sda patients who died in or before 2148. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND demographic.dod_year <= "2148.0" | mimicsql_data |
CREATE TABLE table_67858 (
"Year" real,
"Team" text,
"Co-Drivers" text,
"Class" text,
"Laps" real,
"Pos." text,
"Class Pos." text
) | What team was c1 class, had over 331 laps after 1990? | SELECT "Team" FROM table_67858 WHERE "Class" = 'c1' AND "Laps" > '331' AND "Year" > '1990' | wikisql |
CREATE TABLE table_57202 (
"Type of sign" text,
"Shape" text,
"Border" text,
"Background colour" text,
"Text/Symbol" text
) | Which sign has a red border? | SELECT "Text/Symbol" FROM table_57202 WHERE "Border" = 'red' | wikisql |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE v... | get me the top five most frequent lab tests that patients took during the same hospital encounter after being diagnosed with signs and symptoms of sepsis (sirs) - due to infectious process with organ dysfunction until 2104. | SELECT t3.labname FROM (SELECT t2.labname, 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 = 'signs and symptom... | eicu |
CREATE TABLE table_74195 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | How many different results for high rebounds were there for game number 76? | SELECT COUNT("High rebounds") FROM table_74195 WHERE "Game" = '76' | wikisql |
CREATE TABLE table_name_83 (
tie_no VARCHAR,
away_team VARCHAR
) | What is the Tie no of Hereford United's Away game? | SELECT tie_no FROM table_name_83 WHERE away_team = "hereford united" | sql_create_context |
CREATE TABLE table_name_19 (
blocks VARCHAR,
rebounds INTEGER
) | How many blocks are there when the rebounds are fewer than 5.2? | SELECT COUNT(blocks) FROM table_name_19 WHERE rebounds < 5.2 | 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 transfers (
row_id number,
subject_id number,
hadm_... | how many visits did patient 53176 visit the hospital since 2105? | SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 53176 AND STRFTIME('%y', admissions.admittime) >= '2105' | mimic_iii |
CREATE TABLE table_name_19 (
Id VARCHAR
) | What is 2004, when 2008 is 'WTA Premier 5 Tournaments'? | SELECT 2004 FROM table_name_19 WHERE 2008 = "wta premier 5 tournaments" | sql_create_context |
CREATE TABLE table_204_450 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
) | what was the name of the venue after rome , italy ? | SELECT "venue" FROM table_204_450 WHERE "year" > (SELECT "year" FROM table_204_450 WHERE "venue" = 'rome, italy') ORDER BY "year" LIMIT 1 | squall |
CREATE TABLE drivers (
driverId INTEGER,
driverRef TEXT,
number TEXT,
code TEXT,
forename TEXT,
surname TEXT,
dob TEXT,
nationality TEXT,
url TEXT
)
CREATE TABLE lapTimes (
raceId INTEGER,
driverId INTEGER,
lap INTEGER,
position INTEGER,
time TEXT,
millisecon... | How many races that had any driver whose forename is Lewis? Show me a line chart. | SELECT year, COUNT(year) FROM results AS T1 JOIN races AS T2 ON T1.raceId = T2.raceId JOIN drivers AS T3 ON T1.driverId = T3.driverId WHERE T3.forename = "Lewis" GROUP BY year | nvbench |
CREATE TABLE table_62389 (
"Position" real,
"Club" text,
"Games played" real,
"Wins" real,
"Draws" real,
"Loses" real,
"Goals scored" real,
"Goals conceded" real,
"Points" real
) | What is the total number of Goals scored that has more than 45 Points? | SELECT COUNT("Goals scored") FROM table_62389 WHERE "Points" > '45' | wikisql |
CREATE TABLE table_name_97 (
home_team VARCHAR,
away_team VARCHAR
) | When the away team was Geelong, what was the home team score? | SELECT home_team AS score FROM table_name_97 WHERE away_team = "geelong" | sql_create_context |
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,
... | 64287856这个患者以前就诊的地方是哪里? | SELECT mzjzjlb.YLJGDM FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '64287856' UNION SELECT wdmzjzjlb.YLJGDM FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmz... | css |
CREATE TABLE table_1784514_1 (
year_established INTEGER,
number_of_powiats VARCHAR
) | What is the latest year established that had 5 powiats? | SELECT MAX(year_established) FROM table_1784514_1 WHERE number_of_powiats = "5 powiats" | sql_create_context |
CREATE TABLE table_37651 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the total number of bronze medals with more than 1 medal total and fewer than 1 silver medal? | SELECT COUNT("Bronze") FROM table_37651 WHERE "Total" > '1' AND "Silver" < '1' | wikisql |
CREATE TABLE table_15887683_16 (
hdtv VARCHAR,
n° VARCHAR
) | What values of HDTV correspond to n of 862? | SELECT hdtv FROM table_15887683_16 WHERE n° = 862 | sql_create_context |
CREATE TABLE table_25519358_1 (
horizontal_0_a VARCHAR,
hypotenuse_0_c VARCHAR
) | Name the horizontal 0 for ry | SELECT horizontal_0_a FROM table_25519358_1 WHERE hypotenuse_0_c = "明弦(RY日月)" | sql_create_context |
CREATE TABLE table_name_35 (
venue VARCHAR,
result VARCHAR
) | Which venue ended in a 3-0 result? | SELECT venue FROM table_name_35 WHERE result = "3-0" | sql_create_context |
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_required varchar
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name ... | what are the classes of service on LH | SELECT DISTINCT class_of_service.booking_class FROM class_of_service, fare, fare_basis, flight, flight_fare WHERE fare_basis.booking_class = class_of_service.booking_class AND fare.fare_basis_code = fare_basis.fare_basis_code AND flight_fare.fare_id = fare.fare_id AND flight.airline_code = 'LH' AND flight.flight_id = f... | atis |
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGE... | How many documents for different document name? Draw a bar chart, and rank Document_Name in desc order please. | SELECT Document_Name, COUNT(Document_Name) FROM Documents GROUP BY Document_Name ORDER BY Document_Name DESC | nvbench |
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 ... | 从13年5月11日到2020年4月11日这段时间,列出患者杨丹红所有检验报告单的审核日期时间吗? | SELECT jybgb.SHSJ FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE person_info.XM = '杨丹红' AND jybg... | css |
CREATE TABLE table_20974 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Falcons points" real,
"Opponents" real,
"Record" text,
"Attendance" real
) | Name the falcons points for record of 3-2 | SELECT "Falcons points" FROM table_20974 WHERE "Record" = '3-2' | wikisql |
CREATE TABLE table_train_158 (
"id" int,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"moca_score" int,
"diastolic_blood_pressure_dbp" int,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
) | hba1c > 6.5 and < 9 | SELECT * FROM table_train_158 WHERE hemoglobin_a1c_hba1c > 6.5 AND hemoglobin_a1c_hba1c < 9 | criteria2sql |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TA... | from NEW YORK to TORONTO on thursday morning | 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 = 'TORONTO' AND date_day.day_number = 24 AND date_day.month_number = 5 AND ... | atis |
CREATE TABLE table_76758 (
"Episode #" real,
"US air date" text,
"Rating" text,
"Share" text,
"Rating/Share (18\u201349)" text,
"Viewers (millions)" real
) | What is the lowest number of million viewers for an episode before episode 5 with a rating/share of 1.1/3? | SELECT MIN("Viewers (millions)") FROM table_76758 WHERE "Rating/Share (18\u201349)" = '1.1/3' AND "Episode #" < '5' | wikisql |
CREATE TABLE table_3062 (
"Name of Award" text,
"Name of Film" text,
"Language" text,
"Awardee(s)" text,
"Cash Prize" text
) | Name the language for b. ajith kumar | SELECT "Language" FROM table_3062 WHERE "Awardee(s)" = 'B. Ajith Kumar' | wikisql |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | 列出患者金鸿轩就诊科室名称不包含产科的在医院3113072中所有门诊就诊记录是什么流水号? | SELECT txmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE person_info.XM = '金鸿轩' AND hz_info.YLJGDM = '3113072' AND NOT txmzjzjlb.JZKSMC LIKE '%产科%' UNION SELECT ftxmzjz... | css |
CREATE TABLE table_name_30 (
money___$__ VARCHAR,
player VARCHAR
) | What is Lawson Little's Money ($) amount? | SELECT money___$__ FROM table_name_30 WHERE player = "lawson little" | sql_create_context |
CREATE TABLE device (
Device_ID int,
Device text,
Carrier text,
Package_Version text,
Applications text,
Software_Platform text
)
CREATE TABLE stock (
Shop_ID int,
Device_ID int,
Quantity int
)
CREATE TABLE shop (
Shop_ID int,
Shop_Name text,
Location text,
Open_Dat... | A bar chart about what are the different software platforms for devices, and how many devices have each? | SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform | nvbench |
CREATE TABLE table_182410_10 (
position VARCHAR,
digital_terrestrial_channel VARCHAR
) | What is the position of digital channel 5 44 (+1)? | SELECT position FROM table_182410_10 WHERE digital_terrestrial_channel = "5 44 (+1)" | sql_create_context |
CREATE TABLE table_49910 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | Name the Place of seve ballesteros? | SELECT "Place" FROM table_49910 WHERE "Player" = 'seve ballesteros' | wikisql |
CREATE TABLE table_name_12 (
date VARCHAR,
venue VARCHAR
) | What date did the game at Arden Street Oval take place? | SELECT date FROM table_name_12 WHERE venue = "arden street oval" | sql_create_context |
CREATE TABLE table_53202 (
"MLB season" text,
"Reds season" real,
"League" text,
"Division" text,
"Finish" text,
"Wins" real,
"Losses" real,
"Win%" real,
"GB [c ]" text
) | What was the lowest percentages of wins in 1989 with a GB [c] of 17? | SELECT MIN("Win%") FROM table_53202 WHERE "GB [c ]" = '17' AND "Reds season" = '1989' | wikisql |
CREATE TABLE table_204_780 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
) | what was the total amount of competitions participated in ? | SELECT COUNT("competition") FROM table_204_780 | squall |
CREATE TABLE table_48112 (
"Province" text,
"Largest city" text,
"2nd Largest" text,
"3rd Largest" text,
"4th largest" text
) | In which province is the 3rd largest Dehbarez? | SELECT "Province" FROM table_48112 WHERE "3rd Largest" = 'dehbarez' | wikisql |
CREATE TABLE competition_result (
Competition_ID int,
Club_ID_1 int,
Club_ID_2 int,
Score text
)
CREATE TABLE club_rank (
Rank real,
Club_ID int,
Gold real,
Silver real,
Bronze real,
Total real
)
CREATE TABLE competition (
Competition_ID int,
Year real,
Competition_... | Show the number of different competition types with a bar graph. | SELECT Competition_type, COUNT(Competition_type) FROM competition GROUP BY Competition_type | nvbench |
CREATE TABLE table_name_99 (
injunctive VARCHAR,
simple_past VARCHAR
) | What is the injunctive for the Simple Past of gar l 'I will (probably) do'? | SELECT injunctive FROM table_name_99 WHERE simple_past = "गरुँला garũlā 'i will (probably) do'" | sql_create_context |
CREATE TABLE table_35606 (
"Team" text,
"Copa Libertadores 1996" text,
"Supercopa Sudamericana 1996" text,
"Copa CONMEBOL 1996" text,
"Recopa Sudamericana 1996" text
) | What is the copa libertadores 1996 of team corinthians? | SELECT "Copa Libertadores 1996" FROM table_35606 WHERE "Team" = 'corinthians' | wikisql |
CREATE TABLE table_78932 (
"Home (1st leg)" text,
"Home (2nd leg)" text,
"1st Leg" text,
"2nd leg" text,
"Aggregate" text
) | What was the score of the 2nd leg when the Belgrano played the first leg at home with a score of 2-1? | SELECT "2nd leg" FROM table_78932 WHERE "1st Leg" = '2-1' AND "Home (1st leg)" = 'belgrano' | wikisql |
CREATE TABLE table_name_93 (
bronze INTEGER,
silver VARCHAR,
total VARCHAR
) | Which Bronze has a Silver of 7, and a Total larger than 25? | SELECT MIN(bronze) FROM table_name_93 WHERE silver = 7 AND total > 25 | sql_create_context |
CREATE TABLE table_73635 (
"Episode number Production number" text,
"Title" text,
"Original airdate" text,
"Rating/Share in Households" text,
"18\u201349 Rating Live+SD / Live+7" text,
"Share" text,
"Live+SD Total viewers" text,
"Live+7 Day DVR Total viewers" text
) | How many total viewers (combined Live and SD) watched the episode with a share of 8? | SELECT "Live+7 Day DVR Total viewers" FROM table_73635 WHERE "Share" = '8' | wikisql |
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
)
... | provide the number of patients whose diagnoses icd9 code is 5070 and lab test fluid is joint fluid? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "5070" AND lab.fluid = "Joint Fluid" | mimicsql_data |
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 ... | give me the number of patients whose diagnoses short title is urin tract infection nos and drug type is additive? | 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 = "Urin tract infection NOS" AND prescriptions.drug_type = "ADDITIVE" | mimicsql_data |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
... | Time to closure CDF of answered questions. | SELECT MAX(h.t), h.pc AS "Percent of closed answered questions over time" FROM (SELECT q.t AS t, NTILE(100) OVER (ORDER BY q.t) AS pc FROM (SELECT ClosedDate - CreationDate AS t FROM Posts WHERE PostTypeId = 1 AND AnswerCount > 0 AND NOT ClosedDate IS NULL) AS q) AS h WHERE h.t <= '23:59:59' GROUP BY h.pc ORDER BY h.pc | sede |
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... | 是哪家定点医疗机构进行编号72182472629的医疗就诊的,查查这家医疗机构的编码 | SELECT gwyjzb.FLX_MED_ORG_ID FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '72182472629' UNION SELECT fgwyjzb.FLX_MED_ORG_ID FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '72182472629' | css |
CREATE TABLE table_29593 (
"Players" text,
"Games Won" real,
"Games Lost" real,
"Total points" real,
"Grand Average" text,
"Best Winning Average" text,
"Best Run" real
) | If the grand average is 12.76-202, who is the player? | SELECT "Players" FROM table_29593 WHERE "Grand Average" = '12.76-202' | wikisql |
CREATE TABLE table_name_9 (
year INTEGER,
runner_up VARCHAR
) | When was the earliest year that Guillermo Vilas was the runner-up? | SELECT MIN(year) FROM table_name_9 WHERE runner_up = "guillermo vilas" | sql_create_context |
CREATE TABLE table_name_77 (
opponent VARCHAR,
date VARCHAR
) | Who did the Eagle's play on November 5, 1961? | SELECT opponent FROM table_name_77 WHERE date = "november 5, 1961" | sql_create_context |
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,
... | 为韩飞双这个患者在05年4月12日到12年6月12日内检测过尿素的医务人员工号及姓名分别是什么? | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.... | 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_DIRE_CD text,
MED_DIRE_NM text,... | 在2021年3月30日到2021年10月14日中医推拿科的内托吡酯片(薄膜衣)的开药量是多少? | SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.MED_ORG_DEPT_NM = '中医推拿科' AND t_kc22.STA_DATE BETWEEN '2021-03-30' AND '2021-10-14' AND t_kc22.SOC_SRT_DIRE_NM = '托吡酯片(薄膜衣)' | css |
CREATE TABLE table_name_57 (
no_result INTEGER,
year VARCHAR,
wins VARCHAR
) | What is the smallest no result when the year was 2012 and there were more than 10 wins? | SELECT MIN(no_result) FROM table_name_57 WHERE year = "2012" AND wins > 10 | sql_create_context |
CREATE TABLE table_name_15 (
lost INTEGER,
drawn INTEGER
) | what is the most games lost when there were 0 draws? | SELECT MAX(lost) FROM table_name_15 WHERE drawn < 0 | sql_create_context |
CREATE TABLE table_1342218_43 (
result VARCHAR,
incumbent VARCHAR
) | What was the result for the incumbent Milton H. West? | SELECT result FROM table_1342218_43 WHERE incumbent = "Milton H. West" | sql_create_context |
CREATE TABLE table_204_878 (
id number,
"model" text,
"release date" text,
"sensor\nres., size" text,
"lens (35 mm equiv.)\nzoom, aperture" text,
"screen\nsize, pixels" text,
"dimensions\nw (mm) \u00d7 h (mm) \u00d7 d (mm)" text,
"weight" text,
"features" text
) | how many have a weight over 120 grams ? | SELECT COUNT(*) FROM table_204_878 WHERE "weight" > 120 | squall |
CREATE TABLE status (
station_id number,
bikes_available number,
docks_available number,
time text
)
CREATE TABLE trip (
id number,
duration number,
start_date text,
start_station_name text,
start_station_id number,
end_date text,
end_station_name text,
end_station_id nu... | For each zip code, how many times has the maximum wind speed reached 25 mph? | SELECT zip_code, COUNT(*) FROM weather WHERE max_wind_speed_mph >= 25 GROUP BY zip_code | spider |
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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttim... | until 1090 days ago what was the maximum value of heart rate of patient 23042? | SELECT MAX(chartevents.valuenum) 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 = 23042)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'hear... | mimic_iii |
CREATE TABLE table_name_38 (
date VARCHAR,
record VARCHAR
) | What date was the record 20 16? | SELECT date FROM table_name_38 WHERE record = "20–16" | sql_create_context |
CREATE TABLE table_14375 (
"January" text,
"February" text,
"March" text,
"April" text,
"June" text,
"July" text,
"August" text,
"September" text,
"October" text,
"November" text,
"December" text
) | Who is the July playmate with a December playmate Morgan Fox? | SELECT "July" FROM table_14375 WHERE "December" = 'morgan fox' | wikisql |
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,
... | 医院3947713中,编号为30230164的这个病人的就诊科室名称包含肾内科的所有门诊就诊记录的流水号 | SELECT zzmzjzjlb.JZLSH FROM hz_info JOIN zzmzjzjlb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE hz_info.RYBH = '30230164' AND hz_info.YLJGDM = '3947713' AND zzmzjzjlb.JZKSMC LIKE '%肾内科%' UNION SELECT fzzmzjzjlb.JZLSH FROM hz_info JOIN fzzmzjzjlb ON hz_info.YLJ... | css |
CREATE TABLE table_49608 (
"Region (year)" text,
"No. 1" text,
"No. 2" text,
"No. 3" text,
"No. 4" text,
"No. 5" text,
"No. 6" text,
"No. 7" text,
"No. 8" text,
"No. 9" text,
"No. 10" text
) | What is No. 5, when No. 9 is Michael, and when Region (Year) is New Hampshire (2010)? | SELECT "No. 5" FROM table_49608 WHERE "No. 9" = 'michael' AND "Region (year)" = 'new hampshire (2010)' | wikisql |
CREATE TABLE table_59712 (
"Initial-syllable open/semi-open unstressed vowels" text,
"17th c." text,
"American" text,
"British" text,
"Australian" text,
"Examples" text
) | What is British, when Examples is 'November, rotunda, colossus, proscenium'? | SELECT "British" FROM table_59712 WHERE "Examples" = 'november, rotunda, colossus, proscenium' | wikisql |
CREATE TABLE list (
classroom VARCHAR
)
CREATE TABLE teachers (
classroom VARCHAR,
firstname VARCHAR,
lastname VARCHAR
) | How many students does KAWA GORDON teaches? | SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "KAWA" AND T2.lastname = "GORDON" | sql_create_context |
CREATE TABLE table_name_1 (
played VARCHAR,
points VARCHAR,
drawn VARCHAR,
position VARCHAR
) | How much Played has Drawn of 2, and a Position larger than 3, and Points smaller than 10? | SELECT COUNT(played) FROM table_name_1 WHERE drawn = 2 AND position > 3 AND points < 10 | sql_create_context |
CREATE TABLE table_6914 (
"Name" text,
"Novelty" text,
"Status" text,
"Authors" text,
"Unit" text,
"Location" text
) | Which authors have a Unit of densu -ciula formation? | SELECT "Authors" FROM table_6914 WHERE "Unit" = 'densuș-ciula formation' | wikisql |
CREATE TABLE table_649 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" real
) | Name the record for september 15, 1985 | SELECT "Record" FROM table_649 WHERE "Date" = 'September 15, 1985' | wikisql |
CREATE TABLE table_1015521_2 (
commonwealth_equivalent VARCHAR,
us_air_force_equivalent VARCHAR
) | If you're a major general in the US air force then what ranking will you receive in the commonwealth's air force? | SELECT commonwealth_equivalent FROM table_1015521_2 WHERE us_air_force_equivalent = "Major General" | sql_create_context |
CREATE TABLE table_17549 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | What's the title of the episode with a season number 25? | SELECT "Title" FROM table_17549 WHERE "No. in season" = '25' | wikisql |
CREATE TABLE table_name_5 (
result VARCHAR,
distance VARCHAR,
weight__kg_ VARCHAR
) | Name The Result that has a Distance of 1200m, and a Weight (kg) of 55.5? | SELECT result FROM table_name_5 WHERE distance = "1200m" AND weight__kg_ = 55.5 | sql_create_context |
CREATE TABLE table_48366 (
"Round" real,
"Pick #" real,
"Player" text,
"Position" text,
"College" text
) | What was the pick # for a center picked before round 6? | SELECT COUNT("Pick #") FROM table_48366 WHERE "Position" = 'center' AND "Round" < '6' | wikisql |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBase... | Find best answer to my question. | SELECT Q.Title, Q.Body, A.Body, A.Score, Q.Id AS "post_link" FROM Posts AS Q JOIN Posts AS A ON (Q.AcceptedAnswerId = A.Id) WHERE Q.PostTypeId = 1 AND A.PostTypeId = 2 AND (Q.Title LIKE '%' + REPLACE(@question, ' ', '% ') + '%' OR Q.Body LIKE '%' + REPLACE(@question, ' ', '% ') + '%') ORDER BY DIFFERENCE(@question, Q.T... | sede |
CREATE TABLE table_18933037_3 (
cause_of_loss VARCHAR,
bomb_capacity VARCHAR
) | When 27 gp h-e bombs the capacity of the bomb what is the cause of loss? | SELECT cause_of_loss FROM table_18933037_3 WHERE bomb_capacity = "27 GP H-E bombs" | sql_create_context |
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
) | For those records from the products and each product's manufacturer, a bar chart shows the distribution of founder and the average of code , and group by attribute founder. | SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder | nvbench |
CREATE TABLE table_72194 (
"Year" real,
"Championship" text,
"54 holes" text,
"Winning score" text,
"Margin" text,
"Runner(s)-up" text
) | what's the 54 holes where winning score is 19 (67-66-67-69=269) | SELECT "54 holes" FROM table_72194 WHERE "Winning score" = '−19 (67-66-67-69=269)' | wikisql |
CREATE TABLE table_25656 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"N.Z. viewers (thousand)" text
) | When did 'Follow Her Close' air? | SELECT "Original air date" FROM table_25656 WHERE "Title" = 'Follow Her Close' | wikisql |
CREATE TABLE table_54291 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What venue did Richmond play at as the home team? | SELECT "Venue" FROM table_54291 WHERE "Home team" = 'richmond' | wikisql |
CREATE TABLE table_name_47 (
opponent VARCHAR,
score VARCHAR
) | WHAT OPPONENT HAD A SCORE OF 5:5? | SELECT opponent FROM table_name_47 WHERE score = "5:5" | sql_create_context |
CREATE TABLE member_attendance (
Member_ID VARCHAR,
Performance_ID VARCHAR
)
CREATE TABLE performance (
Date VARCHAR,
Performance_ID VARCHAR
)
CREATE TABLE member (
Member_ID VARCHAR,
Role VARCHAR
) | Show the dates of performances with attending members whose roles are 'Violin'. | SELECT T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID WHERE T2.Role = "Violin" | sql_create_context |
CREATE TABLE table_1682026_6 (
industry VARCHAR,
market_value__billion_$_ VARCHAR
) | Which industry has a company with a market value of 80.3 billion? | SELECT industry FROM table_1682026_6 WHERE market_value__billion_$_ = "80.3" | sql_create_context |
CREATE TABLE documents (
document_type_code VARCHAR
) | Find the types of documents with more than 4 documents. | SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 4 | sql_create_context |
CREATE TABLE table_22265225_1 (
us_viewers__millions_ VARCHAR,
no_in_series VARCHAR
) | How many times was u.s. Viewers listed for episode 36 in the series? | SELECT COUNT(us_viewers__millions_) FROM table_22265225_1 WHERE no_in_series = "36" | sql_create_context |
CREATE TABLE table_name_80 (
date VARCHAR,
attendance VARCHAR
) | What is the date of the game with 38,062 people in attendance? | SELECT date FROM table_name_80 WHERE attendance = "38,062" | sql_create_context |
CREATE TABLE table_53689 (
"Season" real,
"Team" text,
"Country" text,
"League" text,
"Level" real,
"Apps" real,
"Goals" real
) | What's the highest level of team Astana since 2007? | SELECT MAX("Level") FROM table_53689 WHERE "Team" = 'astana' AND "Season" > '2007' | wikisql |
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... | What is the primary disease of Kelly Gallardo? | SELECT demographic.diagnosis FROM demographic WHERE demographic.name = "Kelly Gallardo" | mimicsql_data |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConce... | A set of users creating a high number of txtspk questions. | SELECT COUNT(*) AS QuestCount, P.OwnerUserId, U.DisplayName, U.Reputation, U.LastAccessDate FROM Posts AS P INNER JOIN Users AS U ON (P.OwnerUserId = U.Id) WHERE P.ParentId IS NULL AND (P.Body LIKE '%plz%' OR P.Body LIKE '%pls%' OR P.Body LIKE '%thx%' OR P.Body LIKE '%thnx%' OR P.Body LIKE '%smth%' OR P.Body LIKE '%sth... | sede |
CREATE TABLE table_43884 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What is the Country, when Place is '1'? | SELECT "Country" FROM table_43884 WHERE "Place" = '1' | wikisql |
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
) | Count the number of captains that have each rank by a bar chart. | SELECT Rank, COUNT(*) FROM captain GROUP BY Rank | nvbench |
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 jybgb (
BBCJBW text,
BBDM tex... | 在15年1月24号到17年7月1号期间医疗机构6950309住院时长超过27天的住院就诊记录数是多少? | SELECT COUNT(*) FROM zyjzjlb WHERE zyjzjlb.YLJGDM = '6950309' AND zyjzjlb.RYDJSJ BETWEEN '2015-01-24' AND '2017-07-01' AND DATEDIFF(zyjzjlb.CYSJ, zyjzjlb.RYSJ) > 27 | css |
CREATE TABLE table_49668 (
"Name" text,
"Height" text,
"Weight" text,
"Spike" text,
"2013 club" text
) | Name the Spike which has a Name of senna u i -jogunica category:articles with hcards? | SELECT "Spike" FROM table_49668 WHERE "Name" = 'senna ušić-jogunica category:articles with hcards' | wikisql |
CREATE TABLE table_16033 (
"Begin Date" text,
"End Date" text,
"Representative" text,
"Date of birth" text,
"House term" text,
"State served" text,
"Party" text,
"Age (years, days)" text
) | Which politican party has a birthday of November 10, 1880 | SELECT "Party" FROM table_16033 WHERE "Date of birth" = 'November 10, 1880' | wikisql |
CREATE TABLE table_204_300 (
id number,
"date from" text,
"date to" text,
"pos." text,
"name" text,
"from" text
) | name a player whose to date is in march and from date is in january . | SELECT "name" FROM table_204_300 WHERE "date to" = 3 AND "date from" = 1 | squall |
CREATE TABLE table_42739 (
"Season" text,
"Ep #" real,
"Season Premiere" text,
"Season Finale" text,
"Ranking" text,
"Viewers (Households in millions)" text,
"Rating" text
) | How many million viewers watched the season finale on March 12, 1979? | SELECT "Viewers (Households in millions)" FROM table_42739 WHERE "Season Finale" = 'march 12, 1979' | wikisql |
CREATE TABLE table_37812 (
"Player" text,
"Touchdowns" real,
"Extra points" real,
"Field goals" real,
"Points" real
) | How many Touchdowns have Extra points larger than 0, and Points of 48? | SELECT COUNT("Touchdowns") FROM table_37812 WHERE "Extra points" > '0' AND "Points" = '48' | wikisql |
CREATE TABLE table_name_61 (
constellation VARCHAR,
right_ascension___j2000__ VARCHAR
) | what is the constellation when the right ascension (j2000) is 09h51m54.0s? | SELECT constellation FROM table_name_61 WHERE right_ascension___j2000__ = "09h51m54.0s" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.