context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_7038 (
"Year" real,
"Dates" text,
"Champion" text,
"Country" text,
"Score" text,
"Margin of victory" text,
"Tournament Location" text,
"Purse ( US$ )" real,
"Winner's share" real
) | What is the highest winner's share that has jiyai shin as the championship with a year prior to 2009? | SELECT MAX("Winner's share") FROM table_7038 WHERE "Champion" = 'jiyai shin' AND "Year" < '2009' | wikisql |
CREATE TABLE table_40802 (
"Verb" text,
"Proto-Austronesian" text,
"Proto-Malayo-Polynesian" text,
"Proto-Oceanic" text,
"Proto-Polynesian" text
) | What is the Proto-Oceanic verb for the verb to sew? | SELECT "Proto-Oceanic" FROM table_40802 WHERE "Verb" = 'to sew' | wikisql |
CREATE TABLE table_name_69 (
name VARCHAR,
games VARCHAR,
period VARCHAR
) | What is the name of the person with more than 299 games during the 1995 07 period? | SELECT name FROM table_name_69 WHERE games > 299 AND period = "1995–07" | sql_create_context |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | Show me about the distribution of All_Road and All_Games_Percent in a bar chart, and show by the y-axis in descending. | SELECT All_Road, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent DESC | nvbench |
CREATE TABLE table_18680 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | How many districts does william b. oliver represent? | SELECT COUNT("District") FROM table_18680 WHERE "Incumbent" = 'William B. Oliver' | wikisql |
CREATE TABLE table_name_71 (
bronze INTEGER,
nation VARCHAR,
total VARCHAR
) | What is the lowest number of bronze medals for Great Britain with more than 2 medals total? | SELECT MIN(bronze) FROM table_name_71 WHERE nation = "great britain" AND total > 2 | sql_create_context |
CREATE TABLE table_23206 (
"Sd" real,
"Rk" real,
"Player" text,
"Points" real,
"Points defending" real,
"Points won" real,
"New points" real,
"Status" text
) | Name the most points for champion, won in the final against am lie mauresmo | SELECT MAX("Points") FROM table_23206 WHERE "Status" = 'Champion, won in the final against Amélie Mauresmo' | wikisql |
CREATE TABLE table_name_76 (
postcodedistrict VARCHAR,
location VARCHAR
) | What is the name of the Post code district that is in Eden Park? | SELECT postcodedistrict FROM table_name_76 WHERE location = "eden park" | sql_create_context |
CREATE TABLE table_1189 (
"Division" text,
"Champion Score" text,
"Runner-Up Score" text,
"Final MVP Team" text,
"Defensive Player of the Final Team" text
) | When the division is Division 2 men what is the champion score? | SELECT "Champion Score" FROM table_1189 WHERE "Division" = 'Division 2 Men' | wikisql |
CREATE TABLE table_name_10 (
team VARCHAR,
races VARCHAR,
points VARCHAR
) | What is the Team that has a Races of 4, and a Points of 0? | SELECT team FROM table_name_10 WHERE races = "4" AND points = "0" | sql_create_context |
CREATE TABLE table_203_252 (
id number,
"draw" number,
"country" text,
"language" text,
"artist" text,
"song" text,
"english translation" text,
"place" number,
"points" number
) | what is the number of french speaking artist in the draw ? | SELECT COUNT("artist") FROM table_203_252 WHERE "language" = 'french' | squall |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | how many patients that survived were procedured with icd9 code 3152? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.icd9_code = "3512" | mimicsql_data |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 医疗记录中,患者年龄不低于22岁的平均医疗费总额是多少 | SELECT AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc21_t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_AGE >= 22) | css |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | close reason for closed postes over votes. | SELECT DISTINCT ph.PostId, ph.Comment AS reason, 'text' AS voters FROM PostHistory AS ph WHERE ph.PostHistoryTypeId = 10 | sede |
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 diagnoses short title of subject name tracy farmer? | SELECT diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Tracy Farmer" | mimicsql_data |
CREATE TABLE table_name_86 (
release_date VARCHAR,
title VARCHAR,
category VARCHAR,
developer VARCHAR
) | What Release date has a Category of utilities, a Developer of microsoft, and a Title of chord finder? | SELECT release_date FROM table_name_86 WHERE category = "utilities" AND developer = "microsoft" AND title = "chord finder" | sql_create_context |
CREATE TABLE table_801 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Who had the high rebound total against golden state? | SELECT "High rebounds" FROM table_801 WHERE "Team" = 'Golden State' | wikisql |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE prescriptions (
row_id number,
s... | whats the first value of anion gap until 61 months ago for patient 64538? | SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 64538) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'anion gap') AND DATETIME(labevents.charttime) <= DATETIME(CURRENT_TIME(), '-61 m... | mimic_iii |
CREATE TABLE table_78985 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
) | What is the smallest number of goals against when 8 games were lost, and the goals for are 60? | SELECT MIN("Goals Against") FROM table_78985 WHERE "Lost" = '8' AND "Goals For" = '60' | wikisql |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod... | what are the five most frequent drugs prescribed within 2 months to patients of age 60 or above after they had been diagnosed with gout nos, until 1 year ago? | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ... | mimic_iii |
CREATE TABLE table_10701133_1 (
title VARCHAR,
original_air_date VARCHAR
) | What is the title when original air date is may15,2008? | SELECT title FROM table_10701133_1 WHERE original_air_date = "May15,2008" | sql_create_context |
CREATE TABLE table_19379 (
"Week" real,
"Date" text,
"Opponent" text,
"Location" text,
"Time ( ET )" text,
"TV" text,
"Result" text,
"Record" text
) | Name the date when result is l 13 10 ot | SELECT "Date" FROM table_19379 WHERE "Result" = 'L 13–10 OT' | wikisql |
CREATE TABLE table_47307 (
"Rank" real,
"Rank Forbes 2000" real,
"Name" text,
"Headquarters" text,
"Revenue (Bn.$)" real,
"Profit (Bn.$)" real,
"Assets (Bn.$)" real,
"Market value (Bn.$)" real,
"Industry" text
) | What is the sum of revenue in Hong Kong with a rank greater than 42, less than $3.46 billion in assets, and greater than $0.17 billion in profits? | SELECT SUM("Revenue (Bn.$)") FROM table_47307 WHERE "Assets (Bn.$)" < '3.46' AND "Headquarters" = 'hong kong' AND "Profit (Bn.$)" > '0.17' AND "Rank" > '42' | wikisql |
CREATE TABLE Customers (
customer_id INTEGER,
customer_name VARCHAR(80),
customer_details VARCHAR(255)
)
CREATE TABLE Order_Items (
order_item_id INTEGER,
product_id INTEGER,
order_id INTEGER,
order_item_status VARCHAR(10),
order_item_details VARCHAR(255)
)
CREATE TABLE Invoices (
... | Compare the number of names of each product by a bar chart. | SELECT product_name, COUNT(product_name) FROM Orders AS T1 JOIN Order_Items AS T2 JOIN Products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY product_name | nvbench |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | 分别在哪几家医院患者钱婉娜被开出过编码为814113的药品? | SELECT gwyjzb.MED_SER_ORG_NO FROM gwyjzb WHERE gwyjzb.PERSON_NM = '钱婉娜' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_CD = '814113') UNION SELECT fgwyjzb.MED_SER_ORG_NO FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '钱婉娜' AND fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID... | css |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE zzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
K... | 由门诊诊断为矽肺Ⅲ期的病号的检测指标586304数值的平均值以及最值各自是多少? | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE zzmzjzjlb.JZZDSM = '矽肺(硅肺)Ⅲ期' AND jyjgzbb.JCZBDM = ... | css |
CREATE TABLE table_204_103 (
id number,
"medal" text,
"name" text,
"sport" text,
"event" text
) | what was the number of silver metals given for weightlifting ? | SELECT COUNT("medal") FROM table_204_103 WHERE "sport" = 'weightlifting' | squall |
CREATE TABLE table_name_97 (
points_against VARCHAR
) | Which Points against has a Lost of lost? | SELECT points_against FROM table_name_97 WHERE "lost" = "lost" | sql_create_context |
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... | 门诊81008457398是在哪一天结束就诊呢 | SELECT mzjzjlb.JZJSSJ FROM mzjzjlb WHERE mzjzjlb.JZLSH = '81008457398' | css |
CREATE TABLE table_7402 (
"Model number" text,
"Frequency" text,
"L2 cache" text,
"Multi 1" text,
"Voltage" text,
"Socket" text,
"Release date" text,
"Order part number" text
) | WHat kind of L2 cache has a Model number of turion x2 ultra zm-85? | SELECT "L2 cache" FROM table_7402 WHERE "Model number" = 'turion x2 ultra zm-85' | 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... | what is the number of patients whose discharge location is short term hospital and diagnoses long title is malignant neoplasm of descending colon? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND diagnoses.long_title = "Malignant neoplasm of descending colon" | mimicsql_data |
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
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_... | Bar graph to show total number of cloud cover from different date, list in desc by the total number. | SELECT date, SUM(cloud_cover) FROM weather ORDER BY SUM(cloud_cover) DESC | nvbench |
CREATE TABLE table_name_10 (
years VARCHAR,
school VARCHAR
) | What school year is vaucluse public school? | SELECT years FROM table_name_10 WHERE school = "vaucluse public school" | sql_create_context |
CREATE TABLE table_73169 (
"Season" real,
"Class" text,
"Team" text,
"Motorcycle" text,
"Type" text,
"Races" real,
"Wins" real,
"Podiums" real,
"Poles" real,
"Fastest Laps" real,
"Pts" real,
"Position" text
) | What's the number of poles in the season where the team had a Kalex motorcycle? | SELECT "Poles" FROM table_73169 WHERE "Motorcycle" = 'Kalex' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_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 ... | 团伙成员70821376号的常开药品的顺序是啥样的? | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_ID = '70821376' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC | css |
CREATE TABLE table_2442 (
"Position" real,
"Driver" text,
"Points" real,
"Winnings" text,
"Series" text
) | How much did Dale Jarrett win? | SELECT "Winnings" FROM table_2442 WHERE "Driver" = 'Dale Jarrett' | wikisql |
CREATE TABLE table_25652 (
"Country" text,
"KEI" text,
"KI" text,
"Economic Incentive Regime" text,
"Innovation" text,
"Education" text,
"ICT" text,
"2008 Rank" real
) | What is the 2008 rank of Djibouti? | SELECT "2008 Rank" FROM table_25652 WHERE "Country" = 'Djibouti' | wikisql |
CREATE TABLE table_name_93 (
earnings__ INTEGER,
money_list_rank VARCHAR,
starts VARCHAR
) | What is the smallest Earnings that has a Money list rank of 6 and Starts smaller than 22? | SELECT MIN(earnings__) AS $_ FROM table_name_93 WHERE money_list_rank = "6" AND starts < 22 | sql_create_context |
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE cine... | List all directors along with the number of films directed by each director. Plot them as bar chart. | SELECT Directed_by, COUNT(*) FROM film GROUP BY Directed_by | nvbench |
CREATE TABLE table_74760 (
"Event" text,
"Time" text,
"Nationality" text,
"Date" text,
"Meet" text,
"Location" text
) | What date was the 1500 m freestyle competition? | SELECT "Date" FROM table_74760 WHERE "Event" = '1500 m freestyle' | wikisql |
CREATE TABLE table_name_47 (
rank VARCHAR,
gold VARCHAR,
silver VARCHAR
) | What is the rank of the games that had 9 gold and 9 silvers? | SELECT rank FROM table_name_47 WHERE gold = "9" AND silver = "9" | sql_create_context |
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 student_record (
student_id int,
course_id int,
semester i... | Before I take ORALPATH 692 , what other courses would be useful ? | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'ORALPATH' AND number = 692 | advising |
CREATE TABLE table_63302 (
"Season" text,
"Div." text,
"Pos." text,
"Pld." text,
"Pts." text
) | What season had 3rd position, a 36 pld, and a bbl div? | SELECT "Season" FROM table_63302 WHERE "Pos." = '3rd' AND "Pld." = '36' AND "Div." = 'bbl' | wikisql |
CREATE TABLE table_29346 (
"Rank" real,
"Total USD" real,
"Project name" text,
"Creator" text,
"Category" text,
"% funded" real,
"Backers" real,
"Closing date" text
) | What was the maximum total USD collected by Pebble Technology? | SELECT MAX("Total USD") FROM table_29346 WHERE "Creator" = 'Pebble Technology' | wikisql |
CREATE TABLE table_203_104 (
id number,
"athlete" text,
"nation" text,
"olympics" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | how many total medals has the united states won in women 's figure skating ? | SELECT SUM("total") FROM table_203_104 WHERE "nation" = 'united states' | squall |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
... | Accept rate in rep range. | SELECT COUNT(AcceptedAnswerId) * 1.0 / COUNT(*) AS rate, COUNT(*) AS total FROM Users, Posts WHERE Posts.PostTypeId = 1 AND OwnerUserId = Users.Id AND Reputation >= '##minReputation##' AND Reputation <= '##maxReputation##' | sede |
CREATE TABLE table_43575 (
"Result" text,
"TUF Competitor" text,
"Opponent" text,
"Method" text,
"Event" text,
"Date" text
) | who is the opponent when the method is submission (rear naked choke) at 4:02 of round 2? | SELECT "Opponent" FROM table_43575 WHERE "Method" = 'submission (rear naked choke) at 4:02 of round 2' | wikisql |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate ti... | what's patient 27465's minimum temperature c (calc) since 03/19/2104. | SELECT MIN(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 = 27465)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'temp... | mimic_iii |
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 demographic (
subject_id text,
hadm_id t... | what is date of birth and death status of subject name travis hofman? | SELECT demographic.dob, demographic.expire_flag FROM demographic WHERE demographic.name = "Travis Hofman" | mimicsql_data |
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... | 12592992患者在11年9月27日至17年3月31日之内检测甲状腺摄取实验的医务人员工号及姓名各是什么? | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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 jyjgzbb.JYRQ BETWEEN '2011-09-27' AND '2017-03-3... | css |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChang... | Top SO users from France. | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS Link, DisplayName, Reputation FROM Users WHERE (LOWER(Location) LIKE '%france%' OR UPPER(Location) LIKE '%FRANCE%') AND Reputation > 2000 ORDER BY Reputation DESC | sede |
CREATE TABLE table_13282157_1 (
country VARCHAR,
player VARCHAR
) | what is the country where the player is phil mickelson? | SELECT country FROM table_13282157_1 WHERE player = "Phil Mickelson" | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtim... | what were the top five common drugs that patients were prescribed in the same hospital encounter after they had been prescribed with potassium chloride 10 meq/50ml iv soln until 1 year ago? | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime, patient.patienthealthsystemstayid FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'potassium chlori... | eicu |
CREATE TABLE table_name_2 (
constructor VARCHAR,
rank VARCHAR,
grid VARCHAR,
laps VARCHAR
) | Which constructor had a grid number bigger than 14, laps of more than 93, and rank higher than 25? | SELECT constructor FROM table_name_2 WHERE grid > 14 AND laps > 93 AND rank > 25 | sql_create_context |
CREATE TABLE table_name_79 (
player VARCHAR,
nationality VARCHAR,
overall VARCHAR
) | Which Player has a Nationality of united states, and an Overall of 61 (from boston)? | SELECT player FROM table_name_79 WHERE nationality = "united states" AND overall = "61 (from boston)" | sql_create_context |
CREATE TABLE table_name_37 (
time VARCHAR,
ad_freq VARCHAR,
show_name VARCHAR
) | What Time has Ad Freq of 15 minutes, and a Show Name of country today? | SELECT time FROM table_name_37 WHERE ad_freq = "15 minutes" AND show_name = "country today" | sql_create_context |
CREATE TABLE table_10907 (
"Year" real,
"Class" text,
"Bike" text,
"Rank" text,
"Points" real
) | Which rank took place prior to 2000 when the bike was bsl? | SELECT "Rank" FROM table_10907 WHERE "Year" < '2000' AND "Bike" = 'bsl' | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | what is discharge location and procedure icd9 code of subject id 65759? | SELECT demographic.discharge_location, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "65759" | mimicsql_data |
CREATE TABLE table_name_15 (
draws INTEGER,
against VARCHAR,
wins VARCHAR
) | What is th average dras when wins are less than 12 and the against is 989? | SELECT AVG(draws) FROM table_name_15 WHERE against = 989 AND wins < 12 | sql_create_context |
CREATE TABLE Reservations (
FirstName VARCHAR,
LastName VARCHAR
) | How many times does ROY SWEAZY has reserved a room. | SELECT COUNT(*) FROM Reservations WHERE FirstName = "ROY" AND LastName = "SWEAZY" | sql_create_context |
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 allergy (
allergy... | what was the last hospital hospital admission type of patient 013-9268 since 2102? | SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '013-9268' AND STRFTIME('%y', patient.hospitaladmittime) >= '2102' ORDER BY patient.hospitaladmittime DESC LIMIT 1 | eicu |
CREATE TABLE table_name_53 (
poles INTEGER,
season VARCHAR,
series VARCHAR
) | Can you tell me the sum of Poles that has the Season of 2005, and the Series of formula three sudamericana? | SELECT SUM(poles) FROM table_name_53 WHERE season = "2005" AND series = "formula three sudamericana" | sql_create_context |
CREATE TABLE table_name_75 (
caps INTEGER,
club_province VARCHAR,
position VARCHAR
) | What is the average number of caps for Meralomas with positions of centre? | SELECT AVG(caps) FROM table_name_75 WHERE club_province = "meralomas" AND position = "centre" | sql_create_context |
CREATE TABLE table_name_64 (
entries INTEGER,
wins VARCHAR,
percentage VARCHAR
) | Which driver has less than 37 wins and at 14.12%? | SELECT AVG(entries) FROM table_name_64 WHERE wins < 37 AND percentage = "14.12%" | sql_create_context |
CREATE TABLE table_31714 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | Tell me the average attendance for week of 11 | SELECT AVG("Attendance") FROM table_31714 WHERE "Week" = '11' | wikisql |
CREATE TABLE party (
party_id number,
party_theme text,
location text,
first_year text,
last_year text,
number_of_hosts number
)
CREATE TABLE host (
host_id number,
name text,
nationality text,
age text
)
CREATE TABLE party_host (
party_id number,
host_id number,
is... | Which parties have more than 20 hosts? Give me the host names for these parties. | SELECT T2.name FROM party_host AS T1 JOIN host AS T2 ON T1.host_id = T2.host_id JOIN party AS T3 ON T1.party_id = T3.party_id WHERE T3.number_of_hosts > 20 | spider |
CREATE TABLE table_20024 (
"Date" text,
"Tournament" text,
"Location" text,
"Purse( $ )" real,
"Winner" text,
"Score" text,
"1st Prize( $ )" text
) | What day was Jeld-Wen Tradition held? | SELECT "Date" FROM table_20024 WHERE "Tournament" = 'JELD-WEN Tradition' | wikisql |
CREATE TABLE All_documents (
document_id VARCHAR,
document_name VARCHAR
)
CREATE TABLE Ref_locations (
location_name VARCHAR,
location_code VARCHAR
)
CREATE TABLE Document_locations (
document_id VARCHAR,
location_code VARCHAR
) | Show the location name for document 'Robin CV'. | SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = "Robin CV" | sql_create_context |
CREATE TABLE table_67340 (
"Call sign" text,
"Frequency MHz" text,
"City of license" text,
"ERP W" real,
"Class" text,
"FCC info" text
) | What is the smallest ERP for allentown, pennsylvania? | SELECT MIN("ERP W") FROM table_67340 WHERE "City of license" = 'allentown, pennsylvania' | wikisql |
CREATE TABLE table_77538 (
"Place" text,
"Code" real,
"Area (km 2 )" real,
"Population" real,
"Most spoken language" text
) | What is the low code for glen harvie with a population greater than 2,774? | SELECT MIN("Code") FROM table_77538 WHERE "Population" > '2,774' AND "Place" = 'glen harvie' | wikisql |
CREATE TABLE table_name_56 (
attendance VARCHAR,
location VARCHAR,
time VARCHAR
) | yankee stadium (i), and a Time of 3:00 has what attendance for this location? | SELECT attendance FROM table_name_56 WHERE location = "yankee stadium (i)" AND time = "3:00" | sql_create_context |
CREATE TABLE table_72100 (
"Year" real,
"Division" text,
"League" text,
"Regular Season" text,
"Playoffs" text,
"U.S. Open Cup" text
) | what are all the playoffs for u.s. open cup in 1st round | SELECT "Playoffs" FROM table_72100 WHERE "U.S. Open Cup" = '1st Round' | wikisql |
CREATE TABLE txmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | 患者56570950在二零零七年十月九日之后有哪些门诊就诊的检验报告单?列出门诊就诊流水号 | SELECT txmzjzjlb.JZLSH FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '56570950' AND NOT txmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2007-10-09') UNION SELECT ftxmzjzjlb.JZLSH FROM hz_info JOI... | 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 patients whose insurance is government and lab test name is cd34? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Government" AND lab.label = "CD34" | mimicsql_data |
CREATE TABLE table_203_502 (
id number,
"team" text,
"titles" number,
"runner-up" number,
"third place" number,
"fourth place" number,
"years participated" number
) | which team had more titles , michigan state or colorado college ? | SELECT "team" FROM table_203_502 WHERE "team" IN ('michigan state', 'colorado college') ORDER BY "titles" DESC LIMIT 1 | squall |
CREATE TABLE table_30561 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | What is Timo Lehkonen's highest pick number? | SELECT MAX("Pick #") FROM table_30561 WHERE "Player" = 'Timo Lehkonen' | wikisql |
CREATE TABLE table_18587 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | Who were the candidates when Noah M. Mason was incumbent? | SELECT "Candidates" FROM table_18587 WHERE "Incumbent" = 'Noah M. Mason' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescription... | count the number of patients who are aged below 89 years with an item id 50889. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "89" AND lab.itemid = "50889" | mimicsql_data |
CREATE TABLE table_name_42 (
uk_base VARCHAR,
airborne_unit VARCHAR
) | Which UK Base has an airborne unit of Pathfinders? | SELECT uk_base FROM table_name_42 WHERE airborne_unit = "pathfinders" | sql_create_context |
CREATE TABLE table_32965 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
) | Which country contains the Shanghai Pudong International airport? | SELECT "Country" FROM table_32965 WHERE "Airport" = 'shanghai pudong international airport' | wikisql |
CREATE TABLE table_49655 (
"Team" text,
"Coach" text,
"Home Ground" text,
"Location" text,
"Founded" real
) | Which coach founded the Western Strikers team after 1963? | SELECT "Coach" FROM table_49655 WHERE "Founded" > '1963' AND "Team" = 'western strikers' | wikisql |
CREATE TABLE table_11685 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Which venue hosted an away team of Footscray? | SELECT "Venue" FROM table_11685 WHERE "Away team" = 'footscray' | wikisql |
CREATE TABLE table_name_91 (
title__english_ VARCHAR,
number_of_season VARCHAR
) | What is the English title for season 6? | SELECT title__english_ FROM table_name_91 WHERE number_of_season = 6 | sql_create_context |
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Student... | What is the date of enrollment of the course named 'Spanish', and count them by a bar chart, and rank Y-axis in descending order please. | SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish" ORDER BY COUNT(date_of_enrolment) DESC | nvbench |
CREATE TABLE zyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | 从2003年11月22日知道2014年7月17日这一段时间,陈恬美患者被开出的所有药品的编码是什么?名称是什么?数量是多少?单价是多少?金额是多少? | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '陈恬美' AND qtb.IN_HOSP_DATE BETWEEN '2003-11-22' AND '2014-07-17' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.Q... | css |
CREATE TABLE table_name_42 (
method VARCHAR,
event VARCHAR
) | Which method's event was flawless fighting championship 1: the beginning? | SELECT method FROM table_name_42 WHERE event = "flawless fighting championship 1: the beginning" | sql_create_context |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | Give me a bar chart for team_id of each all neutral | SELECT All_Neutral, Team_ID FROM basketball_match | nvbench |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patient... | tell me the name of the medication patient 030-52327 was prescribed in the same hospital visit after being diagnosed with acute respiratory distress - etiology unknown in this month? | SELECT t2.drugname FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid =... | eicu |
CREATE TABLE table_name_65 (
away_team VARCHAR,
ground VARCHAR
) | Which Away team has a Ground of gabba? | SELECT away_team FROM table_name_65 WHERE ground = "gabba" | sql_create_context |
CREATE TABLE table_name_96 (
capacity INTEGER,
stadium VARCHAR
) | What is the total capacity for the stadium of pasquale ianniello? | SELECT SUM(capacity) FROM table_name_96 WHERE stadium = "pasquale ianniello" | sql_create_context |
CREATE TABLE table_2159571_1 (
reason_for_change VARCHAR,
date_of_successors_formal_installation VARCHAR
) | What is every reason for change for the date of successors installation is March 16, 1960? | SELECT reason_for_change FROM table_2159571_1 WHERE date_of_successors_formal_installation = "March 16, 1960" | sql_create_context |
CREATE TABLE table_52197 (
"Release format" text,
"Country" text,
"Label" text,
"Cat. No." text,
"Release date" real
) | On what date did Epic label start its release? | SELECT SUM("Release date") FROM table_52197 WHERE "Label" = 'epic' | 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 were admitted before the year 2107 with an item id 51068? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2107" AND lab.itemid = "51068" | mimicsql_data |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
... | Posts using image hosting services other than Imgur. | SELECT CreationDate, ShorteningService, Id AS "post_link" FROM (SELECT Id, CreationDate, CASE WHEN LOWER(Body) LIKE '%tinypic.com%' THEN 'TinyPic' END AS ShorteningService FROM Posts) AS t WHERE NOT ShorteningService IS NULL ORDER BY CreationDate DESC LIMIT 1000 | sede |
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... | what is the name of the medicine patient 006-181433 was prescribed within 2 days after being diagnosed with lower gi bleeding in this month? | SELECT t2.drugname FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-181433') AND diagnosis.diagno... | eicu |
CREATE TABLE table_name_56 (
points VARCHAR,
year INTEGER
) | Name the points for year more than 1987 | SELECT points FROM table_name_56 WHERE year > 1987 | sql_create_context |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | 云鸿光这位团伙成员最常开的药品的排序看一下 | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '云鸿光' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC | css |
CREATE TABLE Invoices (
invoice_number INTEGER,
order_id INTEGER,
invoice_date DATETIME
)
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
account_id INTEGER,
invoice_number INTEGER,
transaction_type VARCHAR(15),
transaction_date DATETIME,
transaction_amount DECIMAL(19,... | Plot a scatter chart, invoice number by the total number . | SELECT invoice_number, COUNT(*) FROM Financial_Transactions GROUP BY invoice_number | nvbench |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Tags (
Id number,
TagName text,
Cou... | Duplicates of 4660142. | SELECT p.Title, p.Id FROM Posts AS p INNER JOIN PendingFlags AS pf ON p.Id = pf.PostId WHERE pf.DuplicateOfQuestionId = 4660142 | sede |
CREATE TABLE table_24040 (
"Episode #" real,
"Episode" real,
"Title" text,
"Director" text,
"Writer" text,
"Original airdate" text,
"U.S. airdate" text
) | What was the us airdate for 'Bear Breasts'? | SELECT "U.S. airdate" FROM table_24040 WHERE "Title" = 'Bear Breasts' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.