context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_62183 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | What visiting team played at the home of the Chicago Black Hawks with a record of 1-1? | SELECT "Visitor" FROM table_62183 WHERE "Home" = 'chicago black hawks' AND "Record" = '1-1' | wikisql |
CREATE TABLE management (
department_ID int,
head_ID int,
temporary_acting text
)
CREATE TABLE head (
head_ID int,
name text,
born_state text,
age real
)
CREATE TABLE department (
Department_ID int,
Name text,
Creation text,
Ranking int,
Budget_in_Billions real,
Num... | Show me a line chart of how the number of creation change over the creation | SELECT Creation, COUNT(Creation) FROM department | nvbench |
CREATE TABLE table_51695 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) | What was the score from the game where Dallas played Home and Edmonton was visiting? | SELECT "Score" FROM table_51695 WHERE "Home" = 'dallas' AND "Visitor" = 'edmonton' | wikisql |
CREATE TABLE table_203_780 (
id number,
"rank" number,
"diver" text,
"preliminary\npoints" number,
"preliminary\nrank" number,
"final\npoints" number,
"final\nrank" number,
"final\ntotal" number
) | how many drivers raced in the preliminary round ? | SELECT COUNT("diver") FROM table_203_780 WHERE NOT "preliminary\npoints" IS NULL | squall |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE requirement (... | During next semester , what classes will Dr. Jonathan Bulkley be teaching ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Jonathan Bulkley%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.... | advising |
CREATE TABLE table_name_56 (
name VARCHAR,
talent VARCHAR
) | Whose talent was ballet en pointe? | SELECT name FROM table_name_56 WHERE talent = "ballet en pointe" | sql_create_context |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | 请查出医疗就诊42183982937中检测人姓尤的负责的所有检测指标名称,还有检测指标的结果定量与结果定量单位的详细信息 | SELECT jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JYZBLSH AND jybgb_jyjgzbb.jyjgzbb_id = jyjgzbb.jyjgzbb_id WHERE jybgb.JZLSH = '42183982937' AND jyjgzbb.JCRXM LIKE... | css |
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adul... | What is the proportion of the minimum price of the rooms for each different decor? Show me a pie chart! | SELECT decor, MIN(basePrice) FROM Rooms GROUP BY decor | nvbench |
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... | how many patients have a married marital status and were diagnosed with surgical operation with implant of artificial internal device causing abnormal patient reaction, or later complication,without mention of misadventure at time of operation? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "MARRIED" AND diagnoses.long_title = "Surgical operation with implant of artificial internal device causing abnormal patient reaction, or later complication,w... | mimicsql_data |
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_fl... | i would like to fly from PITTSBURGH to SAN FRANCISCO | 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 = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN... | atis |
CREATE TABLE table_name_69 (
Id VARCHAR
) | What is the 1991 when 1992 and 1990 are 1R? | SELECT 1991 FROM table_name_69 WHERE 1992 = "1r" AND 1990 = "1r" | sql_create_context |
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 ... | what is maximum age of patients whose insurance is government and admission year is greater than or equal to 2177? | SELECT MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Government" AND demographic.admityear >= "2177" | mimicsql_data |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | How many american indian and alaska natives were diagnosed with other pulmonary insufficiency and were not elsewhere classified? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND diagnoses.long_title = "Other pulmonary insufficiency, not elsewhere classified" | mimicsql_data |
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... | 列出在医院6343102中就诊科室名称包含产前诊断的所有医疗就诊记录有哪些属于患者沈清妍? | SELECT * FROM qtb WHERE qtb.PERSON_NM = '沈清妍' AND qtb.MED_SER_ORG_NO = '6343102' AND qtb.MED_ORG_DEPT_NM LIKE '%产前诊断%' UNION SELECT * FROM gyb WHERE gyb.PERSON_NM = '沈清妍' AND gyb.MED_SER_ORG_NO = '6343102' AND gyb.MED_ORG_DEPT_NM LIKE '%产前诊断%' UNION SELECT * FROM zyb WHERE zyb.PERSON_NM = '沈清妍' AND zyb.MED_SER_ORG_NO =... | css |
CREATE TABLE table_15055594_6 (
states VARCHAR,
fall_06 VARCHAR
) | Which state had 3821 students in the fall of 06? | SELECT states FROM table_15055594_6 WHERE fall_06 = 3821 | sql_create_context |
CREATE TABLE table_20884163_2 (
date VARCHAR,
team VARCHAR,
race_title VARCHAR
) | What dates was the falken tasmania challenge race that had triple eight race engineering as the team? | SELECT date FROM table_20884163_2 WHERE team = "Triple Eight Race Engineering" AND race_title = "Falken Tasmania Challenge" | sql_create_context |
CREATE TABLE table_name_35 (
gross_tonnage INTEGER,
delivery_date VARCHAR
) | with delivery date of 2001 2001 what is gross tonnage? | SELECT AVG(gross_tonnage) FROM table_name_35 WHERE delivery_date = "2001 2001" | sql_create_context |
CREATE TABLE table_name_57 (
score_in_the_final VARCHAR,
surface VARCHAR,
date VARCHAR
) | What score in the final has hard as the surface, and june 13, 2011 as the date? | SELECT score_in_the_final FROM table_name_57 WHERE surface = "hard" AND date = "june 13, 2011" | sql_create_context |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
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... | For those employees who did not have any job in the past, return a line chart about the change of manager_id over hire_date . | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | nvbench |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | what prescription drug was first prescribed to patient 013-11660 in 12/this year? | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-11660')) AND DATETIME(medication.drugstarttime, 'start of year'... | eicu |
CREATE TABLE culture_company (
company_name VARCHAR,
movie_id VARCHAR
)
CREATE TABLE movie (
movie_id VARCHAR,
year VARCHAR
) | Show all company names with a movie directed in year 1999. | SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999 | sql_create_context |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
... | For those employees who did not have any job in the past, a bar chart shows the distribution of job_id and the amount of job_id , and group by attribute job_id, and list how many job id from low to high order. | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY COUNT(JOB_ID) | nvbench |
CREATE TABLE table_38389 (
"Product" text,
"Extensions" text,
"Projects templates" text,
"MSDN integration" text,
"Debugging" text,
"Profiling" text,
"IntelliTrace" text,
"Unit test" text,
"Code coverage" text,
"Test impact analysis" text,
"Load testing" text,
"Lab manage... | Which Unit test has a MSDN integration of full, and a Projects templates of yes? | SELECT "Unit test" FROM table_38389 WHERE "MSDN integration" = 'full' AND "Projects templates" = 'yes' | wikisql |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
r... | please show me the PHILADELPHIA to DENVER SATURDAY flights again | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND days.day_name = 'SATURDAY' AND flight.flight_days = days.days_code AND ... | atis |
CREATE TABLE table_204_154 (
id number,
"player" text,
"matches" number,
"innings" number,
"runs" number,
"average" number,
"100s" number,
"50s" number
) | how many innings did bill and ted have in total ? | SELECT SUM("innings") FROM table_204_154 WHERE "player" IN ('bill roe', 'ted tyler') | squall |
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE... | Find meter_300 and meter_100 , and visualize them by a bar chart, and rank by the bars in descending please. | SELECT meter_300, meter_100 FROM swimmer ORDER BY meter_300 DESC | nvbench |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
c... | provide me with the top three diagnoses that had the highest three year mortality rate. | SELECT t4.diagnosisname FROM (SELECT t3.diagnosisname, DENSE_RANK() OVER (ORDER BY t3.c1 DESC) AS c2 FROM (SELECT t2.diagnosisname, 100 - SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 3 * 365 THEN 1 ELSE 0 END) * 10... | eicu |
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
... | Will 282 be offered next term ? | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 282 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | advising |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
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 nu... | 从00年8月24日开始03年10月27日结束47979696病患的全部检验结果指标记录的检测人是14267840的检验指标流水号是多少? | SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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 = jybgb_jyjgzbb.YLJGDM AND jybgb.BGD... | css |
CREATE TABLE table_22018 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | When 17 is the tries for what is the points against? | SELECT "Points against" FROM table_22018 WHERE "Tries for" = '17' | wikisql |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE bdmzjzjlb (
CYBQDM text,
CYBQ... | 从00年5月9日到10年3月17日这段时间,褚静婉患者在医院就诊的次数一共是多少次? | SELECT (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '褚静婉' AND mzjzjlb.JZKSRQ BETWEEN '2000-05-09' AND '2010-03-17') + (SELECT COUNT(*) FROM person_info J... | css |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname var... | Are there any courses I must have previously taken to enroll in PERIODON 796 ? | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... | advising |
CREATE TABLE table_name_96 (
country VARCHAR,
player VARCHAR
) | What is Country, when Player is 'Hale Irwin'? | SELECT country FROM table_name_96 WHERE player = "hale irwin" | sql_create_context |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE procedures_icd (
... | what were the three most commonly ordered specimen tests in 2100? | SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents WHERE STRFTIME('%y', microbiologyevents.charttime) = '2100' GROUP BY microbiologyevents.spec_type_desc) AS t1 WHERE t1.c1 <= 3 | mimic_iii |
CREATE TABLE table_49156 (
"Skip" text,
"Third/Vice skip" text,
"Second" text,
"Lead" text,
"City" text
) | Which Lead has a Skip of mike mcewen? | SELECT "Lead" FROM table_49156 WHERE "Skip" = 'mike mcewen' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text... | 审核超过7份检验报告单在医疗就诊58577341155中有哪些人?这些审核人工号和姓名分别列出来? | SELECT SHRGH, SHRXM FROM jybgb WHERE JZLSH = '58577341155' GROUP BY SHRGH HAVING COUNT(*) > 7 | css |
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,
... | provide the number of patients whose lab test chart time is 2120-04-16 13:27:00? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.charttime = "2120-04-16 13:27:00" | mimicsql_data |
CREATE TABLE qtb (
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... | 患者姜和畅自费金额高于7190.67元的药品量有多少,时间是在06年8月1日到16年1月3日内 | SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '姜和畅' AND t_kc22.STA_DATE BETWEEN '2006-08-01' AND '2016-01-03' AND t_kc22.SELF_PAY_AMO > 7190.67 UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_NM = '姜和畅' AND ... | css |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | tell me the first test that patient 010-9756 had received this month? | SELECT lab.labname 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 DATETIME(lab.labresulttime, 'start of month') = DATETIME(CURRENT_TIME(), ... | eicu |
CREATE TABLE table_72569 (
"Rank" real,
"Country" text,
"Overall" text,
"Justice" text,
"Health" text,
"Education" text,
"Economics" text,
"Politics" text
) | what's the country with health being 91.4 | SELECT "Country" FROM table_72569 WHERE "Health" = '91.4' | wikisql |
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,
... | 患者36091672号从02年2月9日到05年3月12日这段时间去过多少次医院就诊? | SELECT (SELECT COUNT(*) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '36091672' AND mzjzjlb.JZKSRQ BETWEEN '2002-02-09' AND '2005-03-12') + (SELECT COUNT(*) FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_... | css |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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 num... | 查一下患者53607326踝部检验的各项指标结果 | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_info.RYBH = '... | css |
CREATE TABLE table_42496 (
"Year" real,
"Winner" text,
"School" text,
"Position" text,
"Points" text,
"% of Points Possible" text
) | What is the total year of the winner who plays the halfback position with a % of points possible of 80.64%? | SELECT COUNT("Year") FROM table_42496 WHERE "Position" = 'halfback' AND "% of Points Possible" = '80.64%' | 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 asian patients had a base drug type? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "ASIAN" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
... | when patient 8773 arterial bp [diastolic] last measured on 12/19/2104? | SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8773)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ... | mimic_iii |
CREATE TABLE table_name_35 (
rank INTEGER,
time VARCHAR,
lane VARCHAR
) | What is the Rank of the Athlete with a Time of 1:47.65 and in Lane 3 or larger? | SELECT MAX(rank) FROM table_name_35 WHERE time = "1:47.65" AND lane > 3 | sql_create_context |
CREATE TABLE culture_company (
company_name text,
type text,
incorporated_in text,
group_equity_shareholding number,
book_club_id text,
movie_id text
)
CREATE TABLE movie (
movie_id number,
title text,
year number,
director text,
budget_million number,
gross_worldwide nu... | Show all director names who have a movie in both year 1999 and 2000. | SELECT director FROM movie WHERE year = 2000 INTERSECT SELECT director FROM movie WHERE year = 1999 | spider |
CREATE TABLE table_28898948_3 (
winner VARCHAR,
electorate VARCHAR
) | When rangitikei is the electorate who is the winner? | SELECT winner FROM table_28898948_3 WHERE electorate = "Rangitikei" | sql_create_context |
CREATE TABLE table_1341586_36 (
party VARCHAR,
incumbent VARCHAR
) | What party was Tony P. Hall affiliated with? | SELECT party FROM table_1341586_36 WHERE incumbent = "Tony P. Hall" | sql_create_context |
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... | 查询13423195病患的检验报告单中结果指标均正常的检验报告单号,需要检验报告的单号 | SELECT jybgb.BGDH 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 = '13423195' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM jyjgzbb WH... | css |
CREATE TABLE table_28198 (
"Name of Award" text,
"Name of Film" text,
"Language" text,
"Awardee(s)" text,
"Cash Prize" text
) | How many films were in assamese? | SELECT COUNT("Name of Film") FROM table_28198 WHERE "Language" = 'Assamese' | wikisql |
CREATE TABLE table_name_55 (
club_team VARCHAR,
pick INTEGER
) | Which Club team has a Pick larger than 139? | SELECT club_team FROM table_name_55 WHERE pick > 139 | sql_create_context |
CREATE TABLE table_23887174_1 (
area__km²_ INTEGER,
armenian_name VARCHAR
) | How big is the province with the Armenian name of ? | SELECT MIN(area__km²_) FROM table_23887174_1 WHERE armenian_name = "Փայտակարան" | sql_create_context |
CREATE TABLE table_15905399_1 (
length VARCHAR,
iin_ranges VARCHAR
) | What is the length for iin range 51-55? | SELECT length FROM table_15905399_1 WHERE iin_ranges = "51-55" | 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... | count the number of patients whose insurance is private and procedure long title is percutaneous [endoscopic] gastrostomy [peg]? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.long_title = "Percutaneous [endoscopic] gastrostomy [PEG]" | mimicsql_data |
CREATE TABLE table_31475 (
"Rank" real,
"Rider" text,
"Sat 20 Aug" text,
"Mon 22 Aug" text,
"Tues 23 Aug" text,
"Wed 24 Aug" text,
"Thurs 25 Aug" text,
"Fri 26 Aug" text,
"Sat 27 Aug" text,
"Mon 29 Aug" text,
"Wed 31 Aug" text
) | What is every entry for Friday August 26 when the entry for Wednesday August 24 is 23' 52.67 94.807mph? | SELECT "Fri 26 Aug" FROM table_31475 WHERE "Wed 24 Aug" = '23'' 52.67 94.807mph' | wikisql |
CREATE TABLE table_49342 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | Can you tell me the Attendance that has the Opponent of new york giants? | SELECT "Attendance" FROM table_49342 WHERE "Opponent" = 'new york giants' | wikisql |
CREATE TABLE table_11545282_6 (
position VARCHAR,
player VARCHAR
) | How many position does Jim Farmer play in? | SELECT COUNT(position) FROM table_11545282_6 WHERE player = "Jim Farmer" | sql_create_context |
CREATE TABLE table_name_53 (
points__pts_ INTEGER,
team__equipo_ VARCHAR,
lost__pp_ VARCHAR
) | What is the largest number of points for Orion with more than 4 losses? | SELECT MAX(points__pts_) FROM table_name_53 WHERE team__equipo_ = "orion" AND lost__pp_ > 4 | sql_create_context |
CREATE TABLE table_name_54 (
roger_françois VARCHAR,
world_record VARCHAR
) | What is the total amount of world records for Roger Francois? | SELECT roger_françois FROM table_name_54 WHERE world_record = "total" | sql_create_context |
CREATE TABLE table_1733 (
"N" real,
"P" text,
"Name" text,
"EU" text,
"Country" text,
"Age" real,
"Type" text,
"Moving from" text,
"Transfer window" text,
"Ends" text,
"Transfer fee" text,
"Source" text
) | What is the end when moving from is listed as cary clarets? | SELECT "Ends" FROM table_1733 WHERE "Moving from" = 'Cary Clarets' | wikisql |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PendingFlags (
... | number of questions on stackoverflow. | SELECT COUNT(*) AS count FROM Posts WHERE PostTypeId = 1 | sede |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 根据不一样的科室以及出院诊断算一下医院1393736就诊的所有的记录里患者年龄的平均数,保留其中患者的平均年龄比10岁大的记录 | SELECT gwyjzb.MED_ORG_DEPT_NM, gwyjzb.OUT_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '1393736' GROUP BY gwyjzb.MED_ORG_DEPT_NM, gwyjzb.OUT_DIAG_DIS_NM HAVING AVG(gwyjzb.PERSON_AGE) > 10 UNION SELECT fgwyjzb.MED_ORG_DEPT_NM, fgwyjzb.OUT_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb... | css |
CREATE TABLE table_name_22 (
character VARCHAR,
original_west_end_cast VARCHAR
) | What character did Katie Rowley Jones play in the Original West End Cast? | SELECT character FROM table_name_22 WHERE original_west_end_cast = "katie rowley jones" | sql_create_context |
CREATE TABLE table_name_14 (
name VARCHAR,
laps VARCHAR,
time_retired VARCHAR
) | What team had less than 159 laps and a time or retired time of 4:00:30.7537 (retired - fire)? | SELECT name FROM table_name_14 WHERE laps < 159 AND time_retired = "4:00:30.7537 (retired - fire)" | sql_create_context |
CREATE TABLE table_11148572_1 (
mls_cup_runner_up VARCHAR,
season VARCHAR
) | Which shield winner has the mls cup runner up and the season is 2000? | SELECT mls_cup_runner_up FROM table_11148572_1 WHERE season = 2000 | sql_create_context |
CREATE TABLE table_name_7 (
attendance INTEGER,
record VARCHAR
) | What was the smallest attendance at a game when the record was 7-15? | SELECT MIN(attendance) FROM table_name_7 WHERE record = "7-15" | sql_create_context |
CREATE TABLE table_2168295_1 (
area__km²_ INTEGER,
population__2011_ VARCHAR
) | What is the minimum area id the 2011 population is 3067549? | SELECT MIN(area__km²_) FROM table_2168295_1 WHERE population__2011_ = 3067549 | sql_create_context |
CREATE TABLE table_57505 (
"Rd #" real,
"Pick #" real,
"Player" text,
"Team (League)" text,
"Reg GP" real,
"Pl GP" real
) | What was the PI GP fpr pick# 235 for Rd# larger than 12? | SELECT MIN("Pl GP") FROM table_57505 WHERE "Pick #" = '235' AND "Rd #" > '12' | wikisql |
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area TEXT,
isAVA TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TE... | Plot year by mean price as a line chart | SELECT Year, AVG(Price) FROM wine GROUP BY Year | nvbench |
CREATE TABLE table_30054758_3 (
team VARCHAR,
high_assists VARCHAR
) | How many teams did inge 6 have the high assists with? | SELECT COUNT(team) FROM table_30054758_3 WHERE high_assists = "Inge – 6" | sql_create_context |
CREATE TABLE table_name_82 (
nationality VARCHAR,
athlete VARCHAR,
time VARCHAR
) | What's the nationality of Henry Carr having a time of 20.3y? | SELECT nationality FROM table_name_82 WHERE athlete = "henry carr" AND time = "20.3y" | sql_create_context |
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 of the patients admitted to emergency had a lab test for rbc and csf? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND lab.label = "RBC, CSF" | mimicsql_data |
CREATE TABLE table_name_24 (
attendance VARCHAR,
loss VARCHAR
) | which attendance has a Loss of drese (0-2)? | SELECT attendance FROM table_name_24 WHERE loss = "drese (0-2)" | sql_create_context |
CREATE TABLE table_name_2 (
pair VARCHAR,
dance VARCHAR,
date VARCHAR
) | Who danced the Cha-Cha-Cha on November 18, 2008? | SELECT pair FROM table_name_2 WHERE dance = "cha-cha-cha" AND date = "november 18, 2008" | sql_create_context |
CREATE TABLE table_18561 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | When the result is retired to run for U.S. Senate Democratic Hold, who is the candidate? | SELECT "Candidates" FROM table_18561 WHERE "Result" = 'Retired to run for U.S. Senate Democratic hold' | wikisql |
CREATE TABLE allergy_type (
allergy text,
allergytype text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE has_allergy (
stuid number,
allergy text
) | Give the advisor with the most students. | SELECT advisor FROM student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1 | spider |
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... | 在哪几次医疗记录中编码为12159301的病患被开出过金额高于1137.43元的药品?医疗就诊编号是多少? | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '12159301' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT > 1137.43) | css |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar... | What is the easiest class I can take to get the ULCS requirement met ? | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_co... | advising |
CREATE TABLE table_72948 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" real
) | What was the week number when the opponent was the New York Jets? | SELECT MAX("Week") FROM table_72948 WHERE "Opponent" = 'New York Jets' | wikisql |
CREATE TABLE table_38699 (
"Stage" text,
"Stage winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Malaysian rider classification" text,
"Team classification" text
) | When Yusuke Hatanaka was the stage winner in the tonton susanto general classification, what was the malaysian rider classification? | SELECT "Malaysian rider classification" FROM table_38699 WHERE "General classification" = 'tonton susanto' AND "Stage winner" = 'yusuke hatanaka' | wikisql |
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
... | What is the average student GPA for every department? Return a bar chart, I want to display by the X-axis in ascending. | SELECT DEPT_CODE, AVG(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE ORDER BY DEPT_CODE | nvbench |
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Reviewer (
rID int,
name text
) | Draw a bar chart for what is the average rating star for each reviewer?, and I want to order from low to high by the X. | SELECT name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name ORDER BY name | nvbench |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLic... | Simple Search Comments + sort on display name. based on work by [@rene on Meta](http://meta.stackexchange.com/a/234278/203418) | SELECT DISTINCT c.Id AS "comment_link", c.PostId AS "post_link", u.Id AS "user_link", u.DisplayName FROM Comments AS c INNER JOIN Users AS u ON u.Id = c.UserId WHERE c.Text LIKE '%##SearchValue##%' ORDER BY u.DisplayName | sede |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
... | what are the latest flights that i can take from BALTIMORE to BOSTON | 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 = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOS... | atis |
CREATE TABLE table_4225 (
"Quartier" text,
"% 0-19 years" text,
"% 20-39 years" text,
"% 40-59 years" text,
"% 60-74 years" text,
"% 75 years and +" text
) | the quartier menpenti has how many 40-59 year olds? | SELECT "% 40-59 years" FROM table_4225 WHERE "Quartier" = 'Menpenti' | wikisql |
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,
... | 在医院1789276全部诊疗记录中,把有民政补助的金额与总的医疗花费比值的最大值根据科室的编号和入院诊断疾病编码差别计算一下,然后以降序的顺序排序 | SELECT gwyjzb.MED_ORG_DEPT_CD, gwyjzb.IN_DIAG_DIS_NM, MAX(t_kc24.CIVIL_SUBSIDY) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '1789276' GROUP BY gwyjzb.MED_ORG_DEPT_CD, gwyjzb.IN_DIAG_DIS_NM ORDER BY MAX(t_kc24.CIVIL_SUBSIDY / t_kc24.MED_AMOUT) DESC UNION SELECT fg... | css |
CREATE TABLE table_25839957_5 (
shader_model VARCHAR,
core_clock___mhz__ VARCHAR
) | How many shader models have a 900 core clock ( mhz )? | SELECT COUNT(shader_model) FROM table_25839957_5 WHERE core_clock___mhz__ = "900" | sql_create_context |
CREATE TABLE table_5151 (
"Game" real,
"December" real,
"Opponent" text,
"Score" text,
"Record" text
) | What's the Score that's got a listing of December that larger than 8 and Record of 25-8-3? | SELECT "Score" FROM table_5151 WHERE "December" > '8' AND "Record" = '25-8-3' | wikisql |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE TagSynonyms (
Id number... | Questions per month, Config Mgmt Frameworks. How do Scala web frameworks compare to each other?
I'm restricting the questions to those tagged Scala, to avoid polluting Playframework's result. It might be unfair, but I can't think of any other way to do it. At least all frameworks are being equally discriminated agains... | SELECT *, COUNT(*) FROM (SELECT DATE(CAST(TIME_TO_STR(CreationDate, '%Y') AS TEXT) + '-' + CAST(TIME_TO_STR(CreationDate, '%m') AS TEXT) + '-01') AS Month, t.TagName FROM (SELECT p.Id, p.CreationDate FROM Posts AS p JOIN PostTags AS pt ON pt.PostId = p.Id JOIN Tags AS t ON t.Id = pt.TagId) AS pp JOIN PostTags AS pt ON ... | sede |
CREATE TABLE table_31972 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Venue" text,
"Attendance" real
) | Tell me the highest week for metropolitan stadium for attendance more than 47,644 | SELECT MAX("Week") FROM table_31972 WHERE "Venue" = 'metropolitan stadium' AND "Attendance" > '47,644' | wikisql |
CREATE TABLE table_203_446 (
id number,
"name" text,
"gender" text,
"age" number,
"from" text,
"occupation" text,
"prize money (usd)" text,
"status" text
) | who was the top prize winner in cha $ e ? | SELECT "name" FROM table_203_446 ORDER BY "prize money (usd)" DESC LIMIT 1 | squall |
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... | Visualize a pie chart about the proportion of All_Road and All_Games_Percent. | SELECT All_Road, All_Games_Percent FROM basketball_match | nvbench |
CREATE TABLE table_name_48 (
track INTEGER,
writer_s_ VARCHAR
) | Which Track has a Writer(s) of mac davis? | SELECT AVG(track) FROM table_name_48 WHERE writer_s_ = "mac davis" | sql_create_context |
CREATE TABLE repair_assignment (
technician_id int,
repair_ID int,
Machine_ID int
)
CREATE TABLE technician (
technician_id real,
Name text,
Team text,
Starting_Year real,
Age int
)
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machi... | A bar chart for listing the number of the name of technicians whose team is not 'NYY'. | SELECT Name, COUNT(Name) FROM technician WHERE Team <> "NYY" GROUP BY Name | nvbench |
CREATE TABLE table_25548630_1 (
poles INTEGER
) | What are the most poles listed? | SELECT MAX(poles) FROM table_25548630_1 | sql_create_context |
CREATE TABLE city (
city_id number,
county_id number,
name text,
white number,
black number,
amerindian number,
asian number,
multiracial number,
hispanic number
)
CREATE TABLE county_public_safety (
county_id number,
name text,
population number,
police_officers num... | List the name of the county with the largest population. | SELECT name FROM county_public_safety ORDER BY population DESC LIMIT 1 | spider |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_procedures (
row_id number,
... | how many days has it passed since patient 55360 was admitted to the icu. | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', icustays.intime)) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 55360) AND icustays.outtime IS NULL | mimic_iii |
CREATE TABLE table_name_3 (
method VARCHAR,
time VARCHAR,
record VARCHAR
) | What is the method when the time is 5:00, and the record is 14 6 1? | SELECT method FROM table_name_3 WHERE time = "5:00" AND record = "14–6–1" | sql_create_context |
CREATE TABLE Staff (
Staff_ID INTEGER,
Staff_Details VARCHAR(255)
)
CREATE TABLE Claims_Processing_Stages (
Claim_Stage_ID INTEGER,
Next_Claim_Stage_ID INTEGER,
Claim_Status_Name VARCHAR(255),
Claim_Status_Description VARCHAR(255)
)
CREATE TABLE Claims_Processing (
Claim_Processing_ID INTE... | Find the number of records of each policy type and its type code Visualize by bar chart, and could you rank bar in ascending order? | SELECT Policy_Type_Code, COUNT(*) FROM Policies GROUP BY Policy_Type_Code ORDER BY Policy_Type_Code | nvbench |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.