context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | Most viewed duplicates missing the 'Possible Duplicate' bit. | SELECT p.Score, p.Id AS "post_link", p.ViewCount, p.OwnerUserId AS "user_link", p.CreationDate FROM Posts AS p INNER JOIN PostHistory AS h ON h.PostId = p.Id WHERE NOT p.ClosedDate IS NULL AND p.ClosedDate = h.CreationDate AND h.PostHistoryTypeId = 10 AND h.Comment = '1' AND NOT p.Body LIKE '%<strong>Possible Duplicate... | sede |
CREATE TABLE table_1462 (
"Season" text,
"Winner" text,
"Winning Song" text,
"Winning Song (English Title)" text,
"Debut Album" text
) | How many winning songs were there with an english title of all for love? | SELECT COUNT("Winning Song") FROM table_1462 WHERE "Winning Song (English Title)" = 'All For Love' | wikisql |
CREATE TABLE table_38436 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"College" text
) | What is the name of the college that is from a round greater than 3 with Gillis Wilson playing? | SELECT "College" FROM table_38436 WHERE "Round" > '3' AND "Player" = 'gillis wilson' | 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... | 药品8154在医疗就诊44686986208中开出的医疗发票项目类别是那种类型? | SELECT MED_INV_ITEM_TYPE FROM t_kc22 WHERE MED_CLINIC_ID = '44686986208' AND SOC_SRT_DIRE_CD = '8154' | css |
CREATE TABLE table_52341 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | Which lap number had Olivier Panis as a driver? | SELECT "Laps" FROM table_52341 WHERE "Driver" = 'olivier panis' | wikisql |
CREATE TABLE table_204_298 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" number
) | before the 2000 olympic games what was johanna 's fastest 200m time ? | SELECT "notes" FROM table_204_298 WHERE "year" < 2000 AND "event" = '200 m' ORDER BY "notes" LIMIT 1 | squall |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | count the number of patients whose admission type is urgent and days of hospital stay is greater than 1? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.days_stay > "1" | mimicsql_data |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
... | what was the name of the drug that was prescribed to patient 25696 within 2 days after having had a sympath nerve inject nec procedure in 03/last year? | SELECT t2.drug FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 25696 AND procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = ... | mimic_iii |
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... | 编号为28349097的病患的检验报告单的报告日期在15年4月17日之后的是哪些住院就诊的?列出流水号 | 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_59046 (
"Name" text,
"Location" text,
"Years as tallest" text,
"Height metres / ft" text,
"Floors" text
) | Name the Height metres / ft of Floors of 05.0 n/a? | SELECT "Height metres / ft" FROM table_59046 WHERE "Floors" = '05.0 n/a' | wikisql |
CREATE TABLE mzb (
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... | 医院3046592全部就诊记录里按照科室编码的区别列一下统筹基金花销和总的医疗费用的平均比值 | SELECT qtb.MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '3046592' GROUP BY qtb.MED_ORG_DEPT_CD UNION SELECT gyb.MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY) FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gyb.MED_SER_ORG_... | css |
CREATE TABLE Detention (
detention_id INTEGER,
detention_type_code VARCHAR(10),
teacher_id INTEGER,
datetime_detention_start DATETIME,
datetime_detention_end DATETIME,
detention_summary VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Ref_Incident_Type (
incident_type_code VARCHA... | Show me the trend about the sum of monthly_rental over date_address_to , and group by attribute date_address_to with a line chart. | SELECT date_address_to, SUM(monthly_rental) FROM Student_Addresses GROUP BY date_address_to ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE table_63817 (
"Position" real,
"Team" text,
"Played" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Scored" real,
"Conceded" real,
"Points" real
) | What is the number of wins when scored was less than 26, and conceded was larger than 23? | SELECT SUM("Wins") FROM table_63817 WHERE "Scored" < '26' AND "Conceded" > '23' | wikisql |
CREATE TABLE table_name_19 (
rank VARCHAR,
country VARCHAR
) | What is the total number of rank for the country of greece? | SELECT COUNT(rank) FROM table_name_19 WHERE country = "greece" | sql_create_context |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime t... | how many hours have passed since patient 016-18575 received a antiarrhythmics - class iv antiarrhythmic procedure for the last time during their current hospital visit? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-18575... | eicu |
CREATE TABLE fgwyjzb (
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,
... | 有多些盐酸倍他司汀片(糖衣)的检查记录在医疗机构5715997? | SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '5715997' AND t_kc22.SOC_SRT_DIRE_NM = '盐酸倍他司汀片(糖衣)' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwyjzb.MED_SER_ORG_NO = '5715997' AND t_kc22.SOC... | css |
CREATE TABLE table_15136 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | What is Diego Junqueira Gabriel Trujillo-Soler's opponent's score? | SELECT "Score" FROM table_15136 WHERE "Opponents" = 'diego junqueira gabriel trujillo-soler' | wikisql |
CREATE TABLE table_40818 (
"1935" text,
"1936" text,
"1937" text,
"1938" text,
"1939" text,
"1940" text,
"1941" text,
"1943" text,
"1945" text,
"1946" text,
"1947" text,
"1948" text,
"1949" text,
"1950" text,
"1951" text,
"1952" text,
"1953" text
) | What 1953 has 2 as a 1949, and 3 as 1952? | SELECT "1953" FROM table_40818 WHERE "1949" = '2' AND "1952" = '3' | wikisql |
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases INTEGER,
Drink TEXT
)
CREATE TABLE appellations (
No... | A bar chart that computes the total number of wines with a price is bigger than 100 Next, Bin the year into the weekday interval, rank y-axis from low to high order. | SELECT Year, COUNT(Year) FROM wine WHERE Price > 100 ORDER BY COUNT(Year) | nvbench |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
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,
... | 名叫马彭魄的病患有多少医疗费的总数大于9768.75元的医疗记录,在其入院诊断中都有什么疾病?序号和名称是那种? | SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_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 > 9768.75) | css |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as ... | Is 413 required in all upper level classes ? | SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%topic0%' OR name LIKE '%topic0%') AND department = 'EECS' | advising |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | 在11年7月15日到2014年12月18日之间病患17045983经过了哪些仪器的检查,在检验结果指标记录中仪器的编号是什么? | (SELECT jyjgzbb.YQBH, jyjgzbb.YQMC 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.B... | css |
CREATE TABLE Order_Items (
Order_Item_ID INTEGER,
Order_ID INTEGER,
Product_ID INTEGER,
Order_Quantity VARCHAR(288),
Other_Item_Details VARCHAR(255)
)
CREATE TABLE Invoice_Items (
Invoice_Item_ID INTEGER,
Invoice_ID INTEGER,
Order_ID INTEGER,
Order_Item_ID INTEGER,
Product_ID IN... | Give me a pie to show the total number from different payment method code. | SELECT payment_method_code, COUNT(*) FROM Invoices GROUP BY payment_method_code | nvbench |
CREATE TABLE table_27816698_2 (
institution VARCHAR,
founded VARCHAR
) | Which institution was founded in 1932? | SELECT institution FROM table_27816698_2 WHERE founded = 1932 | sql_create_context |
CREATE TABLE table_name_58 (
total INTEGER,
year_s__won VARCHAR
) | What is the lowest Total, when Year(s) Won is '1948 , 1950 , 1951 , 1953'? | SELECT MIN(total) FROM table_name_58 WHERE year_s__won = "1948 , 1950 , 1951 , 1953" | sql_create_context |
CREATE TABLE table_40791 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) | On what date was the tournament played that eneded with a winning score of +6 (74-71-70-71=286) and margin of victory of 2 strokes, and with Arnold palmer as the runner-up? | SELECT "Date" FROM table_40791 WHERE "Runner(s)-up" = 'arnold palmer' AND "Margin of victory" = '2 strokes' AND "Winning score" = '+6 (74-71-70-71=286)' | wikisql |
CREATE TABLE store_product (
Store_ID int,
Product_ID int
)
CREATE TABLE product (
product_id int,
product text,
dimensions text,
dpi real,
pages_per_minute_color real,
max_page_size text,
interface text
)
CREATE TABLE store_district (
Store_ID int,
District_ID int
)
CREAT... | For each type of store, how many of them are there. Plot them as bar chart. | SELECT Type, COUNT(*) FROM store GROUP BY Type | nvbench |
CREATE TABLE table_38869 (
"Model" text,
"Years" text,
"Engine" text,
"Displ." text,
"Power" text,
"Torque" text
) | What is the torque for Model of 2.0 bitdi (cr) dpf, in 2010 ? | SELECT "Torque" FROM table_38869 WHERE "Model" = '2.0 bitdi (cr) dpf' AND "Years" = '2010–' | wikisql |
CREATE TABLE table_name_80 (
player VARCHAR,
college VARCHAR
) | What player went to DePaul University? | SELECT player FROM table_name_80 WHERE college = "depaul" | sql_create_context |
CREATE TABLE table_25273 (
"Year" real,
"Class" text,
"Team name" text,
"Bike" text,
"Riders" text,
"Races" text,
"Wins" real,
"Podiums" real,
"Poles" real,
"F.laps" real,
"Points" real,
"Pos." text
) | When 19th is the position what is the highest amount of poles? | SELECT MAX("Poles") FROM table_25273 WHERE "Pos." = '19th' | wikisql |
CREATE TABLE table_name_82 (
city_of_license VARCHAR,
call_sign VARCHAR
) | What city of license has a value of k293bg for its call sign? | SELECT city_of_license FROM table_name_82 WHERE call_sign = "k293bg" | sql_create_context |
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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE... | For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about the distribution of hire_date and the average of salary bin hire_date by time, and order mean salary in descending order please. | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(SALARY) DESC | nvbench |
CREATE TABLE Ref_Calendar (
Calendar_Date DATETIME,
Day_Number INTEGER
)
CREATE TABLE Employees (
Employee_ID INTEGER,
Role_Code CHAR(15),
Employee_Name VARCHAR(255),
Gender_MFU CHAR(1),
Date_of_Birth DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document... | Bar chart x axis location code y axis how many location code, and list x-axis in asc order please. | SELECT Location_Code, COUNT(Location_Code) FROM Document_Locations GROUP BY Location_Code ORDER BY Location_Code | nvbench |
CREATE TABLE table_203_296 (
id number,
"country" text,
"total gdp (nominal)\n(billion us$)" text,
"gdp per capita\n(us$, ppp)" text,
"gdp growth,\n2007-2011\n(in %)" number,
"hdi" text
) | what is the only country to have a gdp per capita of 6,324 ? | SELECT "country" FROM table_203_296 WHERE "gdp per capita\n(us$, ppp)" = 6324 | squall |
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 last value of a ph lab test of patient 006-77873 in 11/last year? | SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-77873')) AND lab.labname = 'ph' AND DATETIME(lab.labresulttime, 'start of year') = ... | eicu |
CREATE TABLE table_name_61 (
pick__number VARCHAR,
team_from VARCHAR,
league_from VARCHAR,
nationality VARCHAR
) | Which Pick # has a League from of ontario hockey league, a Nationality of united states, and a Team from of brampton battalion? | SELECT COUNT(pick__number) FROM table_name_61 WHERE league_from = "ontario hockey league" AND nationality = "united states" AND team_from = "brampton battalion" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | what is maximum days of hospital stay of patients whose primary disease is stemi? | SELECT MAX(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "STEMI" | mimicsql_data |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABL... | Who is the usual teacher for ARTDES 301 ? | SELECT COUNT(instructor.name), instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'ARTDES' AND course.number = 301 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = ... | advising |
CREATE TABLE table_31803 (
"Year" real,
"Date" text,
"Event" text,
"Days" text,
"Stages" text,
"Acts" text
) | When is the Monsters of Rock show with 12 bands? | SELECT "Date" FROM table_31803 WHERE "Event" = 'monsters of rock' AND "Acts" = '12 bands' | wikisql |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE area (
course_id int,
area varchar... | Of all the upper-level classes , which ones have 1 credits ? | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 1 AND program_course.category LIKE 'ULCS' | advising |
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,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | Is there a project for 489 ? | SELECT DISTINCT has_projects FROM course WHERE department = 'EECS' AND number = 489 | advising |
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... | 在2002年4月17日直到19年6月12日内医疗机构3252548里面险种类型为儿童的医疗就诊记录数量一共是多少? | SELECT COUNT(*) FROM qtb WHERE qtb.MED_SER_ORG_NO = '3252548' AND qtb.IN_HOSP_DATE BETWEEN '2002-04-17' AND '2019-06-12' AND qtb.INSU_TYPE = '儿童' UNION SELECT COUNT(*) FROM gyb WHERE gyb.MED_SER_ORG_NO = '3252548' AND gyb.IN_HOSP_DATE BETWEEN '2002-04-17' AND '2019-06-12' AND gyb.INSU_TYPE = '儿童' UNION SELECT COUNT(*) ... | css |
CREATE TABLE company (
id int,
name text,
country_code varchar
)
CREATE TABLE copyright (
id int,
msid int,
cid int
)
CREATE TABLE producer (
pid int,
gender text,
name text,
nationality text,
birth_city text,
birth_year int
)
CREATE TABLE cast (
id int,
msid i... | Find all comedies produced in year 2015 | SELECT movie.title FROM classification, genre, movie WHERE genre.genre = 'comedies' AND genre.gid = classification.gid AND movie.mid = classification.msid AND movie.release_year = 2015 | imdb |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREAT... | what patient 011-31229's age is in their first hospital visit? | SELECT patient.age FROM patient WHERE patient.uniquepid = '011-31229' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1 | eicu |
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... | 患者43770039被开出的药品在哪几次医疗记录中均不超过9882.0元?分别列出医疗就诊编号为? | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '43770039' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 9882.0) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '43770039' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLIN... | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TAB... | did patient 010-9756 go in for a t3 lab test during this year? | SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-9756')) AND lab.labname = 't3' AND DATETIME(lab.labresulttime, 'start of year') = DA... | eicu |
CREATE TABLE tourist_attraction_features (
tourist_attraction_id number,
feature_id number
)
CREATE TABLE shops (
shop_id number,
shop_details text
)
CREATE TABLE street_markets (
market_id number,
market_details text
)
CREATE TABLE visits (
visit_id number,
tourist_attraction_id numb... | What are the names and opening hours of the tourist attractions that can be accessed by bus or walk? | SELECT name, opening_hours FROM tourist_attractions WHERE how_to_get_there = "bus" OR how_to_get_there = "walk" | spider |
CREATE TABLE table_48690 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What is the country that the player with a score of 70-69=139 from? | SELECT "Country" FROM table_48690 WHERE "Score" = '70-69=139' | wikisql |
CREATE TABLE table_name_23 (
ifop_5_11_09 VARCHAR,
opinionway_5_11_09 VARCHAR,
ipsos_3_14_09 VARCHAR
) | Name the lfop 5/11/09 with opinion way of 5/11/09 of 2% and lpsos 3/14/09 of 2% | SELECT ifop_5_11_09 FROM table_name_23 WHERE opinionway_5_11_09 = "2%" AND ipsos_3_14_09 = "2%" | sql_create_context |
CREATE TABLE table_name_93 (
entrant VARCHAR,
engine VARCHAR,
year VARCHAR
) | Who used Gordini Straight-6 in 1956? | SELECT entrant FROM table_name_93 WHERE engine = "gordini straight-6" AND year = 1956 | sql_create_context |
CREATE TABLE table_train_51 (
"id" int,
"active_infection" bool,
"procalcitonin" int,
"oliguria" bool,
"receiving_vasopressor" bool,
"metabolic_acidosis" bool,
"colonized_with_a_multi_drug_resistant_organism" bool,
"hypoperfusion" bool,
"central_venous_oxygen_saturation_scvo2" int,
... | procalcitonin level >= 3 ng / ml | SELECT * FROM table_train_51 WHERE procalcitonin >= 3 | criteria2sql |
CREATE TABLE party (
Party_ID int,
Minister text,
Took_office text,
Left_office text,
Region_ID int,
Party_name text
)
CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int,
Member_in_charge_ID int
)
CREATE TABLE region (
Region_ID int,
Region_name tex... | Stacked bar of took office and how many took office colored by Minister, and sort Y from low to high order. | SELECT Took_office, COUNT(Took_office) FROM party GROUP BY Minister ORDER BY COUNT(Took_office) | nvbench |
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... | 住院中医诊断在住院就诊41737510564的编号和名称都为什么? | SELECT wdmzjzjlb.ZYZYZDZZBM, wdmzjzjlb.ZYZYZDZZMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '41737510564' UNION SELECT bdmzjzjlb.ZYZYZDZZBM, bdmzjzjlb.ZYZYZDZZMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '41737510564' | css |
CREATE TABLE table_27714 (
"User" text,
"Unit (kWh)/Time range" text,
"Tariff ( Rs. /kWh)" text,
"Fixed Charge ( Rs. /kWh)" text,
"Fuel Adjustment Charge (% of Total Energy Charge)" text,
"Max. Demand Charge ( Rs. /kVA)" text
) | What is the fixed charge for the user with a unit/time range of i-2: peak (18:30-22:30)? | SELECT "Fixed Charge ( Rs. /kWh)" FROM table_27714 WHERE "Unit (kWh)/Time range" = 'I-2: Peak (18:30-22:30)' | wikisql |
CREATE TABLE table_11608735_3 (
state_ VARCHAR,
_federal VARCHAR,
property_taxes VARCHAR
) | Name the state and federal when property taxes is 17,199,210 | SELECT state_ & _federal FROM table_11608735_3 WHERE property_taxes = "17,199,210" | sql_create_context |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
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 te... | 在2006年5月28日到2010年11月23日之间患者柏蕴秀所有检验结果指标记录的检测人为花嘉淑的检验指标流水号分别是多少? | SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_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 = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_... | css |
CREATE TABLE manager (
Manager_ID int,
Name text,
Country text,
Working_year_starts text,
Age int,
Level int
)
CREATE TABLE train (
Train_ID int,
Train_Num text,
Name text,
From text,
Arrival text,
Railway_ID int
)
CREATE TABLE railway (
Railway_ID int,
Railway ... | How many trains in each name category, give me the result with a bar chart, and could you show from low to high by the the number of name? | SELECT Name, COUNT(Name) FROM train GROUP BY Name ORDER BY COUNT(Name) | nvbench |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(2... | For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of first_name and commission_pct , I want to show by the Y-axis from high to low. | SELECT FIRST_NAME, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT DESC | nvbench |
CREATE TABLE table_1579922_1 (
episode VARCHAR,
run_time VARCHAR
) | What episode had a run time of 24:25? | SELECT episode FROM table_1579922_1 WHERE run_time = "24:25" | sql_create_context |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId ... | unaccepted id questions by creationdate, score. | SELECT p.Id, Score, Title, 'http://travel.stackexchange.com/questions/' + CAST(p.Id AS VARCHAR(10)) AS link FROM Posts AS p WHERE DeletionDate IS NULL AND ClosedDate IS NULL AND Tags LIKE '%identify%' AND AcceptedAnswerId IS NULL AND Score <= 2 AND CreationDate <= DATEADD(mm, -2, GETDATE()) ORDER BY CreationDate, Score | sede |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
... | For a particular tag get the Avg and StDev of score - suspicious scores are likely to have * BOTH HIGH AVERAGE AND LOW STD DEV * of score (e.g. they routinely upvote each of their own posts x times). To filter out noise look for > 10 posts and high average as persistent cheaters are likely to be... persistent!. Helps f... | SELECT OwnerUserId, COUNT(Posts.Id) AS NumPosts, SUM(Posts.Score) AS SumScore, AVG(CAST(Posts.Score AS FLOAT)) AS AvgScore, STDEV(Posts.Score) AS StdDevScore, AVG(CAST(Posts.Score AS FLOAT)) - STDEV(Posts.Score) AS "avg-stdev" FROM Posts WHERE Posts.OwnerUserId IN (3123370, 3605516, 3915549, 4831567) AND PostTypeId = 2... | sede |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeou... | how many hours it has been since the last time patient 012-31752 was diagnosed with nutritional deficiency during this hospital visit? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnosis.diagnosistime)) FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-31752... | eicu |
CREATE TABLE table_29728596_1 (
location VARCHAR,
away_team VARCHAR
) | Where was the home match against FK Rudar Ugljevik played? | SELECT location FROM table_29728596_1 WHERE away_team = "FK Rudar Ugljevik" | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | what is admission type and procedure icd9 code of subject id 2560? | SELECT demographic.admission_type, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560" | mimicsql_data |
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 ... | provide the number of patients whose admission type is elective and procedure icd9 code is 4611? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.icd9_code = "4611" | mimicsql_data |
CREATE TABLE table_name_90 (
year VARCHAR,
position VARCHAR,
name VARCHAR
) | In what year of school is the forward Iman McFarland? | SELECT year FROM table_name_90 WHERE position = "forward" AND name = "iman mcfarland" | sql_create_context |
CREATE TABLE table_79055 (
"Name or route" text,
"type" text,
"elevation groundstation" real,
"elevation mountainstation" real,
"slope length" real,
"capacity in persons/hour" real,
"construction year(s)" text
) | Which elevation groundstation has a capacity in persons/hour larger than 820, and a Name or route of lager 1, and a slope length smaller than 336? | SELECT AVG("elevation groundstation") FROM table_79055 WHERE "capacity in persons/hour" > '820' AND "Name or route" = 'lager 1' AND "slope length" < '336' | wikisql |
CREATE TABLE table_name_63 (
feb VARCHAR,
city VARCHAR
) | What were the Feb temperatures in East Stroudsburg? | SELECT feb FROM table_name_63 WHERE city = "east stroudsburg" | sql_create_context |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_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,
H... | 计算下63314892456中药物总共多少钱 | SELECT t_kc22.QTY * t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc22.MED_EXP_DET_ID = '63314892456' | css |
CREATE TABLE table_2691 (
"Rnd" real,
"Date" text,
"Race Name" text,
"Length" text,
"Track" text,
"Location" text,
"Pole Position" text,
"Winning Driver" text
) | If the track is the Wisconsin State Fair Park Speedway and the winning driver is Wally Dallenbach, what was the location? | SELECT "Location" FROM table_2691 WHERE "Winning Driver" = 'Wally Dallenbach' AND "Track" = 'Wisconsin State Fair Park Speedway' | wikisql |
CREATE TABLE table_204_707 (
id number,
"year" number,
"english title" text,
"chinese title" text,
"director" text,
"role" text
) | what film did the actor star in after street angel ? | SELECT "english title" FROM table_204_707 WHERE id = (SELECT id FROM table_204_707 WHERE "english title" = 'street angel') + 1 | squall |
CREATE TABLE aircraft (
Aircraft_ID int(11),
Aircraft varchar(50),
Description varchar(50),
Max_Gross_Weight varchar(50),
Total_disk_area varchar(50),
Max_disk_Loading varchar(50)
)
CREATE TABLE match (
Round real,
Location text,
Country text,
Date text,
Fastest_Qualifying t... | List the names of aircrafts and the number of times it won matches by a bar chart, could you list in asc by the Aircraft? | SELECT Aircraft, COUNT(*) FROM aircraft AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY Aircraft | nvbench |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | when was the last time until 4 years ago that patient 021-240586 received the procedure of external pacemaker? | SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-240586')) AND treatment.treatmentname = 'external pacemaker' ... | eicu |
CREATE TABLE table_63015 (
"Title" text,
"Series" text,
"Director" text,
"Release date" text,
"reissue?" text
) | When was Tree Cornered Tweety, directed by Friz Freleng, released? | SELECT "Release date" FROM table_63015 WHERE "Director" = 'friz freleng' AND "Title" = 'tree cornered tweety' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsysto... | when was patient 010-16572's systemicdiastolic measured for the first time until 1 day ago? | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-16572')) AND NOT vitalperiodic.systemicdiastoli... | eicu |
CREATE TABLE table_35568 (
"Version" text,
"Length" text,
"Album" text,
"Remixed by" text,
"Year" real
) | What the highest Year with a Remixed by Laurent Boutonnat? | SELECT MAX("Year") FROM table_35568 WHERE "Remixed by" = 'laurent boutonnat' | wikisql |
CREATE TABLE table_13821 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
) | What rank was the swimmer in lane 4? | SELECT "Rank" FROM table_13821 WHERE "Lane" = '4' | wikisql |
CREATE TABLE table_78427 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | How many grids does dave walker have? | SELECT COUNT("Grid") FROM table_78427 WHERE "Driver" = 'dave walker' | wikisql |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerU... | Respostas de um usu rio deletado. Para ver as pergunta, troque o PostTypeId para 1. Para ver tudo, remova-o. | SELECT CreationDate, Id AS "post_link" FROM Posts AS p WHERE OwnerDisplayName = '##NomeDoUsuario:string##' AND PostTypeId = 2 ORDER BY CreationDate | sede |
CREATE TABLE table_2156758_4 (
title VARCHAR,
written_by VARCHAR
) | How many titles were written by Don Shank and Genndy Tartakovsky? | SELECT COUNT(title) FROM table_2156758_4 WHERE written_by = "Don Shank and Genndy Tartakovsky" | sql_create_context |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReas... | What are the most popular first words in question titles?. | SELECT SUBSTRING(p.Title, 1, STR_POSITION(p.Title, ' ')) AS FirstWord, COUNT(DISTINCT p.Id) AS Questions, CAST(AVG(p.Score * 1.0) AS FLOAT(10, 1)) AS AvgScore, CAST(AVG(p.AnswerCount * 1.0) AS FLOAT(10, 1)) AS AvgAnswerCount, CAST(AVG(p.CommentCount * 1.0) AS FLOAT(10, 1)) AS AvgCommentCount, CAST(AVG(p.ViewCount * 1.0... | sede |
CREATE TABLE table_66517 (
"Name" text,
"GP-GS" text,
"Receptions" real,
"Long" real,
"Avg/G" real
) | How many times is avg/g 2? | SELECT COUNT("Receptions") FROM table_66517 WHERE "Avg/G" = '2' | wikisql |
CREATE TABLE table_204_409 (
id number,
"date" text,
"race name" text,
"location" text,
"uci rating" number,
"winner" text,
"team" text
) | which was the only race held in cameroon ? | SELECT "race name" FROM table_204_409 WHERE "location" = 'cameroon' | squall |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE labevents (
row_id number,
subject_id numb... | what are the three most commonly given lab tests for patients who have previously received pancreat sphincteroplas during the same month during this year? | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_i... | mimic_iii |
CREATE TABLE table_2562572_39 (
largest_ethnic_group__2002_ VARCHAR,
cyrillic_name_other_names VARCHAR
) | What is the ethnic group is ? | SELECT largest_ethnic_group__2002_ FROM table_2562572_39 WHERE cyrillic_name_other_names = "Конак" | sql_create_context |
CREATE TABLE table_name_6 (
year VARCHAR,
runner_up VARCHAR
) | What year shows as Runner-up of england (24 pts)? | SELECT year FROM table_name_6 WHERE runner_up = "england (24 pts)" | sql_create_context |
CREATE TABLE table_68107 (
"Year" text,
"Team" text,
"TTkl" real,
"Solo" real,
"Sacks" real,
"Pass Def" real
) | How many sacks have 2006 as the year, and a solo less than 62? | SELECT SUM("Sacks") FROM table_68107 WHERE "Year" = '2006' AND "Solo" < '62' | wikisql |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | 列出患者52604335就诊结算日期在10年1月31日到15年12月4日内的所有医疗就诊记录编号都分别是有哪些? | SELECT MED_CLINIC_ID FROM t_kc24 WHERE PERSON_ID = '52604335' AND CLINIC_SLT_DATE BETWEEN '2010-01-31' AND '2015-12-04' | css |
CREATE TABLE table_name_76 (
wins INTEGER,
top_25 VARCHAR,
events VARCHAR
) | What is the highest number of wins that has a top-25 of 13 and events less than 32? | SELECT MAX(wins) FROM table_name_76 WHERE top_25 = 13 AND events < 32 | sql_create_context |
CREATE TABLE table_50256 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
) | Which Money has a Score of 70-68-73-68=279? | SELECT MIN("Money ( $ )") FROM table_50256 WHERE "Score" = '70-68-73-68=279' | wikisql |
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,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... | what is lab test abnormal status of subject name paul edwards? | SELECT lab.flag FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.name = "Paul Edwards" | 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,
... | 病患36963389检测丙戊酸在2012年2月7日起到2019年5月3日结束的医务人员工号及姓名分别是什么? | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.... | css |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | To fulfill the MDE requirement , what 's the easiest class I can take ? | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou... | advising |
CREATE TABLE table_58109 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Where did South Melbourne play as the home team? | SELECT "Venue" FROM table_58109 WHERE "Home team" = 'south melbourne' | wikisql |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID... | For those employees who did not have any job in the past, for manager_id, hire_date, visualize the trend, and sort by the X in ascending. | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE | nvbench |
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... | Bottom 20 askers on the site. A list of the top 500 users with the highest average answer score excluding
community wiki / closed posts or users with less than 10 answers | SELECT Users.Id AS "user_link", COUNT(Posts.Id) AS Questions, CAST(AVG(CAST(Score AS FLOAT)) AS FLOAT(6, 2)) AS "average_question_score" FROM Posts INNER JOIN Users ON Users.Id = OwnerUserId WHERE PostTypeId = 1 AND CommunityOwnedDate IS NULL AND ClosedDate IS NULL GROUP BY Users.Id, DisplayName HAVING COUNT(Posts.Id) ... | sede |
CREATE TABLE table_name_5 (
wins INTEGER,
top_10 INTEGER
) | Name the average Wins which has a Top 10 smaller than 0? | SELECT AVG(wins) FROM table_name_5 WHERE top_10 < 0 | sql_create_context |
CREATE TABLE table_39117 (
"Games" real,
"Drawn" real,
"Lost" real,
"Points difference" text,
"Points" real
) | What is the sum of the points when there are fewer than 4 games? | SELECT SUM("Points") FROM table_39117 WHERE "Games" < '4' | wikisql |
CREATE TABLE table_204_615 (
id number,
"date" text,
"opponent" text,
"result" text,
"goal scorers (season goals)" text,
"goalie saves" text,
"attendance" text
) | who was the first team that the badgers faced this season ? | SELECT "opponent" FROM table_204_615 ORDER BY id LIMIT 1 | squall |
CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Date_of_Birth text
)
CREATE TABLE entrepreneur (
Entrepreneur_ID int,
People_ID int,
Company text,
Money_Requested real,
Investor text
) | Return a histogram on how many entrepreneurs correspond to each investor?, and could you list bars from high to low order? | SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor ORDER BY Investor DESC | nvbench |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.