context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_78 (
tournament VARCHAR,
surface VARCHAR,
score VARCHAR
) | In what Tournament was the Score of 3 6, 6 3, 7 6 in a match played on a hard Surface? | SELECT tournament FROM table_name_78 WHERE surface = "hard" AND score = "3–6, 6–3, 7–6" | sql_create_context |
CREATE TABLE table_name_4 (
method VARCHAR,
event VARCHAR
) | What was the method of fight completion for the Mars: Attack 1 event? | SELECT method FROM table_name_4 WHERE event = "mars: attack 1" | 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... | how many patients with lab test item id 51213 have their lab test abnormal as delta? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51213" AND lab.flag = "delta" | mimicsql_data |
CREATE TABLE table_18860 (
"Parish" text,
"Bush#" real,
"Bush%" text,
"Kerry#" real,
"Kerry%" text,
"Others#" real,
"Others%" text,
"Total#" real
) | what's the others% with parbeingh being tangipahoa | SELECT "Others%" FROM table_18860 WHERE "Parish" = 'Tangipahoa' | wikisql |
CREATE TABLE location (
restaurant_id int,
house_number int,
street_name varchar,
city_name varchar
)
CREATE TABLE geographic (
city_name varchar,
county varchar,
region varchar
)
CREATE TABLE restaurant (
id int,
name varchar,
food_type varchar,
city_name varchar,
rati... | where are some good arabic restaurants in mountain view ? | SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5 | restaurants |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | list the flights from INDIANAPOLIS to HOUSTON | 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 = 'INDIANAPOLIS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'H... | atis |
CREATE TABLE table_name_8 (
place INTEGER,
votes VARCHAR,
draw VARCHAR
) | What is the highest place of the song with 38 votes and a draw great than 3? | SELECT MAX(place) FROM table_name_8 WHERE votes = 38 AND draw > 3 | sql_create_context |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dis... | when was the first time on this month/31 that patient 19412 had the minimum arterial bp [diastolic] for? | SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19412)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial... | mimic_iii |
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,
... | when was patient 032-21820 last measured heartrate on 12/22/this year? | 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 = '032-21820')) AND NOT vitalperiodic.heartrate IS NUL... | eicu |
CREATE TABLE table_name_19 (
nationality VARCHAR,
position VARCHAR,
school_club_team VARCHAR
) | What is the nationality of the player that plays forward and is from depaul? | SELECT nationality FROM table_name_19 WHERE position = "forward" AND school_club_team = "depaul" | sql_create_context |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varch... | Which Fall or Winter courses are available to meet my Other requirement ? | SELECT DISTINCT COURSEalias0.department, COURSEalias0.name, COURSEalias0.number, SEMESTERalias0.semester FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, program_course AS PROGRAM_COURSEalias0... | advising |
CREATE TABLE table_4526 (
"Name" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning driver" text,
"Winning team" text,
"Report" text
) | Who won for Forsythe Racing when Bobby Rahal had pole position? | SELECT "Name" FROM table_4526 WHERE "Winning team" = 'forsythe racing' AND "Pole Position" = 'bobby rahal' | wikisql |
CREATE TABLE table_39382 (
"Date" text,
"Theatre, Studio, or Network" text,
"Role" text,
"Dance Partner" text,
"Director" text
) | What was the theatre where Peter P. Peters is the role? | SELECT "Theatre, Studio, or Network" FROM table_39382 WHERE "Role" = 'peter p. peters' | wikisql |
CREATE TABLE table_67967 (
"Position" real,
"Club" text,
"Played" real,
"Points" text,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
) | How many goals have more than 38 played and more than 9 draws? | SELECT SUM("Goals for") FROM table_67967 WHERE "Draws" > '9' AND "Played" > '38' | 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 prescriptions... | how many patients admitted before the year 2165 have tp route of drug administration? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2165" AND prescriptions.route = "TP" | mimicsql_data |
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... | 病患53854380药品金额高于8120.12元在的哪几次医疗记录中被开出过?医疗就诊编号是多少? | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '53854380' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 8120.12) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '53854380' AND fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID F... | css |
CREATE TABLE table_68808 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
) | How many years have had the position of 2nd? | SELECT COUNT("Year") FROM table_68808 WHERE "Position" = '2nd' | wikisql |
CREATE TABLE table_name_82 (
location VARCHAR,
year INTEGER
) | What was the location for a year later than 2012? | SELECT location FROM table_name_82 WHERE year > 2012 | sql_create_context |
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,
... | what is primary disease and diagnoses long title of subject name james sloan? | SELECT demographic.diagnosis, diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "James Sloan" | mimicsql_data |
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... | 因白内障在小儿放射治疗科在住院的人在2009年6月24日到2018年7月12日内的平均花费是多少钱? | SELECT AVG(zyb.MED_CLINIC_ID) FROM zyb WHERE zyb.MED_SER_ORG_NO = '小儿放射治疗科' AND zyb.IN_HOSP_DAYS BETWEEN '2009-06-24' AND '2018-07-12' AND zyb.IN_HOSP_DATE = '白内障' | 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... | give me the number of emergency hospital admission patients who had insertion of 2 vascular stents. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.short_title = "Insert 2 vascular stents" | mimicsql_data |
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count num... | Posthistory for a specific post. | SELECT Id, PostHistoryTypeId, CASE PostHistoryTypeId WHEN 1 THEN 'Initial Title' WHEN 2 THEN 'Initial Body' WHEN 3 THEN 'Initial Tags' WHEN 4 THEN 'Edit Title' WHEN 5 THEN 'Edit Body' WHEN 6 THEN 'Edit Tags' WHEN 7 THEN 'Rollback Title' WHEN 8 THEN 'Rollback Body' WHEN 9 THEN 'Rollback Tags' END, CreationDate, UserId A... | sede |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | Can undergrads take 550 ? | SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 550 | advising |
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 discharge time of subject id 65759? | SELECT demographic.dischtime FROM demographic WHERE demographic.subject_id = "65759" | mimicsql_data |
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
) | Return the average age of captains in each class with a pie chart. | SELECT Class, AVG(age) FROM captain GROUP BY Class | nvbench |
CREATE TABLE table_name_92 (
frequency VARCHAR,
city_of_license VARCHAR
) | What frequency has temagami as the city of license? | SELECT frequency FROM table_name_92 WHERE city_of_license = "temagami" | sql_create_context |
CREATE TABLE table_14225409_1 (
reg_season VARCHAR,
playoffs VARCHAR,
us_open_cup VARCHAR
) | What was the regular season standings for the year when the playoffs reached the conference semifinals and the team did not qualify for the US Open Cup? | SELECT reg_season FROM table_14225409_1 WHERE playoffs = "Conference Semifinals" AND us_open_cup = "Did not qualify" | sql_create_context |
CREATE TABLE table_17498 (
".308 Winchester cartridge type" text,
"100 m group (mm)" text,
"100 m group ( MOA )" text,
"300 m group (mm)" text,
"300 m group ( MOA )" text
) | For which 100 m group ( moa ) is the 300 m group ( moa ) 0.63 | SELECT "100 m group ( MOA )" FROM table_17498 WHERE "300 m group ( MOA )" = '0.63' | wikisql |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
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_labitems (
row_id number,
itemid num... | since 2100, was there a microbiology test result for patient 32804's immunology? | SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 32804) AND microbiologyevents.spec_type_desc = 'immunology' AND STRFTIME('%y', microbiologyevents.charttime) >= '2100' | mimic_iii |
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... | how many male patients were born before the year 2060? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.dob_year < "2060" | mimicsql_data |
CREATE TABLE table_74465 (
"Townland" text,
"Area( acres )" real,
"Barony" text,
"Civil parish" text,
"Poor law union" text
) | Name the townland for fermoy and ballynoe | SELECT "Townland" FROM table_74465 WHERE "Poor law union" = 'Fermoy' AND "Civil parish" = 'Ballynoe' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE zyjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
... | 18416093这个病人的检验报告结果指标均正常的有哪些?检验报告单号是什么 | SELECT zyjybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN zyjybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '18416093' AND NOT zyjybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM ... | css |
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... | Create a bar chart showing school_id across all neutral, and rank All_Neutral in descending order. | SELECT All_Neutral, School_ID FROM basketball_match ORDER BY All_Neutral DESC | 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 jyjgzbb (
BGDH text,
BGRQ tim... | 患者的门诊诊断为急性支气管炎的触珠蛋白的参考值范围有哪些下限和上限? | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE wdmzjzjlb.JZZDSM = '急性支气管炎' AND jyjgzbb.JCZBMC = '触珠蛋白' UNION SELECT jyjgzbb.CKZFWXX, ... | css |
CREATE TABLE table_name_93 (
capacity INTEGER,
head_coach VARCHAR
) | What is the Capacity of the Venue of Head Coach Ali Asghar Modir Roosta? | SELECT MAX(capacity) FROM table_name_93 WHERE head_coach = "ali asghar modir roosta" | sql_create_context |
CREATE TABLE table_63204 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | What is the score when watford was the away team? | SELECT "Score" FROM table_63204 WHERE "Away team" = 'watford' | wikisql |
CREATE TABLE table_name_21 (
silver INTEGER,
bronze VARCHAR,
total VARCHAR,
nation VARCHAR
) | What is the sum of all silver medals with less than 23 medals in total and more than 3 bronze medals for the United States? | SELECT SUM(silver) FROM table_name_21 WHERE total < 23 AND nation = "united states" AND bronze > 3 | sql_create_context |
CREATE TABLE table_name_67 (
rank INTEGER,
nationality VARCHAR,
lane VARCHAR,
heat VARCHAR
) | What is the highest rank when the lane is larger than 6, and the heat is 3, and the nationality is colombia? | SELECT MAX(rank) FROM table_name_67 WHERE lane > 6 AND heat = 3 AND nationality = "colombia" | sql_create_context |
CREATE TABLE table_44733 (
"Round" real,
"Pick" text,
"Player" text,
"Position" text,
"Nationality" text,
"Club Team" text
) | Which club team was the player from who was selected in a round under 4? | SELECT "Club Team" FROM table_44733 WHERE "Round" < '4' | wikisql |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | has patient 027-203413 undergone a surgical resection for cancer treatment? | 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 = '027-203413')) AND treatment.treatmentname = 'surgical resection for cancer' | eicu |
CREATE TABLE table_name_11 (
october VARCHAR,
opponent VARCHAR
) | What date in October did the Flyers play against the Toronto Maple Leafs? | SELECT october FROM table_name_11 WHERE opponent = "toronto maple leafs" | sql_create_context |
CREATE TABLE table_name_89 (
season VARCHAR,
acquisition_via VARCHAR,
number VARCHAR
) | What season had an acquisition of free agency, and was higher than 9? | SELECT season FROM table_name_89 WHERE acquisition_via = "free agency" AND number > 9 | sql_create_context |
CREATE TABLE table_name_51 (
winner VARCHAR,
rally_leader VARCHAR,
name VARCHAR
) | Name the winner with rally leader of c. atkinson and name of agia sotira 1 | SELECT winner FROM table_name_51 WHERE rally_leader = "c. atkinson" AND name = "agia sotira 1" | sql_create_context |
CREATE TABLE table_name_16 (
cerclis_id VARCHAR,
deleted VARCHAR
) | What CERCLIS ID is Deleted of 04/07/2008? | SELECT cerclis_id FROM table_name_16 WHERE deleted = "04/07/2008" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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 te... | 门诊诊断为O75.901疾病的患者91426562,他的甲状旁腺素的结果定量及其单位分别是什么 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON 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 WHERE mzjzjlb.JZZDBM = 'O75.901' AND hz_info.RYB... | css |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE gsi (
c... | Is 586 something undergrads can take ? | SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 586 | advising |
CREATE TABLE table_name_90 (
games VARCHAR,
event VARCHAR
) | What games had the women's half middleweight event? | SELECT games FROM table_name_90 WHERE event = "women's half middleweight" | sql_create_context |
CREATE TABLE movie (
mid number,
title text,
year number,
director text
)
CREATE TABLE rating (
rid number,
mid number,
stars number,
ratingdate time
)
CREATE TABLE reviewer (
rid number,
name text
) | What are the names and years released for the movies with the top 3 highest ratings? | SELECT T2.title, T2.year FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid ORDER BY T1.stars DESC LIMIT 3 | spider |
CREATE TABLE table_name_39 (
categorie VARCHAR,
year VARCHAR,
awards VARCHAR
) | What was the categorie in 2002 at the Berlin international Film Festival that Danielle Darrieux was in? | SELECT categorie FROM table_name_39 WHERE year = 2002 AND awards = "berlin international film festival" | sql_create_context |
CREATE TABLE table_name_62 (
died VARCHAR,
ordained_bishop VARCHAR
) | When did the archbishop that was ordained a bishop on July 25, 1902 die? | SELECT died FROM table_name_62 WHERE ordained_bishop = "july 25, 1902" | sql_create_context |
CREATE TABLE table_name_72 (
home_team VARCHAR,
away_team VARCHAR
) | Who was Richmond's home team opponent? | SELECT home_team FROM table_name_72 WHERE away_team = "richmond" | sql_create_context |
CREATE TABLE table_24126606_2 (
final_score VARCHAR,
week VARCHAR
) | Name the final score for week 5 | SELECT final_score FROM table_24126606_2 WHERE week = 5 | sql_create_context |
CREATE TABLE table_204_125 (
id number,
"state" text,
"type" text,
"name" text,
"title" text,
"royal house" text,
"from" text,
"to" text
) | who is the other marquis ruler besides si jun ? | SELECT "name" FROM table_204_125 WHERE "title" = 'marquis' AND "name" <> 'si jun' | squall |
CREATE TABLE table_name_18 (
team VARCHAR,
ratt VARCHAR
) | What was the team with a ratt of 57? | SELECT team FROM table_name_18 WHERE ratt = "57" | sql_create_context |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
... | Tags used more than once without a wiki. | SELECT t.* FROM Tags AS t WHERE t.Count > 1 AND (t.ExcerptPostId IS NULL OR t.WikiPostId IS NULL) ORDER BY t.Count DESC, t.Id DESC | sede |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
... | has patient 016-29754 in 09/last year excreted any urinary catheter output: indwelling/continuous ure. | SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-29754')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutpu... | eicu |
CREATE TABLE table_name_41 (
result VARCHAR,
attendance VARCHAR
) | What are the results for the game with 82,113 attending? | SELECT result FROM table_name_41 WHERE attendance = "82,113" | sql_create_context |
CREATE TABLE table_48793 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | What is the attendance of the game that had a date listed as Bye? | SELECT "Attendance" FROM table_48793 WHERE "Date" = 'bye' | wikisql |
CREATE TABLE table_33230 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the away team against which the home team scored 10.14 (74)? | SELECT "Away team" FROM table_33230 WHERE "Home team score" = '10.14 (74)' | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | provide me the number of newborn who have transfer from hosp/extram as their admission location. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" | mimicsql_data |
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varch... | all flights and fares from DENVER to PITTSBURGH on US number 1039 on a THURSDAY | 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, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE (((DAYS_0.day_name = 'THURSDAY' AND flight.flight_days = DAYS_0.days_code AND flight.flight_number... | atis |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | let's count the number of times patient 58932 has had a other craniectomy procedure. | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'other craniectomy') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 58932) | mimic_iii |
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 ... | how many patients of black /african american ethnicity had elective type of admission ? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.ethnicity = "BLACK/AFRICAN AMERICAN" | mimicsql_data |
CREATE TABLE table_16729930_11 (
fsb VARCHAR,
model_number VARCHAR
) | Name the fsb for atom z540 | SELECT fsb FROM table_16729930_11 WHERE model_number = "Atom Z540" | sql_create_context |
CREATE TABLE table_12408 (
"Geelong DFL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | What is the highest Byes by Anakie who has an Against smaller than 2275? | SELECT MAX("Byes") FROM table_12408 WHERE "Geelong DFL" = 'anakie' AND "Against" < '2275' | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | give the diagnosis long title of the subject name kelly gallardo. | SELECT diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Kelly Gallardo" | mimicsql_data |
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 employees (
EMPLOYE... | For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about the sum of employee_id over the hire_date bin hire_date by weekday by a bar chart, rank Y-axis from low to high order. | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SUM(EMPLOYEE_ID) | nvbench |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
d... | how long is the last stay of patient 013-36766 in the icu? | SELECT STRFTIME('%j', patient.unitdischargetime) - STRFTIME('%j', patient.unitadmittime) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-36766') AND NOT patient.unitadmittime IS NULL ORDER BY patient.unitadmittime DESC LIMIT 1 | eicu |
CREATE TABLE table_name_84 (
format VARCHAR,
branding VARCHAR
) | What format is CBC Radio 2? | SELECT format FROM table_name_84 WHERE branding = "cbc radio 2" | sql_create_context |
CREATE TABLE table_1507852_5 (
type VARCHAR,
description VARCHAR
) | what's the type with description being fires when the overflow state changes. | SELECT type FROM table_1507852_5 WHERE description = "Fires when the overflow state changes." | sql_create_context |
CREATE TABLE table_5282 (
"Rider" text,
"Bike" text,
"Laps" real,
"Time" text,
"Grid" real
) | Which rider has a lap of 23, grid smaller than 18, and time +44.333? | SELECT "Rider" FROM table_5282 WHERE "Laps" = '23' AND "Grid" < '18' AND "Time" = '+44.333' | wikisql |
CREATE TABLE table_name_94 (
celebrity VARCHAR,
entered VARCHAR,
exited VARCHAR
) | Who entered on day 1 and exited on day 20? | SELECT celebrity FROM table_name_94 WHERE entered = "day 1" AND exited = "day 20" | sql_create_context |
CREATE TABLE Ref_Product_Categories (
product_category_code VARCHAR(15),
product_category_description VARCHAR(80),
unit_of_measure VARCHAR(20)
)
CREATE TABLE Characteristics (
characteristic_id INTEGER,
characteristic_type_code VARCHAR(15),
characteristic_data_type VARCHAR(10),
characterist... | What are the descriptions of the categories that products with product descriptions that contain the letter t are in, and count them by a bar chart, and display from high to low by the bars. | SELECT product_category_description, COUNT(product_category_description) FROM Ref_Product_Categories AS T1 JOIN Products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' GROUP BY product_category_description ORDER BY product_category_description DESC | nvbench |
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... | Show top 1000 users by accepted answer percentage. Add a minimum question treshold to filter out people with very few answers
Doesn't seem to be fully working yet | SELECT a.OwnerUserId AS "user_link", (SELECT Reputation FROM Users WHERE Id = a.OwnerUserId) AS Reputation, (SELECT COUNT(*) FROM Posts WHERE OwnerUserId = a.OwnerUserId AND PostTypeId = 2) AS NumAnswers, (CAST(COUNT(a.Id) AS FLOAT) / (SELECT COUNT(*) FROM Posts WHERE OwnerUserId = a.OwnerUserId AND PostTypeId = 2) * 1... | sede |
CREATE TABLE table_name_51 (
entries VARCHAR,
wins INTEGER
) | What is the number of entries associated with more than 11 wins? | SELECT entries FROM table_name_51 WHERE wins > 11 | sql_create_context |
CREATE TABLE table_name_71 (
year_s__won VARCHAR,
total INTEGER
) | Which Year(s) won has a Total smaller than 276? Question 1 | SELECT year_s__won FROM table_name_71 WHERE total < 276 | sql_create_context |
CREATE TABLE table_53014 (
"Member" text,
"Party" text,
"Electorate" text,
"State" text,
"First elected" text
) | Which state is frederick bamford a member of? | SELECT "State" FROM table_53014 WHERE "Member" = 'frederick bamford' | wikisql |
CREATE TABLE table_name_99 (
democratic_ticket VARCHAR,
socialist_labor_ticket VARCHAR
) | When John Emanuel ran under the Socialist Labor ticket who ran under the Democratic ticket? | SELECT democratic_ticket FROM table_name_99 WHERE socialist_labor_ticket = "john emanuel" | sql_create_context |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
... | what are the flights from BALTIMORE to DALLAS on sunday night | 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 <= 2359 AND flight.departure_time >= 1800) AND date_day.day_number = 27 AND date_day.month_number = 8 AND date_day.year... | atis |
CREATE TABLE Student_Tests_Taken (
test_result VARCHAR
) | List each test result and its count in descending order of count. | SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC | sql_create_context |
CREATE TABLE table_name_35 (
time INTEGER,
react VARCHAR,
athlete VARCHAR
) | What is the shortest Time for David Neville when his React time was greater than 0.183? | SELECT MIN(time) FROM table_name_35 WHERE react > 0.183 AND athlete = "david neville" | sql_create_context |
CREATE TABLE table_name_52 (
final_score VARCHAR,
opponent VARCHAR,
season VARCHAR
) | What is the final score when the opponent was Real Espa a, in the 2008 09 season? | SELECT final_score FROM table_name_52 WHERE opponent = "real españa" AND season = "2008–09" | sql_create_context |
CREATE TABLE table_22875514_3 (
assists INTEGER,
points VARCHAR
) | What is the most assists for points 129-3.9? | SELECT MAX(assists) FROM table_22875514_3 WHERE points = "129-3.9" | sql_create_context |
CREATE TABLE table_name_29 (
date VARCHAR,
venue VARCHAR
) | On what date was Kuwait City a venue? | SELECT date FROM table_name_29 WHERE venue = "kuwait city" | sql_create_context |
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... | 这位谢红香的患者在13年1月13日到14年5月21日期间,在医院看病时一共检查了多少次 | 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 '2013-01-13' AND '2014-05-21' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwyjz... | css |
CREATE TABLE table_36931 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" real,
"Record" text
) | Which home team was playing on January 13? | SELECT "Home" FROM table_36931 WHERE "Date" = 'january 13' | wikisql |
CREATE TABLE table_1670921_2 (
runs VARCHAR,
fielding_team VARCHAR
) | How many runs when bangladesh was the fielding team? | SELECT runs FROM table_1670921_2 WHERE fielding_team = "Bangladesh" | sql_create_context |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE com... | Am I allowed to take AEROSP 714 and AEROSP 566 in the same semester ? | SELECT COUNT(*) > 0 FROM course AS COURSE_0, course AS COURSE_1, course_offering AS COURSE_OFFERING_0, course_offering AS COURSE_OFFERING_1, course_prerequisite WHERE COURSE_OFFERING_1.semester = COURSE_OFFERING_0.semester AND COURSE_0.course_id = COURSE_OFFERING_0.course_id AND COURSE_0.department = 'AEROSP' AND COURS... | advising |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL v... | For those employees who did not have any job in the past, find job_id and the average of salary , and group by attribute job_id, and visualize them by a bar chart, and rank x-axis in descending order. | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID DESC | nvbench |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname var... | Will this year have an Logic and Artificial Intelligence colloquium ? | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE (course.description LIKE '%colloquium%' OR course.name LIKE '%colloquium%') AND (course.description LIKE '%Logic and Artificial Intelligence%' OR course.name LIKE '%Logic and Artificial Intelligence%') AND course.course_id = course_offering.course_id AND ... | advising |
CREATE TABLE table_204_266 (
id number,
"#" number,
"event year" number,
"season" text,
"flag bearer" text
) | name the flag bearer directly before zviadauri . | SELECT "flag bearer" FROM table_204_266 WHERE "event year" < (SELECT "event year" FROM table_204_266 WHERE "flag bearer" = 'zurab zviadauri') ORDER BY "event year" DESC LIMIT 1 | squall |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewTas... | Tag ratings in dynamic SQL. New version: https://data.stackexchange.com/anime/query/745962/tag-ratings | SELECT @foo | sede |
CREATE TABLE table_20424140_3 (
place INTEGER
) | What's the highest number a couple has ranked at? | SELECT MAX(place) FROM table_20424140_3 | sql_create_context |
CREATE TABLE table_name_42 (
inhabitants VARCHAR,
election VARCHAR,
municipality VARCHAR
) | Which inhabitants have 2009 as the election, with cremona as the municipality? | SELECT inhabitants FROM table_name_42 WHERE election = 2009 AND municipality = "cremona" | sql_create_context |
CREATE TABLE table_15026994_5 (
_number INTEGER,
viewing_figure VARCHAR
) | What is the # for the episode with viewing figures of 7.02 million ? | SELECT MAX(_number) FROM table_15026994_5 WHERE viewing_figure = "7.02 million" | sql_create_context |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of hire_date and the sum of manager_id bin hire_date by weekday. | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE table_61033 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real,
"Money ( $ )" real
) | Which Country has a To par smaller than 6, and a Money ($) larger than 700, and a Score of 69-73-70-71=283? | SELECT "Country" FROM table_61033 WHERE "To par" < '6' AND "Money ( $ )" > '700' AND "Score" = '69-73-70-71=283' | wikisql |
CREATE TABLE table_52019 (
"Position" real,
"Club" text,
"Played" real,
"Points" text,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
) | Tell me the total number of positions with goal difference more than -17 and played less than 38 | SELECT COUNT("Position") FROM table_52019 WHERE "Goal Difference" > '-17' AND "Played" < '38' | wikisql |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_f... | i need a flight from SALT LAKE CITY to EWR airport that arrives on saturday before 1800 | SELECT DISTINCT flight_id FROM flight WHERE (((((((arrival_time < 41 OR time_elapsed >= 60) AND departure_time > arrival_time) AND flight_days IN (SELECT DAYSalias1.days_code FROM days AS DAYSalias1 WHERE DAYSalias1.day_name IN (SELECT DATE_DAYalias1.day_name FROM date_day AS DATE_DAYalias1 WHERE DATE_DAYalias1.day_num... | atis |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
... | what is the first thing patient 4368 had for intake since 1798 days ago? | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT inputevents_cv.itemid FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 4368)) AND DATETIME(inputevents_cv.c... | mimic_iii |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.