context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_75 (
Id VARCHAR
) | Which 2012 has a 2007 of 1r, and a 2008 of 1r, and a 2013 of 2r? | SELECT 2012 FROM table_name_75 WHERE 2007 = "1r" AND 2008 = "1r" AND 2013 = "2r" | sql_create_context |
CREATE TABLE table_203_56 (
id number,
"star" text,
"start\nyear" number,
"end\nyear" number,
"maximum\nyear" number,
"maximum\nmagnitude" number,
"distance at\nmaximum (ly)" number,
"current\ndistance" number,
"current\nmagnitude" number
) | which star has the highest distance at maximum ? | SELECT "star" FROM table_203_56 ORDER BY "distance at\nmaximum (ly)" DESC LIMIT 1 | squall |
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 cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id... | what is the daily minimum of arterial bp [systolic] for patient 17638 in 05/2105? | 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 = 17638)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arte... | mimic_iii |
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... | Find the number of skilled nursing facility discharged patients who had coronary artery disease/coronary artery bypass graft with mvr maze as their primary disease. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT WITH MVR; ? MAZE" | mimicsql_data |
CREATE TABLE table_27709 (
"Software" text,
"Description" text,
"Platform" text,
"License" text,
"Developer" text
) | What is the description of the license for GNU GPL v2 or Ruby license? | SELECT "Description" FROM table_27709 WHERE "License" = 'GNU GPL v2 or Ruby license' | wikisql |
CREATE TABLE table_76581 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What is the score of player bob rosburg? | SELECT "Score" FROM table_76581 WHERE "Player" = 'bob rosburg' | wikisql |
CREATE TABLE table_29332810_14 (
stage INTEGER,
aggressive_rider VARCHAR
) | Thomas de Gendt performed on what stage as aggressive rider? | SELECT MAX(stage) FROM table_29332810_14 WHERE aggressive_rider = "Thomas De Gendt" | sql_create_context |
CREATE TABLE table_16799784_9 (
name VARCHAR
) | What is the name origin of Morrigan Linea? | SELECT name AS origin FROM table_16799784_9 WHERE name = "Morrigan Linea" | sql_create_context |
CREATE TABLE Visitors (
Tourist_ID INTEGER,
Tourist_Details VARCHAR(255)
)
CREATE TABLE Museums (
Museum_ID INTEGER,
Museum_Details VARCHAR(255)
)
CREATE TABLE Theme_Parks (
Theme_Park_ID INTEGER,
Theme_Park_Details VARCHAR(255)
)
CREATE TABLE Staff (
Staff_ID INTEGER,
Tourist_Attract... | Show the names and ids of tourist attractions that are visited at most once by a bar chart, and show Tourist_Attraction_ID in descending order please. | SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN Visits AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID ORDER BY T1.Tourist_Attraction_ID DESC | nvbench |
CREATE TABLE table_23131 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | What's Steve Langdon's naitionality? | SELECT "Nationality" FROM table_23131 WHERE "Player" = 'Steve Langdon' | wikisql |
CREATE TABLE table_name_12 (
record VARCHAR,
date VARCHAR
) | Date of september 28 had what record? | SELECT record FROM table_name_12 WHERE date = "september 28" | sql_create_context |
CREATE TABLE table_75933 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) | What difference has a points greater than 10, and a drawn less than 2? | SELECT "Difference" FROM table_75933 WHERE "Points" > '10' AND "Drawn" < '2' | wikisql |
CREATE TABLE table_29876 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What`s the score in October 7. | SELECT "Score" FROM table_29876 WHERE "Date" = 'October 7' | wikisql |
CREATE TABLE Elimination (
Elimination_ID text,
Wrestler_ID text,
Team text,
Eliminated_By text,
Elimination_Move text,
Time text
)
CREATE TABLE wrestler (
Wrestler_ID int,
Name text,
Reign text,
Days_held text,
Location text,
Event text
) | A pie chart shows the proportion of the number of locations of the wrestlers. | SELECT Location, COUNT(Location) FROM wrestler GROUP BY Location | nvbench |
CREATE TABLE table_name_39 (
team VARCHAR,
machine VARCHAR,
points VARCHAR
) | What is the Team with a Machine that is nsr250 and has Points of 8? | SELECT team FROM table_name_39 WHERE machine = "nsr250" AND points = 8 | sql_create_context |
CREATE TABLE table_name_33 (
player VARCHAR,
score VARCHAR,
place VARCHAR
) | Which Player has a Score smaller than 69, and a Place of t1? | SELECT player FROM table_name_33 WHERE score < 69 AND place = "t1" | sql_create_context |
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_J... | A bar chart about how many professors have a PhD in each department?, and I want to display by the Y from low to high. | SELECT DEPT_CODE, COUNT(*) FROM PROFESSOR WHERE PROF_HIGH_DEGREE = 'Ph.D.' GROUP BY DEPT_CODE ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_44628 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" text
) | What is To Par, when Player is Greg Norman? | SELECT "To par" FROM table_44628 WHERE "Player" = 'greg norman' | wikisql |
CREATE TABLE table_name_77 (
capacity VARCHAR,
colors VARCHAR
) | Which capacity has a purple and white colors? | SELECT capacity FROM table_name_77 WHERE colors = "purple and white" | sql_create_context |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number... | count the amount of intensive care unit visits of patient 035-15069 in 2104. | SELECT COUNT(DISTINCT patient.patientunitstayid) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-15069') AND STRFTIME('%y', patient.unitadmittime) = '2104' | eicu |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
... | 列举出病患苏兰娜在06年7月30日到19年10月4日内被开出的所有检验报告单的名称以及科室编号是什么? | SELECT jybgb.KSBM, jybgb.KSMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '苏... | css |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | what is the drug code of the patient id 6983? | SELECT prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.subject_id = "6983" | mimicsql_data |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | 列举出在2001年2月17日到2007年7月3日这段时间内患者24318631所有检验报告单的审核日期时间是什么呢? | SELECT jybgb.SHSJ FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '24318631' AND jybgb.BGRQ BETWEEN '2001-02-17' AND '2007-07-03' UNION... | css |
CREATE TABLE table_31277 (
"Rank" real,
"English title" text,
"Chinese title" text,
"Average" real,
"Peak" real,
"Premiere" real,
"Finale" real,
"HK viewers" text
) | how many milion of viewers where in the episode called in english 'is a great way to care | SELECT "HK viewers" FROM table_31277 WHERE "English title" = 'A Great Way to Care' | wikisql |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | give the number of patients whose insurance is private and procedure icd9 code is 4105. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.icd9_code = "4105" | mimicsql_data |
CREATE TABLE table_203_789 (
id number,
"season" text,
"team" text,
"country" text,
"division" number,
"apps" number,
"goals" number,
"assists" number
) | in what two seasons were there no goals scored ? | SELECT "season" FROM table_203_789 WHERE "goals" = 0 | squall |
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 013-20464's heartrate been less than 46.0 degrees since 07/07/2105? | SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-20464')) AND vitalperiodic.heartrate < 46.0 AND NOT vitalperiodi... | eicu |
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,
... | what was the minimum monthly number of patients who were diagnosed with ards - non-pulmonary etiology until 2104? | SELECT MIN(t1.c1) FROM (SELECT COUNT(DISTINCT diagnosis.patientunitstayid) AS c1 FROM diagnosis WHERE diagnosis.diagnosisname = 'ards - non-pulmonary etiology' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104' GROUP BY STRFTIME('%y-%m', diagnosis.diagnosistime)) AS t1 | eicu |
CREATE TABLE table_name_77 (
Id VARCHAR
) | Name the 2008 for wta premier mandatory tournaments of 2007 | SELECT 2008 FROM table_name_77 WHERE 2007 = "wta premier mandatory tournaments" | sql_create_context |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
C... | Django VS Rails - Total Posts by MONTH and YEAR. | SELECT Tags.TagName, YEAR(Posts.CreationDate) AS "yeardate", MONTH(Posts.CreationDate) AS "monthdate", COUNT(Posts.Id) AS "totalposts" FROM Tags JOIN PostTags ON PostTags.TagId = Tags.Id JOIN Posts ON PostTags.PostId = Posts.Id WHERE Tags.TagName = 'django' OR Tags.TagName = 'ruby-on-rails' GROUP BY Tags.TagName, YEAR(... | sede |
CREATE TABLE table_37476 (
"Episode" text,
"Title" text,
"Writer(s)" text,
"Preservation" text,
"Original airdate" text
) | Who wrote Episode 2-15 (56)? | SELECT "Writer(s)" FROM table_37476 WHERE "Episode" = '2-15 (56)' | wikisql |
CREATE TABLE table_61837 (
"Air Date" text,
"Rating" text,
"18-49" text,
"Viewers" text,
"Weekly Winner" text
) | What is Rating, when Air Date is 'July 24, 2008*', and when Weekly Winner is 'Sales Rep. Oscar Ledezma'? | SELECT "Rating" FROM table_61837 WHERE "Air Date" = 'july 24, 2008*' AND "Weekly Winner" = 'sales rep. oscar ledezma' | wikisql |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDis... | Number of questions asked per week given a starting creation date. | SELECT COUNT(UniqueId) AS NrOfQuestions, WeekStart FROM (SELECT Posts.Id AS UniqueId, DATEADD(week, DATEDIFF(day, '20000109', CreationDate) / 7, '20000109') AS WeekStart FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.Id = PostTags.PostId WHERE Posts.CreationDate >= @CreationDate AND... | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | count the number of patients whose admission type is elective? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" | mimicsql_data |
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME var... | Find the number of students for each department Plot them as bar chart, and order y axis in descending order. | SELECT DEPT_CODE, COUNT(*) FROM STUDENT GROUP BY DEPT_CODE ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TAB... | what was the daily maximum value of weight for patient 016-25367 on their last hospital encounter? | SELECT MAX(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-25367' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) AND NOT patient.admissionweight IS NULL ... | eicu |
CREATE TABLE table_34237 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | Name the least rank with bronze of 2, gold more than 0 and nation of ynys m n/anglesey with total more than 8 | SELECT MIN("Rank") FROM table_34237 WHERE "Bronze" = '2' AND "Gold" > '0' AND "Nation" = 'ynys môn/anglesey' AND "Total" > '8' | wikisql |
CREATE TABLE table_47129 (
"Institution" text,
"Wins" real,
"Loss" real,
"Home Wins" real,
"Home Losses" real,
"Away Wins" real,
"Away Losses" real,
"Neutral Wins" real,
"Neutral Losses" real
) | What is the sum of the home wins of the Boston College Eagles, which has more than 6 wins? | SELECT SUM("Home Wins") FROM table_47129 WHERE "Institution" = 'boston college eagles' AND "Wins" > '6' | wikisql |
CREATE TABLE table_48581 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | WHAT IS THE TEAM WITH ATTENDANCE AT TARGET CENTER 11,921? | SELECT "Team" FROM table_48581 WHERE "Location Attendance" = 'target center 11,921' | wikisql |
CREATE TABLE Customer_Event_Notes (
Customer_Event_Note_ID INTEGER,
Customer_Event_ID INTEGER,
service_type_code CHAR(15),
resident_id INTEGER,
property_id INTEGER,
date_moved_in DATETIME
)
CREATE TABLE Properties (
property_id INTEGER,
property_type_code CHAR(15),
property_address ... | Please use a bar chart to compare the number of customers of each customer's move in date. | SELECT date_moved_in, COUNT(date_moved_in) FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY date_moved_in | 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... | 参照出院诊断疾病的编码不同与科室不同,计算出医院3349404全部诊疗记录中需个人自费的部分与总共的医疗费用比值的最小值然后按从小到大来排列显示 | SELECT t_kc24.t_kc21_MED_ORG_DEPT_NM, t_kc24.t_kc21_OUT_DIAG_DIS_CD, MIN(t_kc24.PER_EXP) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '3349404' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_NM, t_kc24.t_kc21_OUT_DIAG_DIS_CD ORDER BY MIN(t_kc24.PER_EXP / t_kc24.MED_AMOUT) | css |
CREATE TABLE table_70666 (
"Rank" text,
"Nation" text,
"Gold" text,
"Silver" text,
"Bronze" text,
"Total" text
) | Which bronze has a Nation of poland? | SELECT "Bronze" FROM table_70666 WHERE "Nation" = 'poland' | wikisql |
CREATE TABLE table_59787 (
"Parish (Prestegjeld)" text,
"Sub-Parish (Sogn)" text,
"Church Name" text,
"Year Built" real,
"Location of the Church" text
) | Which Sub-Parish (Sogn) is in the Parish (Prestegjeld) of hafslo parish and has a church called Hafslo Kyrkje? | SELECT "Sub-Parish (Sogn)" FROM table_59787 WHERE "Parish (Prestegjeld)" = 'hafslo parish' AND "Church Name" = 'hafslo kyrkje' | wikisql |
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_... | i need the cheapest direct flight from ATLANTA to DENVER leaving on 5 7 | SELECT DISTINCT FLIGHT_0.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, ... | atis |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 医院9223333有多少科室在门诊就诊中开出不少于13张检验报告单,在2010-12-18到2020-10-25内? | SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = jybgb.BGDH AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = jybgb.B... | css |
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_seaso... | Plot the total number by grouped by directed by as a bar graph, and I want to rank by the bars in ascending please. | SELECT Directed_by, COUNT(*) FROM film GROUP BY Directed_by ORDER BY Directed_by | nvbench |
CREATE TABLE table_72222 (
"Player" text,
"No.(s)" text,
"Height in Ft." text,
"Position" text,
"Years for Rockets" text,
"School/Club Team/Country" text
) | What is the number of the player who went to Southern University? | SELECT "No.(s)" FROM table_72222 WHERE "School/Club Team/Country" = 'Southern University' | wikisql |
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... | 在编号为97271307283的这次医疗就诊中,大病支付金是多少 | SELECT ILL_PAY FROM t_kc24 WHERE MED_CLINIC_ID = '97271307283' | css |
CREATE TABLE Participants_in_Events (
Event_ID INTEGER,
Participant_ID INTEGER
)
CREATE TABLE Events (
Event_ID INTEGER,
Service_ID INTEGER,
Event_Details VARCHAR(255)
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15)
)
CREATE TABLE Participants (
Participant_ID... | Show me a bar chart for what are the ids and details of events that have more than one participants? | SELECT T1.Event_Details, T1.Event_ID FROM Events AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_Details | nvbench |
CREATE TABLE table_name_47 (
gold INTEGER,
bronze VARCHAR,
total VARCHAR
) | Which Gold is the lowest one that has a Bronze of 14, and a Total larger than 42? | SELECT MIN(gold) FROM table_name_47 WHERE bronze = 14 AND total > 42 | sql_create_context |
CREATE TABLE table_6786 (
"Date" text,
"Time" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Set 4" text,
"Total" text,
"Report" text
) | What is the Set 1 when the date is 08 jul, and a Set 2 of 25 21? | SELECT "Set 1" FROM table_6786 WHERE "Date" = '08 jul' AND "Set 2" = '25–21' | wikisql |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
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,
... | 在医疗机构6774541看病,异地就医的人数有多少 | SELECT COUNT(t_kc21.PERSON_ID) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '6774541' AND t_kc21.REMOTE_SETTLE_FLG = '异地1' OR t_kc21.REMOTE_SETTLE_FLG = '异地2' | css |
CREATE TABLE table_name_85 (
date VARCHAR,
loss VARCHAR
) | What was the date of the game that had a loss of Burns (0-1)? | SELECT date FROM table_name_85 WHERE loss = "burns (0-1)" | sql_create_context |
CREATE TABLE table_name_63 (
rank__2012_ VARCHAR
) | What is the 2012 Employees (Total) when the rank (2012) is 7? | SELECT 2012 AS _employees__total_ FROM table_name_63 WHERE rank__2012_ = 7 | sql_create_context |
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description... | please list the AA flights from HOUSTON to MILWAUKEE | 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 = 'MILWAUKEE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'HOU... | atis |
CREATE TABLE table_55063 (
"Block A" text,
"Ryuji Hijikata" text,
"Shuji Kondo" text,
"El NOSAWA Mendoza" text,
"PEPE Michinoku" text,
"Katsuhiko Nakajima" text
) | What is the PEPE Michinoku value for a Ryuji Hijikata value of sabin (12:33)? | SELECT "PEPE Michinoku" FROM table_55063 WHERE "Ryuji Hijikata" = 'sabin (12:33)' | wikisql |
CREATE TABLE table_name_1 (
money___ INTEGER,
to_par INTEGER
) | WHAT IS THE LOWEST MONEY WITH TO PAR LARGER THAN 26? | SELECT MIN(money___) AS $__ FROM table_name_1 WHERE to_par > 26 | sql_create_context |
CREATE TABLE Student (
major VARCHAR
) | Show all majors and corresponding number of students. | SELECT major, COUNT(*) FROM Student GROUP BY major | sql_create_context |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
Deletio... | All Posts and answers with less then 300 characters after 5/10/2015. | SELECT Id, CreationDate, ParentId, PostTypeId, Body FROM Posts AS p WHERE LENGTH(Body) <= 300 AND p.CreationDate > '2015-05-10' | sede |
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 with quantitative g6pd lab test were admitted in the hospital for more than 16 days? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "16" AND lab.label = "Quantitative G6PD" | mimicsql_data |
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,
... | on the first intensive care unit visit, when was the last time that patient 021-198501 had a output y (ml)-chest tube y - a #1 right lateral b #4 left lateral output? | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-198501') AND NOT patient.unitdischargetime IS NUL... | eicu |
CREATE TABLE table_6617 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"Nationality" text,
"School/Club Team" text
) | What Nationality is the Pick that is 116? | SELECT "Nationality" FROM table_6617 WHERE "Pick" = '116' | wikisql |
CREATE TABLE table_11677691_2 (
player VARCHAR,
college VARCHAR
) | HOW MANY PLAYERS PLAY FOR OREGON? | SELECT COUNT(player) FROM table_11677691_2 WHERE college = "Oregon" | 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 Subject... | How many enrolment students in each day? Return a bar chart binning date of enrolment by weekday, and list y axis from low to high order. | SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment ORDER BY COUNT(date_of_enrolment) | nvbench |
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... | what is the last red blood cells in patient 14467 this month? | SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14467) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'red blood cells') AND DATETIME(labevents.charttime, 'start of month') = DATETIME... | mimic_iii |
CREATE TABLE table_49093 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To Par" real,
"Money ( $ )" real
) | What is the highest Money ( $ ), when To Par is less than 2? | SELECT MAX("Money ( $ )") FROM table_49093 WHERE "To Par" < '2' | wikisql |
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 on main type of drug prescription who have diagnoses icd9 code v4962. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "V4962" AND prescriptions.drug_type = "MAIN" | mimicsql_data |
CREATE TABLE table_51849 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | I want the score for 23 july 1992 | SELECT "Score" FROM table_51849 WHERE "Date" = '23 july 1992' | wikisql |
CREATE TABLE table_67373 (
"Language" text,
"Number" text,
"percentage (%)" text,
"males" text,
"females" text
) | How many females speak Ukrainian? | SELECT "females" FROM table_67373 WHERE "Language" = 'ukrainian' | wikisql |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | 在医院9155074中,根据入院诊断疾病编码查出不同疾病的平均患者年龄是多少 | SELECT IN_DIAG_DIS_CD, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '9155074' GROUP BY IN_DIAG_DIS_CD | css |
CREATE TABLE table_name_31 (
bronze VARCHAR,
notes VARCHAR
) | Who won Bronze with Notes of 2.5km, 16controls? | SELECT bronze FROM table_name_31 WHERE notes = "2.5km, 16controls" | sql_create_context |
CREATE TABLE table_26846 (
"Seed" real,
"Rank" real,
"Player" text,
"Points" real,
"Points defending" text,
"Points won" real,
"New points" real,
"Status" text
) | How many players named victor h nescu played? | SELECT COUNT("Points won") FROM table_26846 WHERE "Player" = 'Victor Hănescu' | wikisql |
CREATE TABLE table_45563 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
) | What Country's ICAO is VOTR? | SELECT "Country" FROM table_45563 WHERE "ICAO" = 'votr' | wikisql |
CREATE TABLE table_23292220_13 (
scores VARCHAR,
seans_team VARCHAR
) | What was the score in the episode that had Louie Spence and Joe Wilkinson on Sean's team? | SELECT scores FROM table_23292220_13 WHERE seans_team = "Louie Spence and Joe Wilkinson" | 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 wdmzjzjlb (
HXPLC number,
HZX... | 在2003年4月11日到2012年1月23日这段时间医院5023348有多少科室在门诊就诊期间开出的检验报告单比19张多的? | SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM wdmzjzjlb JOIN jybgb ON wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE wdmzjzjlb.YLJGDM = '5023348' AND jybgb.BGRQ BETWEEN '2003-04-11' AND '2012-01-23' GROUP BY jybgb.KSBM HAVING COUNT(*) >= 19 UNION SELECT jybgb.KSBM FROM bdmzjzjlb ... | css |
CREATE TABLE table_36625 (
"Fraction" text,
"Ellipsis" text,
"Vinculum" text,
"Dots" text,
"Parentheses" text
) | What is the value of vinculum for parentheses of 0.(6)? | SELECT "Vinculum" FROM table_36625 WHERE "Parentheses" = '0.(6)' | wikisql |
CREATE TABLE fires (
fire_year number,
discovery_date number,
discovery_doy number,
discovery_time text,
stat_cause_code number,
stat_cause_descr text,
cont_date text,
cont_doy text,
cont_time text,
fire_size number,
fire_size_class text,
latitude number,
longitude nu... | Who was responsible for the land of the biggest fire in Oregon in 2015? | SELECT owner_descr FROM fires WHERE state = "OR" AND fire_year = 2015 ORDER BY fire_size DESC LIMIT 1 | uswildfires |
CREATE TABLE table_name_93 (
title VARCHAR,
track INTEGER
) | What is the title of the track after 11? | SELECT title FROM table_name_93 WHERE track > 11 | sql_create_context |
CREATE TABLE branch (
city VARCHAR,
open_year INTEGER
) | Show the city and the number of branches opened before 2010 for each city. | SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city | sql_create_context |
CREATE TABLE Department_Store_Chain (
dept_store_chain_id INTEGER,
dept_store_chain_name VARCHAR(80)
)
CREATE TABLE Staff (
staff_id INTEGER,
staff_gender VARCHAR(1),
staff_name VARCHAR(80)
)
CREATE TABLE Product_Suppliers (
product_id INTEGER,
supplier_id INTEGER,
date_supplied_from D... | Show the price of each product supplied by supplier id 3 in a bar chart, and list from low to high by the y axis. | SELECT product_name, product_price FROM Product_Suppliers AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3 ORDER BY product_price | nvbench |
CREATE TABLE table_name_25 (
tournament VARCHAR
) | Which tournament's 2001 and 2006s were a? | SELECT tournament FROM table_name_25 WHERE 2001 = "a" AND 2006 = "a" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | provide the number of patients whose diagnoses long title is hypovolemia and lab test category is chemistry? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Hypovolemia" AND lab."CATEGORY" = "Chemistry" | mimicsql_data |
CREATE TABLE race (
race_id number,
name text,
class text,
date text,
track_id text
)
CREATE TABLE track (
track_id number,
name text,
location text,
seating number,
year_opened number
) | What is the race class with most number of races. | SELECT class FROM race GROUP BY class ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE T... | How many Copy Editor/Strunk & White-qualifying edits have I made?. Counts the number of title and/or body revisions you've made
on other people's non-deleted posts. | SELECT * FROM PostHistoryTypes | sede |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TA... | when is the first time patient 006-254182 was prescribed a medication via inpl route until 15 months ago? | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-254182')) AND medication.routeadmin = 'inpl' AND DATETIME(... | eicu |
CREATE TABLE table_1341718_14 (
incumbent VARCHAR,
candidates VARCHAR
) | how many times was the candidates phil crane (r) 58.0% edward a. warman (d) 42.0%? | SELECT COUNT(incumbent) FROM table_1341718_14 WHERE candidates = "Phil Crane (R) 58.0% Edward A. Warman (D) 42.0%" | sql_create_context |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE chartevents (
ro... | when did patient 65759 first get prescribed a drug since 01/2103? | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 65759) AND STRFTIME('%y-%m', prescriptions.startdate) >= '2103-01' ORDER BY prescriptions.startdate LIMIT 1 | mimic_iii |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | 患者吕博涉的胸腹水白蛋白(白蛋白)什么情况在14年9月30日到20年8月11日期间 | SELECT * FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy... | css |
CREATE TABLE courses (
course_id number,
author_id number,
subject_id number,
course_name text,
course_description text
)
CREATE TABLE subjects (
subject_id number,
subject_name text
)
CREATE TABLE student_course_enrolment (
registration_id number,
student_id number,
course_id ... | Find the number of distinct courses that have enrolled students. | SELECT COUNT(course_id) FROM student_course_enrolment | spider |
CREATE TABLE table_203_876 (
id number,
"name" text,
"birth" text,
"marriages" text,
"death" text
) | who came to power after the rule of james iii ? | SELECT "name" FROM table_203_876 WHERE id > (SELECT id FROM table_203_876 WHERE "name" = 'james iii') LIMIT 1 | squall |
CREATE TABLE table_28898974_3 (
reason VARCHAR,
incumbent VARCHAR
) | When james seaton is the incumbent what is the reason? | SELECT reason FROM table_28898974_3 WHERE incumbent = "James Seaton" | sql_create_context |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
... | when was the last time patient 031-4423 had had an intake on 07/07/last year? | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-4423')) AND intakeoutput.cellpath LIKE '%intake%'... | eicu |
CREATE TABLE table_name_61 (
points INTEGER,
year INTEGER
) | What were the highest points before the year 1974? | SELECT MAX(points) FROM table_name_61 WHERE year < 1974 | sql_create_context |
CREATE TABLE table_61843 (
"Tournament" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
) | What is the 2010 with a qf in 2011? | SELECT "2010" FROM table_61843 WHERE "2011" = 'qf' | wikisql |
CREATE TABLE table_3676 (
"Round" real,
"Circuit" text,
"Series" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Driver" text,
"Winning Team" text
) | How many times is the series italian and the circuit is valencia? | SELECT COUNT("Round") FROM table_3676 WHERE "Series" = 'Italian' AND "Circuit" = 'Valencia' | wikisql |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostHistoryTypes (
Id number,
Name te... | How many posts did users with <50 rep post per day. Returns the number of posts per day for the last ##NumberOfDays## | SELECT DAY(Posts.CreationDate), COUNT(Posts.Id) FROM Posts INNER JOIN Users AS u ON u.Id = Posts.OwnerUserId WHERE Posts.PostTypeId = 2 AND u.Reputation < 50 AND DATEDIFF(day, Posts.CreationDate, CURRENT_TIMESTAMP()) <= '##NumberOfDays##' GROUP BY DAY(Posts.CreationDate) | sede |
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... | 病号56549574药品金额不低于6975.76元的在哪几次医疗记录中被开出过?医疗就诊编号是多少呢? | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '56549574' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT >= 6975.76) | css |
CREATE TABLE table_55083 (
"Season" text,
"Club" text,
"National League" text,
"National Cup" text,
"European Cup" text
) | What national cup has fc barcelona? | SELECT "National Cup" FROM table_55083 WHERE "Club" = 'fc barcelona' | wikisql |
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... | Draw a scatterplot of school id vs all_games_percent where school id is on the x-axis and points are colored by All_Home | SELECT School_ID, All_Games_Percent FROM basketball_match GROUP BY All_Home | nvbench |
CREATE TABLE table_name_11 (
viewers__millions_ INTEGER,
rating VARCHAR,
weekly_rank VARCHAR,
share VARCHAR
) | Which rating larger than 5 have the lowest amount of views in #3 rank with a share of 9? | SELECT MIN(viewers__millions_) FROM table_name_11 WHERE weekly_rank = "#3" AND share = 9 AND rating > 5 | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.