context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
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...
患者53311855自二零零四年八月二日开始,截止到二零一七年一月二十九日,由哪几位医务人员为其检测二氧化碳的,查查这些医务人员的工号及姓名
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGD...
css
CREATE TABLE table_20501 ( "Bowl Game" text, "Date" text, "Stadium" text, "City" text, "Television" text, "Conference Matchups" text, "Payout ( US$ )" text )
What is the name of the bowl game that was played in Tempe, Arizona?
SELECT "Bowl Game" FROM table_20501 WHERE "City" = 'Tempe, Arizona'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( ...
count the number of patients whose procedure icd9 code is 14?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "14"
mimicsql_data
CREATE TABLE table_name_50 ( venue VARCHAR, away_team VARCHAR )
When Essendon played away; where did they play?
SELECT venue FROM table_name_50 WHERE away_team = "essendon"
sql_create_context
CREATE TABLE table_27713583_2 ( high_points VARCHAR, date VARCHAR )
How many games were on october 17?
SELECT COUNT(high_points) FROM table_27713583_2 WHERE date = "October 17"
sql_create_context
CREATE TABLE table_76299 ( "noun root (meaning)" text, "case suffix (case)" text, "postposition" text, "full word" text, "English meaning" text )
What is the Full Word, when Case Suffix (case) is '-sa (dative)'?
SELECT "full word" FROM table_76299 WHERE "case suffix (case)" = '-sa (dative)'
wikisql
CREATE TABLE table_40046 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text )
What shows for ICAO when the IATA is sin?
SELECT "ICAO" FROM table_40046 WHERE "IATA" = 'sin'
wikisql
CREATE TABLE table_name_43 ( tournament VARCHAR )
What is the 2010 value with A in 2009 and A in 2008 in the Australian Open?
SELECT 2010 FROM table_name_43 WHERE 2009 = "a" AND 2008 = "a" AND tournament = "australian open"
sql_create_context
CREATE TABLE table_25501 ( "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 highest game number where the team was Cleveland?
SELECT MAX("Game") FROM table_25501 WHERE "Team" = 'Cleveland'
wikisql
CREATE TABLE table_12088 ( "Driver" text, "Constructor" text, "Q1 order" real, "Q1 time" text, "Q1 pos" real, "Q1+Q2 time" text )
Who is the driver whose car was constructed by Renault and whose Q1 pos is greater than 2?
SELECT "Driver" FROM table_12088 WHERE "Constructor" = 'renault' AND "Q1 pos" > '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, ...
count the number of patients whose admission type is elective and admission year is less than 2176?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.admityear < "2176"
mimicsql_data
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, ...
what is the admission location and procedure long title of subject id 2560?
SELECT demographic.admission_location, procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE table_name_45 ( to_par VARCHAR, year_s__won VARCHAR )
What is the To par of the Player who won in 1936?
SELECT to_par FROM table_name_45 WHERE year_s__won = "1936"
sql_create_context
CREATE TABLE table_40454 ( "Rank" real, "Prev" real, "Player" text, "Rating" real, "Chng" text )
Can you tell me the total number of Prev that has the Chng of +10, and the Rating larger than 2765?
SELECT COUNT("Prev") FROM table_40454 WHERE "Chng" = '+10' AND "Rating" > '2765'
wikisql
CREATE TABLE table_1181375_1 ( introduced VARCHAR, notes VARCHAR )
what's the introduced where notes is 9 withdrawn in 1946 after fire
SELECT introduced FROM table_1181375_1 WHERE notes = "9 withdrawn in 1946 after fire"
sql_create_context
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,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 decimal(5,0), REGION_NAME varchar(2...
For all employees who have the letters D or S in their first name, give me the comparison about the average of department_id over the job_id , and group by attribute job_id by a bar chart, list by the y-axis from high to low.
SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY AVG(DEPARTMENT_ID) DESC
nvbench
CREATE TABLE table_34875 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Record" text )
What is the sum for the game with a score of 103 126?
SELECT SUM("Game") FROM table_34875 WHERE "Score" = '103–126'
wikisql
CREATE TABLE table_name_43 ( score VARCHAR, game VARCHAR )
What is the Score of game 35?
SELECT score FROM table_name_43 WHERE game = 35
sql_create_context
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 the number of patients whose admission type is emergency and procedure long title is colostomy, not otherwise specified?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.long_title = "Colostomy, not otherwise specified"
mimicsql_data
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE admissions ( row_id numbe...
since 5 months ago, patient 3277 had received any medicine?
SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3277) AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-5 month')
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...
give me the number of patients whose admission location is emergency room admit and year of death is less than or equal to 2138?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.dod_year <= "2138.0"
mimicsql_data
CREATE TABLE table_9878 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Attendance" text )
On what Date prior to Week 14 was the Record 7-1?
SELECT "Date" FROM table_9878 WHERE "Week" < '14' AND "Record" = '7-1'
wikisql
CREATE TABLE table_27700375_11 ( date VARCHAR, location_attendance VARCHAR )
Name the date for the palace of auburn hills 14,554
SELECT date FROM table_27700375_11 WHERE location_attendance = "The Palace of Auburn Hills 14,554"
sql_create_context
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int )...
what are the flights from DENVER to PITTSBURGH
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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBU...
atis
CREATE TABLE table_203_551 ( id number, "goal" number, "date" text, "venue" text, "opponent" text, "score" text, "result" text, "competition" text )
what is the total number of international goals d m szalai has made ?
SELECT COUNT("goal") FROM table_203_551
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 admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_typ...
when was the last time that patient 19981 was given a hemoglobin lab test in 02/last year?
SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'hemoglobin') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19981) AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURR...
mimic_iii
CREATE TABLE table_203_855 ( id number, "date" text, "city" text, "venue" text, "member" text, "performance" text, "notes" text )
what was the last venue brian preformed in ?
SELECT "venue" FROM table_203_855 ORDER BY "date" DESC LIMIT 1
squall
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...
Find the number of professors with a PhD degree in each department Show bar chart, and could you display X from low to high order?
SELECT DEPT_CODE, COUNT(*) FROM PROFESSOR WHERE PROF_HIGH_DEGREE = 'Ph.D.' GROUP BY DEPT_CODE ORDER BY DEPT_CODE
nvbench
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_...
how many patients had been in the careunit sicu during the previous year?
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'sicu' AND DATETIME(transfers.intime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year'))
mimic_iii
CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE field ( fieldid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TAB...
li dong 's paper about semantic parsing
SELECT DISTINCT author.authorid, paper.paperid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'li dong' AND keyphrase.keyphrasename = 'semantic parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authori...
scholar
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, g...
Which Other classes are available next Winter ?
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id WHERE program_cour...
advising
CREATE TABLE table_35776 ( "Rank" real, "Building" text, "City" text, "Height (m/ft)" text, "Built" real )
What is the name of the building in Bucharest with a rank of less than 12?
SELECT "Building" FROM table_35776 WHERE "City" = 'bucharest' AND "Rank" < '12'
wikisql
CREATE TABLE table_10127 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
Who took the loss against the California Angels when the attendance was 10,886?
SELECT "Loss" FROM table_10127 WHERE "Opponent" = 'california angels' AND "Attendance" = '10,886'
wikisql
CREATE TABLE table_name_18 ( bronze INTEGER, nation VARCHAR, silver VARCHAR )
How many bronze medals for the United Kingdom when the silver was less than 0?
SELECT AVG(bronze) FROM table_name_18 WHERE nation = "united kingdom" AND silver < 0
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...
患者27139108在医院7709781中的门诊就诊记录里有哪些门诊诊断名称中有多少不包含(的?
SELECT * FROM hz_info JOIN mzjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND person_info_hz_i...
css
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...
52475507号病人在06年7月13日到08年2月8日期间去医疗机构6573850看了几次门诊
SELECT COUNT(*) FROM hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb....
css
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE medication ( medi...
indicate the daily maximum amount of sao2 for patient 006-141797 on the last icu visit.
SELECT MAX(vitalperiodic.sao2) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-141797') AND NOT patient.unitdischargetime IS NULL OR...
eicu
CREATE TABLE table_65292 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What was the result for week 2?
SELECT "Result" FROM table_65292 WHERE "Week" = '2'
wikisql
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name var...
please list all DL flights from KANSAS CITY to SALT LAKE CITY
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 = 'SALT LAKE CITY' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name =...
atis
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( uniquepid text, ...
what is the number of patients who have had a po oral intake since 6 years ago?
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT intakeoutput.patientunitstayid FROM intakeoutput WHERE intakeoutput.celllabel = 'po oral' AND intakeoutput.cellpath LIKE '%input%' AND DATETIME(intakeoutput.intakeoutputtime) >= DATETIME(CURRENT_TIME(), '-6 year'))
eicu
CREATE TABLE table_name_51 ( week INTEGER, date VARCHAR, attendance VARCHAR )
When was the last time, since December 14, 1986, that the attendance was lower than 47,096?
SELECT MAX(week) FROM table_name_51 WHERE date = "december 14, 1986" AND attendance < 47 OFFSET 096
sql_create_context
CREATE TABLE table_57724 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
How many points did the away team score at Arden Street Oval?
SELECT "Away team score" FROM table_57724 WHERE "Venue" = 'arden street oval'
wikisql
CREATE TABLE table_73942 ( "School" text, "Location" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Nickname" text )
What is the nickname of the University of Alabama?
SELECT "Nickname" FROM table_73942 WHERE "School" = 'University of Alabama'
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...
what is subject name and gender of subject id 2560?
SELECT demographic.name, demographic.gender FROM demographic WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE table_3543 ( "Institution" text, "Location" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Team Nickname" text, "Primary conference" text )
How many Kent State University's are there?
SELECT COUNT("Location") FROM table_3543 WHERE "Institution" = 'Kent State University'
wikisql
CREATE TABLE table_73676 ( "Club" text, "Home city" text, "Stadium" text, "First season in the Serie A" real, "First season in current spell" real, "Last title" text )
Name the last title for 2012
SELECT "Last title" FROM table_73676 WHERE "First season in current spell" = '2012'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescription...
provide the number of patients whose discharge location is dead/expired and admission year is less than 2145?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "DEAD/EXPIRED" AND demographic.admityear < "2145"
mimicsql_data
CREATE TABLE table_73795 ( "Institution" text, "Location" text, "Founded" real, "Type" text, "Enrollment" real, "Joined" real, "Nickname" text, "US News Ranking 2014 for Liberal Arts" text, "Football?" text )
When was Dickinson College founded?
SELECT "Founded" FROM table_73795 WHERE "Institution" = 'Dickinson College'
wikisql
CREATE TABLE table_name_74 ( popular_votes VARCHAR, office VARCHAR, year VARCHAR )
Name the total number of popular votes for mn attorney general in 1994
SELECT COUNT(popular_votes) FROM table_name_74 WHERE office = "mn attorney general" AND year = 1994
sql_create_context
CREATE TABLE problems ( problem_id VARCHAR, reported_by_staff_id VARCHAR ) CREATE TABLE staff ( staff_id VARCHAR, staff_last_name VARCHAR )
Find the ids of the problems that are reported by the staff whose last name is Bosco.
SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = "Bosco"
sql_create_context
CREATE TABLE table_51166 ( "Episode" real, "Original airdate" text, "Timeslot (approx.)" text, "Viewers (millions)" real, "Nightly rank" text )
Original airdate for #6 with 1.246 viewers?
SELECT "Original airdate" FROM table_51166 WHERE "Nightly rank" = '#6' AND "Viewers (millions)" = '1.246'
wikisql
CREATE TABLE table_26931 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Wildcats points" real, "Opponents" real, "Record" text )
List all opponents from the 4-4 scoring game.
SELECT "Opponent" FROM table_26931 WHERE "Record" = '4-4'
wikisql
CREATE TABLE table_name_62 ( year VARCHAR, points VARCHAR, chassis VARCHAR )
Name the year for points less than 20 and chassis of dallara 3087
SELECT year FROM table_name_62 WHERE points < 20 AND chassis = "dallara 3087"
sql_create_context
CREATE TABLE table_27155678_2 ( gene_name VARCHAR, genus_species VARCHAR )
Name the gene name for methylobacterium nodulans
SELECT gene_name FROM table_27155678_2 WHERE genus_species = "Methylobacterium nodulans"
sql_create_context
CREATE TABLE table_name_92 ( set_1 VARCHAR, total VARCHAR )
What is the set 1 score when the total is 85 101?
SELECT set_1 FROM table_name_92 WHERE total = "85–101"
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 zyjybgb ( BBCJBW text, BBDM t...
有哪些就诊流水号出现在检验报告单49805079614中?
SELECT zyjybgb.JZLSH FROM zyjybgb WHERE zyjybgb.BGDH = '49805079614' UNION SELECT mzjybgb.JZLSH FROM mzjybgb WHERE mzjybgb.BGDH = '49805079614'
css
CREATE TABLE table_name_62 ( seats INTEGER, general_election VARCHAR, share_of_votes VARCHAR, share_of_seats VARCHAR )
Which Seats have a Share of votes of 18%, and a Share of seats of 3%, and a General election larger than 1992?
SELECT MAX(seats) FROM table_name_62 WHERE share_of_votes = "18%" AND share_of_seats = "3%" AND general_election > 1992
sql_create_context
CREATE TABLE table_train_240 ( "id" int, "anemia" bool, "gender" string, "systolic_blood_pressure_sbp" int, "hemoglobin_a1c_hba1c" float, "estimated_glomerular_filtration_rate_egfr" int, "diastolic_blood_pressure_dbp" int, "insulin_requirement" float, "kidney_disease" bool, "body...
have normal or only mildly impaired kidney function defined as a calculated gfr greater than 60 ml / min / 1.73 m2
SELECT * FROM table_train_240 WHERE kidney_disease = 1 OR estimated_glomerular_filtration_rate_egfr > 60
criteria2sql
CREATE TABLE table_204_143 ( id number, "national park" text, "region" text, "land area (km2)" number, "established" number, "visitation (2009)" number, "coordinates" text )
how many national parks were established after 1990 ?
SELECT COUNT("national park") FROM table_204_143 WHERE "established" > 1990
squall
CREATE TABLE table_204_879 ( id number, "year" number, "host / location" text, "division i overall" text, "division i undergraduate" text, "division ii overall" text, "division ii community college" text )
what is the first year on the chart ?
SELECT "year" FROM table_204_879 WHERE id = 1
squall
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, ...
患者对应的门诊就诊中开出的检验报告单80578545144上的姓名是什么?
SELECT person_info.XM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZ...
css
CREATE TABLE table_73803 ( "City / Municipality" text, "No. of s Barangay" real, "District" real, "Area (km\u00b2)" text, "Population (2010)" real, "Income class (2007)" text, "ZIP code" real, "Mayor" text )
What are all the metropolis / municipality where mayor is helen c. De castro
SELECT "City / Municipality" FROM table_73803 WHERE "Mayor" = 'Helen C. De Castro'
wikisql
CREATE TABLE table_name_24 ( opponent VARCHAR, week VARCHAR )
Who is the listed opponent in Week 2?
SELECT opponent FROM table_name_24 WHERE week = 2
sql_create_context
CREATE TABLE table_74579 ( "Lane" real, "Name" text, "Nationality" text, "Split (50m)" real, "Time" real )
What is the slowest 50m split time for a total of 53.74 in a lane of less than 3?
SELECT MAX("Split (50m)") FROM table_74579 WHERE "Time" = '53.74' AND "Lane" < '3'
wikisql
CREATE TABLE table_28219 ( "Unit" text, "Commander" text, "Complement" text, "Killed" text, "Wounded" text, "Missing" text )
What was the complement associated with 0 off 3 men killed and 0 off 2 men wounded?
SELECT "Complement" FROM table_28219 WHERE "Killed" = '0 off 3 men' AND "Wounded" = '0 off 2 men'
wikisql
CREATE TABLE table_41732 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real )
What is the sum of top-25s for events with more than 1 top-5?
SELECT SUM("Top-25") FROM table_41732 WHERE "Top-5" > '1'
wikisql
CREATE TABLE table_20790 ( "product" text, "dimensions (mm)" text, "dpi" real, "pages per minute (color)" real, "max page size" text, "interface" text )
What are the mm dimensions of the Plustek Mobileoffice D28 Corporate?
SELECT "dimensions (mm)" FROM table_20790 WHERE "product" = 'Plustek MobileOffice D28 Corporate'
wikisql
CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE CloseReasonTypes ( Id number, ...
All my answers sort score , viewcount, creationDate. All my answers on the site
SELECT * FROM (SELECT q.Id AS aid, a.Id AS "post_link", CASE WHEN q.AcceptedAnswerId = a.Id THEN 'Accepted' END AS Accepted, a.Score FROM Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId WHERE a.OwnerUserId = @UserId AND a.PostTypeId = 2) AS AA INNER JOIN (SELECT DISTINCT Question.Id AS bid, Question.CreationDate ...
sede
CREATE TABLE playlist ( playlistid number, name text ) CREATE TABLE invoice ( invoiceid number, customerid number, invoicedate time, billingaddress text, billingcity text, billingstate text, billingcountry text, billingpostalcode text, total number ) CREATE TABLE mediatype ...
Find the average unit price of tracks from the Rock genre.
SELECT AVG(T2.unitprice) FROM genre AS T1 JOIN track AS T2 ON T1.genreid = T2.genreid WHERE T1.name = "Rock"
spider
CREATE TABLE musical ( Musical_ID int, Name text, Year int, Award text, Category text, Nominee text, Result text ) CREATE TABLE actor ( Actor_ID int, Name text, Musical_ID int, Character text, Duration text, age int )
Show the number of the musical nominee with award 'Bob Fosse' or 'Cleavant Derricks'.
SELECT Nominee, COUNT(Nominee) FROM musical WHERE Award = "Tony Award" OR Award = "Cleavant Derricks" GROUP BY Nominee
nvbench
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartr...
what is the top three most frequent microbiology tests that followed in the same month for patients who received chest x-ray?
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'chest x-ray') AS t1 JOIN (SELECT patient.uni...
eicu
CREATE TABLE table_name_59 ( nationality VARCHAR, lane VARCHAR, rank VARCHAR )
What Nationality of the person who has a Rank of 4
SELECT nationality FROM table_name_59 WHERE lane < 4 AND rank = 4
sql_create_context
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, ...
45655595406结束门诊就诊的日子是在哪一年的几月几日
SELECT txmzjzjlb.JZJSSJ FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '45655595406' UNION SELECT ftxmzjzjlb.JZJSSJ FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZLSH = '45655595406'
css
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 prescriptions...
calculate the maximum age of male patients with angioedema as primary disease.
SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.diagnosis = "ANGIOEDEMA"
mimicsql_data
CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE field ( fieldid int ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE ...
How many papers are in NLP ?
SELECT DISTINCT COUNT(DISTINCT paper.paperid) FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'NLP' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid
scholar
CREATE TABLE table_64653 ( "Rank" real, "Name" text, "Status" text, "City" text, "Floors" real )
What is the rank for the city of sewri?
SELECT COUNT("Rank") FROM table_64653 WHERE "City" = 'sewri'
wikisql
CREATE TABLE table_74774 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
How many weeks had an attendance larger than 84,816?
SELECT COUNT("Week") FROM table_74774 WHERE "Attendance" > '84,816'
wikisql
CREATE TABLE table_46715 ( "Season" text, "Competition" text, "Round" text, "Club" text, "1st Leg" text )
What is the round of club be ej?
SELECT "Round" FROM table_46715 WHERE "Club" = 'bečej'
wikisql
CREATE TABLE airport ( Airport_ID int, Airport_Name text, Total_Passengers real, %_Change_2007 text, International_Passengers real, Domestic_Passengers real, Transit_Passengers real, Aircraft_Movements real, Freight_Metric_Tonnes real ) CREATE TABLE aircraft ( Aircraft_ID int(11...
What is the number of each winning aircraft? Visualize by bar chart, and show from low to high by the total number.
SELECT Aircraft, COUNT(Aircraft) FROM aircraft AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY Aircraft ORDER BY COUNT(Aircraft)
nvbench
CREATE TABLE zyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
医院4248222的出院诊断医生陈医生给患者施方方做的出院诊断结果都分别是什么?
SELECT qtb.OUT_DIAG_DIS_CD, qtb.OUT_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_NM = '施方方' AND qtb.MED_SER_ORG_NO = '4248222' AND qtb.OUT_DIAG_DOC_NM LIKE '陈%' UNION SELECT gyb.OUT_DIAG_DIS_CD, gyb.OUT_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_NM = '施方方' AND gyb.MED_SER_ORG_NO = '4248222' AND gyb.OUT_DIAG_DOC_NM LIKE '陈%' UNION ...
css
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, KH te...
哪个科室负责检验检验报告单58304822879的,提供一下该科室的编码及名称
SELECT zyjybgb.JYKSBM, zyjybgb.JYKSMC FROM zyjybgb WHERE zyjybgb.BGDH = '58304822879' UNION SELECT mzjybgb.JYKSBM, mzjybgb.JYKSMC FROM mzjybgb WHERE mzjybgb.BGDH = '58304822879'
css
CREATE TABLE table_5232 ( "Rank" real, "Airport" text, "Passengers" real, "% Change" text, "Carriers" text )
What is the Rank that has Passengers larger than 70,921, and 2.8 % Change?
SELECT SUM("Rank") FROM table_5232 WHERE "Passengers" > '70,921' AND "% Change" = '2.8'
wikisql
CREATE TABLE table_name_21 ( lane VARCHAR, time VARCHAR )
What is the lane number of the swimmer with a time of 55.69?
SELECT lane FROM table_name_21 WHERE time = 55.69
sql_create_context
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...
calculate the stool output of patient 015-59552 on this month/26.
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-59552')) AND intakeoutput.celllabel = 'stool...
eicu
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
what is the number of patients whose insurance is medicaid and procedure short title is conduit left ventr-aorta?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.short_title = "Conduit left ventr-aorta"
mimicsql_data
CREATE TABLE player ( pid number, pname text, ycard text, hs number ) CREATE TABLE college ( cname text, state text, enr number ) CREATE TABLE tryout ( pid number, cname text, ppos text, decision text )
What is minimum hours of the students playing in different position?
SELECT MIN(T2.hs), T1.ppos FROM tryout AS T1 JOIN player AS T2 ON T1.pid = T2.pid GROUP BY T1.ppos
spider
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 Votes ( Id number, PostId number, ...
Perguntas de Score Alto & Respostas de Score Alto.
SELECT P.Id AS "post_link", P.Score AS "SCORE PERG.", A.Score AS "SCORE RESP." FROM Posts AS P JOIN (SELECT Id, Score FROM Posts GROUP BY Id, Score) AS A ON P.AcceptedAnswerId = A.Id WHERE P.Score > @Score AND A.Score > @Score
sede
CREATE TABLE table_27988 ( "Rnd" text, "Circuit" text, "Location" text, "Date" text, "Pole position" text, "Fastest lap" text, "Most laps led" text, "Winning driver" text, "Winning team" text, "Supporting" text )
What was the winning team when mikhail goikhberg was the winning driver?
SELECT "Winning team" FROM table_27988 WHERE "Winning driver" = 'Mikhail Goikhberg'
wikisql
CREATE TABLE Player ( pID numeric(5,0), pName varchar(20), yCard varchar(3), HS numeric(5,0) ) CREATE TABLE College ( cName varchar(20), state varchar(2), enr numeric(5,0) ) CREATE TABLE Tryout ( pID numeric(5,0), cName varchar(20), pPos varchar(8), decision varchar(3) )
A bar chart about what is minimum hours of the students playing in different position?, show Y in asc order.
SELECT pPos, MIN(T2.HS) FROM Tryout AS T1 JOIN Player AS T2 ON T1.pID = T2.pID GROUP BY pPos ORDER BY MIN(T2.HS)
nvbench
CREATE TABLE music_festival ( id number, music_festival text, date_of_ceremony text, category text, volume number, result text ) CREATE TABLE volume ( volume_id number, volume_issue text, issue_date text, weeks_on_top number, song text, artist_id number ) CREATE TABLE a...
What is the song in the volume with the maximum weeks on top?
SELECT song FROM volume ORDER BY weeks_on_top DESC LIMIT 1
spider
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time,...
how did in 2105 patient 86209 last enter the hospital?
SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 86209 AND STRFTIME('%y', admissions.admittime) = '2105' ORDER BY admissions.admittime DESC LIMIT 1
mimic_iii
CREATE TABLE table_54782 ( "Rank" real, "Club" text, "Gold" real, "Big Silver" real, "Small Silver" real, "Bronze" real, "Points" real )
How many points did landskrona bois get when they were ranked below 18?
SELECT COUNT("Points") FROM table_54782 WHERE "Club" = 'landskrona bois' AND "Rank" < '18'
wikisql
CREATE TABLE flight ( id VARCHAR, airport_id VARCHAR, pilot VARCHAR ) CREATE TABLE airport ( id VARCHAR, airport_id VARCHAR, pilot VARCHAR )
How many airports haven't the pilot 'Thompson' driven an aircraft?
SELECT COUNT(*) FROM airport WHERE NOT id IN (SELECT airport_id FROM flight WHERE pilot = 'Thompson')
sql_create_context
CREATE TABLE table_34802 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner-up" text )
Who was the runner-up on 5 aug 1990?
SELECT "Runner-up" FROM table_34802 WHERE "Date" = '5 aug 1990'
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
count the number of patients whose diagnoses icd9 code is 5589 and lab test fluid is blood?
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.icd9_code = "5589" AND lab.fluid = "Blood"
mimicsql_data
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, KH te...
患者被门诊诊断为过敏性皮炎,患者的检测指标675208的参考值范围下限和上限都是啥呀?
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JYZBLSH AND jybgb_jyjgzbb.jyjgzbb_id ...
css
CREATE TABLE table_66046 ( "Hull Number" text, "Name" text, "Builder" text, "Laid down" text, "Launched" text, "Completed" text )
Who was the builder for the USS cambridge?
SELECT "Builder" FROM table_66046 WHERE "Name" = 'uss cambridge'
wikisql
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE i...
what was the name of the specimen test that was first given to patient 031-15417 since 116 months ago?
SELECT microlab.culturesite FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-15417')) AND DATETIME(microlab.culturetakentime) >= DATETIME(CURRE...
eicu
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...
编号是81139819的那个有病的患者在看病的记录中被开出的药物均超出5429.71元?列出的医疗就诊号码是多少?
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '81139819' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 5429.71)
css
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 diagnoses ( ...
provide the number of patients with delta abnormal lab test status who have benign neoplasm of pituitary gland and craniopharyngeal duct diagnoses.
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 = "Benign neoplasm of pituitary gland and craniopharyngeal duct" AND lab.flag = "delta"
mimicsql_data