context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
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 in... | what kind of ground transportation is there in DALLAS | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'DALLAS' AND ground_service.city_code = city.city_code | atis |
CREATE TABLE table_201_42 (
id number,
"year" text,
"title" text,
"role" text,
"notes" text
) | list the titles that include host as the role . | SELECT "title" FROM table_201_42 WHERE "role" = 'host' | squall |
CREATE TABLE table_name_14 (
tournament VARCHAR,
runner_s__up VARCHAR
) | What tournament that Fernando Roca is the runner-up? | SELECT tournament FROM table_name_14 WHERE runner_s__up = "fernando roca" | sql_create_context |
CREATE TABLE table_37950 (
"Rank" text,
"Name" text,
"Height m / ft" text,
"Floors" real,
"Year" real
) | What is the number of floors for the Citic Square? | SELECT AVG("Floors") FROM table_37950 WHERE "Name" = 'citic square' | wikisql |
CREATE TABLE table_52821 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | When the home team scored 19.15 (129)? | SELECT MIN("Crowd") FROM table_52821 WHERE "Home team score" = '19.15 (129)' | wikisql |
CREATE TABLE table_name_95 (
against INTEGER,
team VARCHAR,
lost VARCHAR
) | Which Against is the highest one that has a Team of flamengo, and a Lost smaller than 1? | SELECT MAX(against) FROM table_name_95 WHERE team = "flamengo" AND lost < 1 | sql_create_context |
CREATE TABLE table_name_62 (
points_1 VARCHAR,
position VARCHAR,
drawn VARCHAR
) | What is the total number of Points 1, when Position is '7', and when Drawn is greater than 6? | SELECT COUNT(points_1) FROM table_name_62 WHERE position = 7 AND drawn > 6 | sql_create_context |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | 病患73140420出院诊断疾病名称不包含活动在医院2020501的医疗就诊记录编号是多少? | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '73140420' AND t_kc21.MED_SER_ORG_NO = '2020501' AND NOT t_kc21.OUT_DIAG_DIS_NM LIKE '%活动%' | css |
CREATE TABLE table_4679 (
"Team" text,
"Constructor" text,
"Motorcycle" text,
"Rider" text,
"Rounds" text
) | Who does Yamaha Construct for? | SELECT "Team" FROM table_4679 WHERE "Constructor" = 'yamaha' | wikisql |
CREATE TABLE table_52138 (
"Athlete" text,
"Nationality" text,
"3.60" text,
"3.80" text,
"3.95" text,
"Result" text
) | What was the nationality of the athlete with a final result of 4.50? | SELECT "Nationality" FROM table_52138 WHERE "Result" = '4.50' | wikisql |
CREATE TABLE table_68592 (
"Film" text,
"Director(s)" text,
"Recipient" text,
"Date" text,
"Award" text
) | What directors won an award on 14/6/6? | SELECT "Director(s)" FROM table_68592 WHERE "Date" = '14/6/6' | wikisql |
CREATE TABLE table_31155 (
"Division" text,
"Brigade" text,
"Regiment" text,
"Colonel" text,
"County" text
) | what is the name of the coloneo of the 35th regiment | SELECT "Colonel" FROM table_31155 WHERE "Regiment" = '35th Regiment' | wikisql |
CREATE TABLE table_25042332_27 (
region VARCHAR,
automatic_washing_machine VARCHAR
) | Name the region for automatic washing machine being 60.9% | SELECT region FROM table_25042332_27 WHERE automatic_washing_machine = "60.9%" | sql_create_context |
CREATE TABLE table_60737 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) | Which Player has a Score of 67 in united states? | SELECT "Player" FROM table_60737 WHERE "Score" = '67' AND "Country" = 'united states' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | how many patients are diagnosed with primary disease upper gi bleed and are born before 2112? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "UPPER GI BLEED" AND demographic.dob_year < "2112" | mimicsql_data |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
air... | what is the latest flight from BOSTON to DENVER that serves a meal | 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, food_service WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code AND food_se... | atis |
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... | 针对医疗费总额高于8259.58元的鲁清馨患者的就医记录,在其出院的诊断里患了什么编号和名称的疾病? | SELECT t_kc24.t_kc21_OUT_DIAG_DIS_CD, t_kc24.t_kc21_OUT_DIAG_DIS_NM FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_NM = '鲁清馨' AND t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 8259.58) | css |
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
account_... | What is the relationship between account name and account id? Show me a scatter chart. | SELECT account_id, account_name FROM Accounts | nvbench |
CREATE TABLE table_201_36 (
id number,
"year" number,
"title" text,
"role" text,
"notes" text
) | which film aired in 1994 and has marika as the role ? | SELECT "title" FROM table_201_36 WHERE "year" = 1994 AND "role" = 'marika' | squall |
CREATE TABLE gwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 列一下2402730这家医院所有的就诊记载里病人的平均的年纪有多大,依照科室与入院诊断病名的差异把其中小于14岁的记录留下来 | SELECT gwyjzb.MED_ORG_DEPT_NM, gwyjzb.IN_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '2402730' GROUP BY gwyjzb.MED_ORG_DEPT_NM, gwyjzb.IN_DIAG_DIS_NM HAVING AVG(gwyjzb.PERSON_AGE) < 14 UNION SELECT fgwyjzb.MED_ORG_DEPT_NM, fgwyjzb.IN_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WH... | css |
CREATE TABLE table_name_52 (
to_club VARCHAR,
transfer_fee VARCHAR,
pos VARCHAR
) | What club received a DF player for free? | SELECT to_club FROM table_name_52 WHERE transfer_fee = "free" AND pos = "df" | sql_create_context |
CREATE TABLE table_name_95 (
objectnumber VARCHAR,
location VARCHAR,
wheels VARCHAR
) | What is the Object Number for the item with wheels 4-4-0 and a location of Barrow Hill? | SELECT objectnumber FROM table_name_95 WHERE location = "barrow hill" AND wheels = "4-4-0" | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9cod... | exactly what is the total amount of ns with 20kcl intake that patient 006-66039 has received since 1114 days ago? | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-66039')) AND intakeoutput.celllabel = 'ns wi... | eicu |
CREATE TABLE table_20785990_2 (
position VARCHAR,
home_town VARCHAR
) | What is the position of the player who's hometown is North Babylon, NY? | SELECT position FROM table_20785990_2 WHERE home_town = "North Babylon, NY" | sql_create_context |
CREATE TABLE table_17137 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) | When was the show first aired that was viewed by 3.57 million U.S. viewers? | SELECT "Original air date" FROM table_17137 WHERE "U.S. viewers (millions)" = '3.57' | wikisql |
CREATE TABLE table_4997 (
"Date" text,
"City" text,
"Opponent" text,
"Results\u00b9" text,
"Type of game" text
) | When was the game played in Zagreb? | SELECT "Date" FROM table_4997 WHERE "City" = 'zagreb' | wikisql |
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE field (
fieldid int
)
CREATE TA... | Who are the authors with the most published papers in SIGMOD ? | SELECT DISTINCT COUNT(paper.paperid), writes.authorid FROM keyphrase, paper, paperkeyphrase, writes WHERE keyphrase.keyphrasename = 'SIGMOD' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.paperid = paper.paperid GROUP BY writes.authorid ORDER BY COUNT(paper.... | scholar |
CREATE TABLE table_name_14 (
location VARCHAR,
winner VARCHAR
) | What is the location where shocker was the winner? | SELECT location FROM table_name_14 WHERE winner = "shocker" | sql_create_context |
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... | 列出在2002-10-26到2004-11-22内医院0049779开出的检验报告单中,不同检测指标结果定量单位以及不同检测指标名称下,检测指标结果定量的是多大平均值,保留平均值最大的9项? | SELECT jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDW, AVG(jyjgzbb.JCZBJGDL) FROM jyjgzbb JOIN jybgb_jyjgzbb JOIN jybgb ON jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JYZBLSH AND jybgb_jyjgzbb.jyjgzbb_id = jyjgzbb.jyjgzbb_id AND jybgb_jyjgzbb.YLJGDM = jybgb.YLJGDM WHERE jybgb.YLJGDM = '0049779' AND jyjgzbb.BGRQ BETWEEN '2002-10-26' AND '2004-11... | css |
CREATE TABLE table_37923 (
"Series Ep." text,
"Episode" real,
"Netflix" text,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
) | What segment d is associated with an episode number above 16 and a segment c of laser eye surgery? | SELECT "Segment D" FROM table_37923 WHERE "Episode" > '16' AND "Segment C" = 'laser eye surgery' | wikisql |
CREATE TABLE people (
people_id number,
name text,
height number,
weight number,
date_of_birth text
)
CREATE TABLE entrepreneur (
entrepreneur_id number,
people_id number,
company text,
money_requested number,
investor text
) | Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000. | SELECT investor FROM entrepreneur WHERE money_requested > 140000 INTERSECT SELECT investor FROM entrepreneur WHERE money_requested < 120000 | spider |
CREATE TABLE table_69253 (
"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 March playmate with an August playmate Gianna Amore? | SELECT "March" FROM table_69253 WHERE "August" = 'gianna amore' | wikisql |
CREATE TABLE table_name_4 (
release_date VARCHAR,
series VARCHAR,
title VARCHAR
) | What's the release date of Feather Finger with an MM Series? | SELECT release_date FROM table_name_4 WHERE series = "mm" AND title = "feather finger" | sql_create_context |
CREATE TABLE table_29273182_1 (
written_by VARCHAR,
production_code VARCHAR
) | Who wrote the episode with ip03012 as the production code? | SELECT written_by FROM table_29273182_1 WHERE production_code = "IP03012" | sql_create_context |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | provide the number of patients whose primary disease is upper gi bleed and age is less than 51? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "UPPER GI BLEED" AND demographic.age < "51" | mimicsql_data |
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
) | Show me the correlation about what is the average rating for each movie that has never been reviewed by Brittany Harris? | SELECT mID, AVG(stars) FROM Rating WHERE NOT mID IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = "Brittany Harris") GROUP BY mID | nvbench |
CREATE TABLE table_name_13 (
edition INTEGER,
winner VARCHAR,
third VARCHAR
) | Tell me the lowest edition for winner of arsenal and third of celtic | SELECT MIN(edition) FROM table_name_13 WHERE winner = "arsenal" AND third = "celtic" | sql_create_context |
CREATE TABLE table_name_9 (
team VARCHAR,
kit_manufacturer VARCHAR,
captain VARCHAR
) | What team has Pony as the kit manufacturer and Gary Mabbutt as the captain? | SELECT team FROM table_name_9 WHERE kit_manufacturer = "pony" AND captain = "gary mabbutt" | sql_create_context |
CREATE TABLE table_19534874_2 (
points VARCHAR,
mile_run VARCHAR
) | How many point categories are there for the 3 mile run? | SELECT COUNT(points) FROM table_19534874_2 WHERE mile_run = 3 | sql_create_context |
CREATE TABLE table_24373 (
"Barangay" text,
"Population (2000)" real,
"Population (2007)" real,
"Population (2010)" real,
"Barangay Fiesta" text
) | What was the population in 2010 for Minane | SELECT MAX("Population (2010)") FROM table_24373 WHERE "Barangay" = 'Minane' | wikisql |
CREATE TABLE table_18703 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | who is the the candidates with district being mississippi 4 | SELECT "Candidates" FROM table_18703 WHERE "District" = 'Mississippi 4' | wikisql |
CREATE TABLE table_46366 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | How many Bronze medals for the Nation with a Rank of 11 and less than 1 Silver? | SELECT MIN("Bronze") FROM table_46366 WHERE "Rank" = '11' AND "Silver" < '1' | wikisql |
CREATE TABLE station (
name VARCHAR,
lat INTEGER
) | What are the names of stations that have latitude lower than 37.5? | SELECT name FROM station WHERE lat < 37.5 | sql_create_context |
CREATE TABLE table_204_74 (
id number,
"#" number,
"title" text,
"producers" text,
"guest performers" text,
"length" text
) | which producers produced the majority of songs on this record ? | SELECT "producers" FROM table_204_74 GROUP BY "producers" ORDER BY COUNT("title") DESC LIMIT 1 | squall |
CREATE TABLE table_name_43 (
worldwide_gross VARCHAR,
director_s_ VARCHAR,
rank VARCHAR,
studio VARCHAR
) | For the movie directed by Martin Campbell at Columbia pictures with a ranking larger than 8, what is its worldwide gross? | SELECT worldwide_gross FROM table_name_43 WHERE rank > 8 AND studio = "columbia pictures" AND director_s_ = "martin campbell" | sql_create_context |
CREATE TABLE table_name_43 (
home_team VARCHAR,
away_team VARCHAR
) | If collingwood is playing away, who played as the home team? | SELECT home_team FROM table_name_43 WHERE away_team = "collingwood" | sql_create_context |
CREATE TABLE table_75206 (
"Game #" real,
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text,
"Points" real
) | What is the record of the game on November 22? | SELECT "Record" FROM table_75206 WHERE "Date" = 'november 22' | wikisql |
CREATE TABLE table_76229 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real,
"Money ( $ )" text
) | What is the total of all to par with player Bob Rosburg? | SELECT SUM("To par") FROM table_76229 WHERE "Player" = 'bob rosburg' | wikisql |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGR... | 08218858这个病人在二零年十月十七日以后有哪些住院就诊的检验报告单?看看这些住院就诊的流水编码 | SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON 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_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyj... | css |
CREATE TABLE table_name_40 (
goals VARCHAR,
name VARCHAR,
debut_year VARCHAR
) | How many goals occurred with Diego Milito in a debut year later than 2008? | SELECT COUNT(goals) FROM table_name_40 WHERE name = "diego milito" AND debut_year > 2008 | sql_create_context |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Na... | Which answers contain the most useless rant?. | SELECT u.Id AS "user_link", p.Id AS "post_link", LENGTH(p.Body) AS "length", p.Score AS "score", (-(p.Score * 1000) * LENGTH(p.Body)) / 1000 AS "formula" FROM Users AS u JOIN Posts AS p ON p.OwnerUserId = u.Id WHERE p.PostTypeId = 2 ORDER BY 'formula' DESC LIMIT 1000 | sede |
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | 56349425437检查结果指标记录的设备编码和仪器编号以及名称是啥 | SELECT SBBM, YQBH, YQMC FROM jyjgzbb WHERE JYZBLSH = '56349425437' | css |
CREATE TABLE table_11256021_1 (
founder VARCHAR,
date VARCHAR
) | who is the founder where date is c. 1900 | SELECT founder FROM table_11256021_1 WHERE date = "c. 1900" | sql_create_context |
CREATE TABLE table_80337 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
) | What Label released on October 25, 1984, in the format of Stereo LP? | SELECT "Label" FROM table_80337 WHERE "Date" = 'october 25, 1984' AND "Format" = 'stereo lp' | wikisql |
CREATE TABLE table_49152 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | what is the cfl team for position d? | SELECT "CFL Team" FROM table_49152 WHERE "Position" = 'd' | wikisql |
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
mean_dew_point_f INTEGER,
min_dew_point_f INTEGER,
max_humidity INTEGER,
mean_humidity INTEGER,
min_humidity INTEGER,
max_sea_level_pre... | Visualize a bar chart for what are the ids and names of all start stations that were the beginning of at least 200 trips?, list by the x-axis from low to high. | SELECT start_station_name, start_station_id FROM trip ORDER BY start_station_name | nvbench |
CREATE TABLE table_41130 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
) | What is the Format with a Catalog that is vcrd 103? | SELECT "Format" FROM table_41130 WHERE "Catalog" = 'vcrd 103' | 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 hz_info (
KH text,
KLX number... | 病患91823210在2008年5月3日以前做过的检验报告在哪些住院门诊?列出住院就诊流水编码 | SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '91823210' AND NOT zyjzjlb.JZLSH IN (SELECT zyjybgb.JZLSH FROM zyjybgb WHERE zyjybgb.BGRQ >= '2008-05-03' UNION SELECT mzjybgb.JZLSH FROM mzjybgb WHERE mzjybgb... | css |
CREATE TABLE table_61652 (
"Tournament" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | WHAT IS THE 2007 AT MADRID MASTERS? | SELECT "2007" FROM table_61652 WHERE "Tournament" = 'madrid masters' | wikisql |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar... | How many classes will be offered next semester across all departments ? | SELECT COUNT(DISTINCT course_offering.course_id) FROM course_offering, semester WHERE semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | advising |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
... | For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the average of department_id , and group by attribute job_id, sort by the names in descending please. | SELECT JOB_ID, AVG(DEPARTMENT_ID) 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 table_name_3 (
circuit VARCHAR,
winner VARCHAR,
race VARCHAR
) | what is the circuit when the winner is stan jones and the race is phillip island trophy race? | SELECT circuit FROM table_name_3 WHERE winner = "stan jones" AND race = "phillip island trophy race" | sql_create_context |
CREATE TABLE table_72587 (
"Position" real,
"Sail number" text,
"Yacht" text,
"State/country" text,
"Yacht type" text,
"LOA (Metres)" text,
"Skipper" text,
"Corrected time d:hh:mm:ss" text
) | What are all of the states or countries with a corrected time 3:13:40:05? | SELECT "State/country" FROM table_72587 WHERE "Corrected time d:hh:mm:ss" = '3:13:40:05' | wikisql |
CREATE TABLE membership_register_branch (
member_id number,
branch_id text,
register_year text
)
CREATE TABLE branch (
branch_id number,
name text,
open_year text,
address_road text,
city text,
membership_amount text
)
CREATE TABLE purchase (
member_id number,
branch_id tex... | Show name, address road, and city for all branches sorted by open year. | SELECT name, address_road, city FROM branch ORDER BY open_year | spider |
CREATE TABLE table_45744 (
"Player" text,
"Nationality" text,
"Jersey Number(s)" real,
"Position" text,
"Years" text,
"From" text
) | What is the Jersey Number of the Player from Clemson? | SELECT SUM("Jersey Number(s)") FROM table_45744 WHERE "From" = 'clemson' | wikisql |
CREATE TABLE table_name_1 (
home VARCHAR,
away VARCHAR
) | What is the home for the away of 4-0? | SELECT home FROM table_name_1 WHERE away = "4-0" | sql_create_context |
CREATE TABLE table_28987 (
"Country" text,
"Skip" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot %" text
) | Name the number of ends lost for 6 stolen ends | SELECT COUNT("Ends Lost") FROM table_28987 WHERE "Stolen Ends" = '6' | wikisql |
CREATE TABLE table_80160 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | Which country has a score of 70-66=136? | SELECT "Country" FROM table_80160 WHERE "Score" = '70-66=136' | wikisql |
CREATE TABLE table_203_512 (
id number,
"release date" text,
"album" text,
"catalog number" text,
"chart position" number,
"notes" text
) | how many albums were released in the month of november ? | SELECT COUNT("album") FROM table_203_512 WHERE "release date" = 11 | squall |
CREATE TABLE table_42796 (
"Name" text,
"Position" text,
"Number" real,
"Season" text,
"Acquisition via" text
) | What is the number of the acquisition of import in the 2002 season? | SELECT "Number" FROM table_42796 WHERE "Acquisition via" = 'import' AND "Season" = '2002' | wikisql |
CREATE TABLE bdmzjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH number,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZD... | 患者08045413检验的脸部的各项指标结果怎么样? | SELECT * 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.BGDH WHERE hz_info.RYBH = '... | css |
CREATE TABLE table_name_50 (
name VARCHAR,
direction VARCHAR,
terminus VARCHAR
) | Which bi-directional route has a terminus at Ecat/Rosa Park Transit Center? | SELECT name FROM table_name_50 WHERE direction = "bi-directional" AND terminus = "ecat/rosa park transit center" | sql_create_context |
CREATE TABLE table_9858 (
"Rank" real,
"Venue name" text,
"Highest attendance" text,
"Location" text,
"Current seating capacity" real
) | What is Highest Attendance, when Rank is 90, and when Venue Name is Infineon Raceway? | SELECT "Highest attendance" FROM table_9858 WHERE "Rank" = '90' AND "Venue name" = 'infineon raceway' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),... | For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the average of salary , and group by attribute job_id, I want to rank by the x axis in asc please. | 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 | nvbench |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | which patients have levo500pm drug code? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "LEVO500PM" | mimicsql_data |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE presc... | what is the minimum amount of hospital cost that includes granular casts until 1 year ago? | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'granular casts')) AND DATETIME(cost.chargetime) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY cost.... | mimic_iii |
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TAB... | first deep learning paper | SELECT DISTINCT paper.year FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'deep learning' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid GROUP BY paper.year ORDER BY paper.year | scholar |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_ti... | For GEOG 472 last semester , who were the GSIs ? | SELECT DISTINCT student.firstname, student.lastname FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN gsi ON gsi.course_offering_id = course_offering.offering_id INNER JOIN student ON student.student_id = gsi.student_id INNER JOIN semester ON semester.semester_id = course... | advising |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | give me the number of patients whose admission year is less than 2176 and diagnoses short title is hypopotassemia? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2176" AND diagnoses.short_title = "Hypopotassemia" | mimicsql_data |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE microlab (
microl... | calculate the duration of hospital stays of patient 035-22706's last hospital stay. | SELECT STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', patient.hospitaladmittime) FROM patient WHERE patient.uniquepid = '035-22706' AND NOT patient.hospitaladmittime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1 | eicu |
CREATE TABLE table_1342315_12 (
first_elected INTEGER,
incumbent VARCHAR
) | When was incumbent Leo E. Allen first elected? | SELECT MIN(first_elected) FROM table_1342315_12 WHERE incumbent = "Leo E. Allen" | sql_create_context |
CREATE TABLE table_27700530_11 (
high_assists VARCHAR,
team VARCHAR
) | Who had highest assists at the game against Houston? | SELECT high_assists FROM table_27700530_11 WHERE team = "Houston" | sql_create_context |
CREATE TABLE table_name_59 (
overall VARCHAR,
position VARCHAR,
pick VARCHAR
) | What is the total overall number of the ot position player with a pick greater than 5? | SELECT COUNT(overall) FROM table_name_59 WHERE position = "ot" AND pick > 5 | sql_create_context |
CREATE TABLE table_74978 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | In what Round was George Thomas Picked? | SELECT AVG("Round") FROM table_74978 WHERE "Name" = 'george thomas' | wikisql |
CREATE TABLE gyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | 在2008年4月28日到2018年10月12日之间参保人韦逸馨门诊手术费一共是多少? | SELECT SUM(t_kc22.AMOUNT) FROM t_kc22 JOIN mzb ON mzb.MED_ORG_DEPT_CD = t_kc22.MED_CLINIC_ID WHERE mzb.PERSON_SEX = '韦逸馨' AND t_kc22.STA_DATE BETWEEN '2008-04-28' AND '2018-10-12' AND t_kc22.MED_INV_ITEM_TYPE = '手术费' | css |
CREATE TABLE table_name_78 (
total INTEGER,
country VARCHAR
) | What is the highest Total for Australia? | SELECT MAX(total) FROM table_name_78 WHERE country = "australia" | sql_create_context |
CREATE TABLE table_77473 (
"Year" real,
"Championship" text,
"Partner" text,
"Opponents in the final" text,
"Score" text
) | which opponents in the u.s. championships played after 1945 and had a score of 3 6, 6 4, 2 6, 6 3, 20 18? | SELECT "Opponents in the final" FROM table_77473 WHERE "Championship" = 'u.s. championships' AND "Year" > '1945' AND "Score" = '3–6, 6–4, 2–6, 6–3, 20–18' | wikisql |
CREATE TABLE table_train_2 (
"id" int,
"gender" string,
"pregnancy_or_lactation" bool,
"diabetic" string,
"electro_systolic_process" bool,
"degenerative_pathology" bool,
"neurological_disease" bool,
"cardiomyopathy" bool,
"NOUSE" float
) | pregnant or lactating female | SELECT * FROM table_train_2 WHERE pregnancy_or_lactation = 1 AND gender = 'female' | criteria2sql |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD... | 能告诉我病人邹清舒所有医疗记录中医疗费总额超过1552.66元的入院诊断名称是什么吗?疾病编码呢 | SELECT t_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '邹清舒' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 1552.66) | css |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
... | what was the output of patient 017-49538 for the first time,? | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-49538')) AND intakeoutput.cellpath LIKE '%output%' ORDER... | eicu |
CREATE TABLE table_178408_1 (
location_of_the_church VARCHAR,
sub_parish__sokn_ VARCHAR
) | Name the location of the church for bremanger | SELECT location_of_the_church FROM table_178408_1 WHERE sub_parish__sokn_ = "Bremanger" | sql_create_context |
CREATE TABLE table_name_3 (
place VARCHAR,
to_par VARCHAR,
player VARCHAR
) | What place has E as the to par, with Mark Wiebe as the player? | SELECT place FROM table_name_3 WHERE to_par = "e" AND player = "mark wiebe" | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | give me the number of patients whose admission type is elective and lab test category is blood gas? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab."CATEGORY" = "Blood Gas" | mimicsql_data |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswer... | Votes on posts that are neither questions nor answers. | SELECT p.Id AS "post_link", p.Id AS "post_id", pt.Name AS "post_type", vt.Name AS "vote_type", v.UserId AS "user_link", v.CreationDate AS "vote_date", p.Body FROM Votes AS v JOIN Posts AS p ON v.PostId = p.Id JOIN PostTypes AS pt ON p.PostTypeId = pt.Id JOIN VoteTypes AS vt ON v.VoteTypeId = vt.Id WHERE pt.Name NOT IN ... | sede |
CREATE TABLE table_name_31 (
year VARCHAR,
winner__female_ VARCHAR,
talent__male_ VARCHAR
) | What year had Kim Gevaert as the female winner and Xavier de Baerdemaeker as the male talent? | SELECT year FROM table_name_31 WHERE winner__female_ = "kim gevaert" AND talent__male_ = "xavier de baerdemaeker" | sql_create_context |
CREATE TABLE table_22476 (
"Township" text,
"County" text,
"Pop. (2010)" real,
"Land ( sqmi )" text,
"Water (sqmi)" text,
"Latitude" text,
"Longitude" text,
"GEO ID" real,
"ANSI code" real
) | What county is associated with ansi code 1759686? | SELECT "County" FROM table_22476 WHERE "ANSI code" = '1759686' | wikisql |
CREATE TABLE table_71889 (
"Year" real,
"Winners" text,
"Club" text,
"Time" text,
"Runners-up" text
) | Who won when np cooper av cooke was runner up? | SELECT "Winners" FROM table_71889 WHERE "Runners-up" = 'np cooper av cooke' | 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... | what is age and procedure icd9 code of subject name estrella carroll? | SELECT demographic.age, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Estrella Carroll" | mimicsql_data |
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
) | What are the names of the cheapest products in each category along with the cheapest price in a bar chart? | SELECT Name, MIN(Price) FROM Products GROUP BY Name | nvbench |
CREATE TABLE table_39988 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Round" text,
"Time" text,
"Location" text
) | What was the resolution for the match that ended by Submission (armbar)? | SELECT "Res." FROM table_39988 WHERE "Method" = 'submission (armbar)' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.