context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_45228 ( "Position" real, "Team" text, "Played" real, "Drawn" real, "Lost" real, "Goals For" real, "Goals Against" real, "Goal Difference" text, "Points 1" real )
How many goals for had a drawn more than 12 for the Goole Town team, as well as more than 60 goals against?
SELECT SUM("Goals For") FROM table_45228 WHERE "Drawn" > '12' AND "Team" = 'goole town' AND "Goals Against" > '60'
wikisql
CREATE TABLE table_name_43 ( background_colour VARCHAR, type_of_sign VARCHAR )
Which color is the background of the mandatory instructions?
SELECT background_colour FROM table_name_43 WHERE type_of_sign = "mandatory instructions"
sql_create_context
CREATE TABLE table_60926 ( "Preseason" text, "Week 1 Sept 7" text, "Week 2 Sept 14" text, "Week 3 Sept 21" text, "Week 4 Sept 28" text, "Week 5 Oct 5" text, "Week 6 Oct 12" text, "Week 7 Oct 19" text, "Week 8 Oct 26" text, "Week 9 Nov 2" text, "Week 10 Nov 9" text, "Week ...
What is the Week 8 result of the team that lost to syarcuse (4-2) in Week 7?
SELECT "Week 8 Oct 26" FROM table_60926 WHERE "Week 7 Oct 19" = 'syarcuse (4-2)'
wikisql
CREATE TABLE table_34029 ( "Year" real, "Title" text, "Label" text, "Format" text, "Album" text )
What album has the title I Need A Life with the label of warp records / paper bag records?
SELECT "Album" FROM table_34029 WHERE "Label" = 'warp records / paper bag records' AND "Title" = 'i need a life'
wikisql
CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time...
Bounties per month since 2013.
SELECT DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0) AS Month, COUNT(*) AS Bounties FROM Votes WHERE VoteTypeId = 8 AND CreationDate >= '2013-01-01' GROUP BY DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0) ORDER BY DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0)
sede
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
在医疗机构5156637的科室65658的记录里,在00年1月5日到19年8月22日期间内,共有多少住院的患者
SELECT COUNT(*) FROM zyjzjlb WHERE YLJGDM = '5156637' AND JZKSDM = '65658' AND RYDJSJ BETWEEN '2000-01-05' AND '2019-08-22'
css
CREATE TABLE rooms ( roomid text, roomname text, beds number, bedtype text, maxoccupancy number, baseprice number, decor text ) CREATE TABLE reservations ( code number, room text, checkin text, checkout text, rate number, lastname text, firstname text, adults...
List the type of bed and name of all traditional rooms.
SELECT roomname, bedtype FROM rooms WHERE decor = "traditional"
spider
CREATE TABLE table_79091 ( "Year" real, "Gold" text, "Silver" text, "Bronze" text, "Notes" text )
WHAT YEAR HAS A SILVER FOR MATTHIAS MERZ?
SELECT MIN("Year") FROM table_79091 WHERE "Silver" = 'matthias merz'
wikisql
CREATE TABLE table_72528 ( "Player" text, "Position" text, "Starter" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real )
Name the most extra points for right tackle
SELECT MAX("Extra points") FROM table_72528 WHERE "Position" = 'Right tackle'
wikisql
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE labevents ( row_id number, subje...
how many patients passed away within 2 months after they were diagnosed with asthma nos w (ac) exac?
SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_di...
mimic_iii
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
门诊给编号为63047610这个患者诊断为躁狂型分裂情感性障碍,看看超敏甲状腺球蛋白的结果定量还有单位
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jyb...
css
CREATE TABLE table_27076 ( "Episode" real, "Stage" text, "Celebrities" text, "Directed and produced by" text, "Original airdate" text, "Viewers (overnight estimates)" text )
Which episode had celebrities Nick Hewer and Saira Khan in them?
SELECT "Episode" FROM table_27076 WHERE "Celebrities" = 'Nick Hewer and Saira Khan'
wikisql
CREATE TABLE table_28426 ( "Club" text, "Wins" real, "Losses" real, "Points For" real, "Points Against" real, "Percentage" text, "Points" real )
How many points did the Toronto Downtown Dingos score?
SELECT MIN("Points For") FROM table_28426 WHERE "Club" = 'Toronto Downtown Dingos'
wikisql
CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, ...
COACH class flights on TW from COLUMBUS to ST. PAUL
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, fare, fare_basis, flight, flight_fare WHERE ((CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'COLUMBUS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_c...
atis
CREATE TABLE table_225200_3 ( successor VARCHAR, date_of_successors_formal_installation VARCHAR )
Name the successor for elected january 26, 1837
SELECT COUNT(successor) FROM table_225200_3 WHERE date_of_successors_formal_installation = "Elected January 26, 1837"
sql_create_context
CREATE TABLE table_39994 ( "Gill" text, "Latitude" text, "Longitude" text, "Diameter (km)" text, "Diameter (mi)" text )
What shows for the Diameter (mi) when the Gill is g?
SELECT "Diameter (mi)" FROM table_39994 WHERE "Gill" = 'g'
wikisql
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, ...
how many patients whose gender is m and diagnoses short title is long-term use anticoagul?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.short_title = "Long-term use anticoagul"
mimicsql_data
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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 t...
how many patients whose procedure is titled int inser lead atri-vent left against medical advice?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "LEFT AGAINST MEDICAL ADVI" AND procedures.short_title = "Int inser lead atri-vent"
mimicsql_data
CREATE TABLE table_51544 ( "Year" real, "Tournament" text, "Venue" text, "Result" text, "Event" text )
How did he place in 1970?
SELECT "Result" FROM table_51544 WHERE "Year" = '1970'
wikisql
CREATE TABLE table_name_2 ( name VARCHAR, country VARCHAR )
What is the name of the player from Cod?
SELECT name FROM table_name_2 WHERE country = "cod"
sql_create_context
CREATE TABLE table_53960 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text )
What was the decision of the game with Washington as the visitor team on October 13?
SELECT "Decision" FROM table_53960 WHERE "Visitor" = 'washington' AND "Date" = 'october 13'
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, ...
列出在编码为9652533的医院中施红雪患者门诊诊断名称包含壹期的门诊就诊记录有哪些呀?
SELECT * 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.person_info_XM = '施红雪' AND hz_info.YLJGDM = '9652533' AND mzjzjlb.JZZDSM LIKE '%壹期%'
css
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, ...
when was first time the arterial bp [diastolic] of patient 7400 was greater than 83.0 on 01/15/last year?
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 = 7400)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ...
mimic_iii
CREATE TABLE table_75155 ( "Date" text, "City" text, "Opponent" text, "Results\u00b9" text, "Type of game" text )
What day were the results 3:2?
SELECT "Date" FROM table_75155 WHERE "Results\u00b9" = '3:2'
wikisql
CREATE TABLE table_69981 ( "Artist" text, "Country of origin" text, "Period active" text, "Release-year of first charted record" real, "Genre" text, "Claimed sales" text )
What genre is Led Zeppelin?
SELECT "Genre" FROM table_69981 WHERE "Artist" = 'led zeppelin'
wikisql
CREATE TABLE Guests ( guest_id INTEGER, gender_code CHAR(1), guest_first_name VARCHAR(80), guest_last_name VARCHAR(80), date_of_birth DATETIME ) CREATE TABLE Apartment_Facilities ( apt_id INTEGER, facility_code CHAR(15) ) CREATE TABLE Apartments ( apt_id INTEGER, building_id INTEGE...
Show the number of apartment bookings for each weekday and bin booking start date by weekday interval in a bar chart.
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id
nvbench
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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 t...
calculate the number of female patients with drug code epo4i.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "F" AND prescriptions.formulary_drug_cd = "EPO4I"
mimicsql_data
CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM number ) 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, X...
从2001年1月15日至2009年6月20日期间列举出病人李慧美所有检验结果指标记录中的检测方法吗?
SELECT jyjgzbb.JCFF 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_MZJ...
css
CREATE TABLE table_69152 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" real )
for the rank of 8 and lane less than 3 what is the name?
SELECT "Name" FROM table_69152 WHERE "Lane" < '3' AND "Rank" = '8'
wikisql
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
参与04488736077医疗就诊的有哪些人?他们的姓名、性别、年龄、身份号码分别是什么
SELECT t_kc21.PERSON_NM, t_kc21.PERSON_SEX, t_kc21.PERSON_AGE, t_kc21.IDENTITY_CARD FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '24731815249'
css
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDa...
Tag synonym suggestions: Tag pairs with significant overlap / redundancy / clustering.
WITH TagsAndRanks AS (SELECT Id, TagName, Count, RANK() OVER (ORDER BY Count DESC, TagName) AS CountRank FROM Tags), TagPairs AS (SELECT A.Id AS AId, A.TagName AS ATagName, A.Count AS ACount, B.Id AS BId, B.TagName AS BTagName, B.Count AS BCount FROM TagsAndRanks AS A, TagsAndRanks AS B WHERE A.CountRank < B.CountRank)...
sede
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
has patient 025-5947 undergone any thyroid hormone - levothyroxine (t4) treatment since 5 years ago?
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-5947')) AND treatment.treatmentname = 'thyroid hormone - levothyroxine (...
eicu
CREATE TABLE table_train_22 ( "id" int, "pre_treatment_with_hydroxyethyl_starch" int, "requiring_dialysis" bool, "intracerebral_hemorrhage" bool, "serum_creatinine" float, "kidney_disease" bool, "allergy_to_hydroxyethyl_starch" bool, "age" float, "NOUSE" float )
pre treatment with > 1000 ml hydroxyethyl starch within 24 hours before inclusion
SELECT * FROM table_train_22 WHERE pre_treatment_with_hydroxyethyl_starch > 1000
criteria2sql
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
医疗机构7265817金额前24名的项目有哪些
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.MED_SER_ORG_NO = '7265817' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY SUM(t_kc22.AMOUNT) DESC LIMIT 2...
css
CREATE TABLE table_14038363_1 ( position VARCHAR, player VARCHAR )
How many position does Teodor Salparov play on?
SELECT COUNT(position) FROM table_14038363_1 WHERE player = "Teodor Salparov"
sql_create_context
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 the number of patients who were born before the year 2065 and have a procedure icd9 code as 9604?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2065" AND procedures.icd9_code = "9604"
mimicsql_data
CREATE TABLE employee ( emp_fname VARCHAR, emp_num VARCHAR ) CREATE TABLE professor ( emp_num VARCHAR, dept_code VARCHAR ) CREATE TABLE CLASS ( class_room VARCHAR, prof_num VARCHAR ) CREATE TABLE department ( dept_code VARCHAR, dept_name VARCHAR )
Find the first names of all professors in the Accounting department who is teaching some course and the class room.
SELECT T2.emp_fname, T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting'
sql_create_context
CREATE TABLE table_name_12 ( grid VARCHAR, driver VARCHAR )
What grid for denny hulme?
SELECT grid FROM table_name_12 WHERE driver = "denny hulme"
sql_create_context
CREATE TABLE table_name_4 ( attendance INTEGER, game VARCHAR )
Game 1's sum of attendance is?
SELECT SUM(attendance) FROM table_name_4 WHERE game = 1
sql_create_context
CREATE TABLE table_name_93 ( year INTEGER, opponent VARCHAR )
Name the sum of year for penrith panthers opponent
SELECT SUM(year) FROM table_name_93 WHERE opponent = "penrith panthers"
sql_create_context
CREATE TABLE table_203_518 ( id number, "institution" text, "location" text, "nickname" text, "founded" number, "type" text, "enrollment" number, "joined\nmac" number )
name each institution with enrollment numbers above 4,000 ?
SELECT "institution" FROM table_203_518 WHERE "enrollment" > 4000
squall
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, ZYLBDM text, ZYMC text ) CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGD...
编号48451516947的检验报告单属于什么检验类型
SELECT JYLX FROM jybgb WHERE BGDH = '48451516947'
css
CREATE TABLE table_54302 ( "Year" real, "Meeting" text, "Venue" text, "Result" text, "Event" text, "Extra" real )
What year has an extra of 8, and a result of 3rd?
SELECT "Year" FROM table_54302 WHERE "Extra" = '8' AND "Result" = '3rd'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
how many white patients have the lab test total protein, pleural done?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "WHITE" AND lab.label = "Total Protein, Pleural"
mimicsql_data
CREATE TABLE table_name_58 ( type VARCHAR, nat VARCHAR )
Which Type has a Nat of geo?
SELECT type FROM table_name_58 WHERE nat = "geo"
sql_create_context
CREATE TABLE table_75634 ( "Year" text, "Name" text, "Political affiliation" text, "Deputy" text, "Deputy's affiliation" text )
What is the Political affiliation of deputy john dallat?
SELECT "Political affiliation" FROM table_75634 WHERE "Deputy" = 'john dallat'
wikisql
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE instructor ( instructo...
What courses should I take before taking RCSSCI 365 ?
SELECT DISTINCT advisory_requirement FROM course WHERE department = 'RCSSCI' AND number = 365
advising
CREATE TABLE table_name_64 ( points VARCHAR, races VARCHAR, season VARCHAR )
If the Season is later than 2008 and Races is 11, what ate the Points?
SELECT points FROM table_name_64 WHERE races = "11" AND season > 2008
sql_create_context
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...
在不同科室编码下,列出统筹基金支出与医疗费总额在医院7883638所有医疗就诊记录中有多大平均比值?
SELECT t_kc24.t_kc21_MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '7883638' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_CD
css
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
tell me the number of female patients with medicaid.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.insurance = "Medicaid"
mimicsql_data
CREATE TABLE table_11390711_4 ( japanese_orthography VARCHAR, english_name VARCHAR )
What is the Japanese orthography for the English name National Farmers Academy?
SELECT japanese_orthography FROM table_11390711_4 WHERE english_name = "National Farmers Academy"
sql_create_context
CREATE TABLE table_name_2 ( iata VARCHAR, icao VARCHAR )
Tell me the iata for icao of tjrv
SELECT iata FROM table_name_2 WHERE icao = "tjrv"
sql_create_context
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,...
是哪家定点医疗机构进行编号72182472629的医疗就诊的,查查这家医疗机构的编码
SELECT FLX_MED_ORG_ID FROM t_kc21 WHERE MED_CLINIC_ID = '72182472629'
css
CREATE TABLE table_204_360 ( id number, "year" number, "host" text, "gold" text, "silver" text, "bronze" text )
who hosted the tournament before 1981 ?
SELECT "host" FROM table_204_360 WHERE "year" < 1981
squall
CREATE TABLE table_17416 ( "Train No." text, "Train Name" text, "Origin" text, "Destination" text, "Frequency" text )
Where does the bg express train end?
SELECT "Destination" FROM table_17416 WHERE "Train Name" = 'BG Express'
wikisql
CREATE TABLE table_2726 ( "Age (before)" text, "America" text, "Atlantic Europe" text, "Maghreb" text, "Mediterranean Europe" text, "Central Europe" text )
What is every entry for America when Atlantic Europe is Hoxniense?
SELECT "America" FROM table_2726 WHERE "Atlantic Europe" = 'Hoxniense'
wikisql
CREATE TABLE table_24561550_1 ( opponent VARCHAR, record VARCHAR )
List all opponents from the 4-4 scoring game.
SELECT opponent FROM table_24561550_1 WHERE record = "4-4"
sql_create_context
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...
根据不同的出院诊断疾病名称和科室编码,列出所有医疗就诊记录中患者在医院5280788中的平均年龄是多大?
SELECT qtb.MED_ORG_DEPT_CD, qtb.OUT_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '5280788' GROUP BY qtb.MED_ORG_DEPT_CD, qtb.OUT_DIAG_DIS_NM UNION SELECT gyb.MED_ORG_DEPT_CD, gyb.OUT_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '5280788' GROUP BY gyb.MED_ORG_DEPT_CD, gyb....
css
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
get me the short title of diagnoses and procedure icd9 code for patient with patient id 2110.
SELECT diagnoses.short_title, procedures.icd9_code FROM diagnoses INNER JOIN procedures ON diagnoses.hadm_id = procedures.hadm_id WHERE diagnoses.subject_id = "2110"
mimicsql_data
CREATE TABLE table_name_62 ( type VARCHAR, bie_recognised VARCHAR, year_s_ VARCHAR )
what is the type when the bie recognised is yes and year(s) is 1960?
SELECT type FROM table_name_62 WHERE bie_recognised = "yes" AND year_s_ = "1960"
sql_create_context
CREATE TABLE table_61138 ( "County" text, "Per capita income" text, "Median household income 1,000,000" text, "Median family income" text, "Population" real, "Number of households" real )
What is the lowest number of households for the entry with a median income of $41,778 and a population greater than 38,319?
SELECT MIN("Number of households") FROM table_61138 WHERE "Median family income" = '$41,778' AND "Population" > '38,319'
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, ...
18586184579的检验报告单上的报告日期是哪天呢?
SELECT jybgb.BGRQ FROM jybgb WHERE jybgb.BGDH = '18586184579'
css
CREATE TABLE person_info_hz_info ( RYBH text, KH number, KLX number, YLJGDM 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,...
患者08045413检验的脸部的各项指标结果怎么样?
SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb....
css
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...
患者68633649从10年9月24日到10年10月29日之间医保的统筹基金支出共有多少钱?
SELECT SUM(OVE_PAY) FROM t_kc24 WHERE PERSON_ID = '68633649' AND CLINIC_SLT_DATE BETWEEN '2010-09-24' AND '2010-10-29'
css
CREATE TABLE table_47219 ( "Date" text, "Home team" text, "Score" text, "Away team" text, "Venue" text, "Box Score" text, "Report" text )
When was the game that had Sydney Spirit as the away team?
SELECT "Date" FROM table_47219 WHERE "Away team" = 'sydney spirit'
wikisql
CREATE TABLE table_9766 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What was the attendance at the game before week 8, held on October 25, 1981?
SELECT SUM("Attendance") FROM table_9766 WHERE "Date" = 'october 25, 1981' AND "Week" < '8'
wikisql
CREATE TABLE ship ( Ship_ID int, Name text, Type text, Nationality text, Tonnage int ) CREATE TABLE mission ( Mission_ID int, Ship_ID int, Code text, Launched_Year int, Location text, Speed_knots int, Fate text )
Bar graph to show how many nationality from different nationality, order in descending by the x axis please.
SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Nationality ORDER BY Nationality DESC
nvbench
CREATE TABLE table_9014 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High assists" text, "Location Attendance" text, "Record" text )
What is Score, when High Assists is 'Rajon Rondo (12)', and when High Points is 'Paul Pierce (27)'?
SELECT "Score" FROM table_9014 WHERE "High assists" = 'rajon rondo (12)' AND "High points" = 'paul pierce (27)'
wikisql
CREATE TABLE table_11406 ( "Game" real, "Date" text, "Score" text, "Location" text, "Time" text, "Attendance" real )
what is the attendance on the date of october 16 and the game is more than 5?
SELECT SUM("Attendance") FROM table_11406 WHERE "Date" = 'october 16' AND "Game" > '5'
wikisql
CREATE TABLE table_name_35 ( nationality VARCHAR )
Which Nationality has a 2.24 of xo, and a 2.20 of xo?
SELECT nationality FROM table_name_35 WHERE 224 = "xo" AND 220 = "xo"
sql_create_context
CREATE TABLE table_203_88 ( id number, "language" text, "number" number, "percentage (%)" number, "males" number, "females" number )
the least amount of females
SELECT "language" FROM table_203_88 ORDER BY "females" LIMIT 1
squall
CREATE TABLE player_award ( player_id TEXT, award_id TEXT, year INTEGER, league_id TEXT, tie TEXT, notes TEXT ) CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC, r NUMERIC, h NUMERIC, ...
Plot year by the average of attendance as a line chart, order X-axis in desc order please.
SELECT year, AVG(attendance) FROM home_game GROUP BY year ORDER BY year DESC
nvbench
CREATE TABLE table_23281862_10 ( record VARCHAR, team VARCHAR )
Name the record for charlotte
SELECT record FROM table_23281862_10 WHERE team = "Charlotte"
sql_create_context
CREATE TABLE table_20881 ( "Parameter" text, "1st stage" text, "2nd stage" text, "3rd stage" text, "4th stage" text )
Name the 3rd stage for parameter of thrust
SELECT "3rd stage" FROM table_20881 WHERE "Parameter" = 'Thrust'
wikisql
CREATE TABLE table_13557843_7 ( date VARCHAR, game VARCHAR )
what's the date with game being 72
SELECT date FROM table_13557843_7 WHERE game = 72
sql_create_context
CREATE TABLE table_name_8 ( week INTEGER, result VARCHAR, dance VARCHAR )
What week was she safe for a salsa dance?
SELECT SUM(week) FROM table_name_8 WHERE result = "safe" AND dance = "salsa"
sql_create_context
CREATE TABLE table_76929 ( "Taper" text, "Large end" real, "Small end" real, "Length" real, "Taper/ ft" real, "Taper/ in" real, "Angle from center/\u00b0" real )
Which Angle from center/ has a Taper/ft smaller than 0.6000000000000001?
SELECT COUNT("Angle from center/\u00b0") FROM table_76929 WHERE "Taper/ ft" < '0.6000000000000001'
wikisql
CREATE TABLE table_30011_2 ( equivalent VARCHAR, example VARCHAR )
What is every equivalent for the example of asy28?
SELECT equivalent FROM table_30011_2 WHERE example = "ASY28"
sql_create_context
CREATE TABLE table_name_45 ( overall INTEGER, name VARCHAR, pick__number VARCHAR )
What is the Overall for Pick # less than 5 Jack Harmon?
SELECT MIN(overall) FROM table_name_45 WHERE name = "jack harmon" AND pick__number < 5
sql_create_context
CREATE TABLE table_name_58 ( tournament VARCHAR, top_25 VARCHAR, events VARCHAR, top_5 VARCHAR )
What is the name of the tournament with 11 or more events a top-5 of 0 and a top-25 of 2?
SELECT tournament FROM table_name_58 WHERE events > 11 AND top_5 = 0 AND top_25 = 2
sql_create_context
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, ...
how many patients are diagnosed with unspecified disorder of kidney and ureter and with lab results showing abnormal status?
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 = "Unspecified disorder of kidney and ureter" AND lab.flag = "abnormal"
mimicsql_data
CREATE TABLE volume ( Volume_ID int, Volume_Issue text, Issue_Date text, Weeks_on_Top real, Song text, Artist_ID int ) CREATE TABLE artist ( Artist_ID int, Artist text, Age int, Famous_Title text, Famous_Release_date text ) CREATE TABLE music_festival ( ID int, Musi...
A bar chart for what are the number of the category of music festivals with result 'Awarded'?, could you list Y from low to high order?
SELECT Category, COUNT(Category) FROM music_festival WHERE Result = "Awarded" GROUP BY Category ORDER BY COUNT(Category)
nvbench
CREATE TABLE table_18243 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
Who were the candidates that ran when Jim Moody was up for reelection after 1982?
SELECT "Candidates" FROM table_18243 WHERE "First elected" = '1982'
wikisql
CREATE TABLE table_75824 ( "Season" text, "Competition" text, "Round" text, "Opponent" text, "Home" text, "Away" text, "Series" text )
Which Series has a Home of 2 0, and an Opponent of panathinaikos?
SELECT "Series" FROM table_75824 WHERE "Home" = '2–0' AND "Opponent" = 'panathinaikos'
wikisql
CREATE TABLE table_name_76 ( class_aAAA VARCHAR, school_year VARCHAR )
Name the clas AAAA of school year 2000-01
SELECT class_aAAA FROM table_name_76 WHERE school_year = "2000-01"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
what is the average age of female patients who have angioedema primary disease?
SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "ANGIOEDEMA"
mimicsql_data
CREATE TABLE table_19680 ( "Year" real, "Mens singles" text, "Womens singles" text, "Mens doubles" text, "Womens doubles" text, "Mixed doubles" text )
What was the last year rni r hallgr msson dr fa har ard ttir won mixed doubles
SELECT MAX("Year") FROM table_19680 WHERE "Mixed doubles" = 'Árni Þór Hallgrímsson Drífa Harðardóttir'
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...
Votes on a Post and Date.
SELECT Votes.CreationDate, VoteTypes.Name FROM Votes INNER JOIN VoteTypes ON VoteTypeId = VoteTypes.Id WHERE PostId = @PostId ORDER BY Votes.CreationDate
sede
CREATE TABLE table_name_97 ( away_team VARCHAR )
What is the away team score for South Melbourne?
SELECT away_team AS score FROM table_name_97 WHERE away_team = "south melbourne"
sql_create_context
CREATE TABLE fielding_outfield ( player_id TEXT, year INTEGER, stint INTEGER, glf NUMERIC, gcf NUMERIC, grf NUMERIC ) CREATE TABLE postseason ( year INTEGER, round TEXT, team_id_winner TEXT, league_id_winner TEXT, team_id_loser TEXT, league_id_loser TEXT, wins INTEGE...
Bar chart x axis year y axis the number of year, and list Y-axis from low to high order.
SELECT year, COUNT(year) FROM home_game ORDER BY COUNT(year)
nvbench
CREATE TABLE user ( uid int, user_id varchar, name varchar ) CREATE TABLE review ( rid int, business_id varchar, user_id varchar, rating float, text longtext, year int, month varchar ) CREATE TABLE business ( bid int, business_id varchar, name varchar, full_addr...
Give me all the Moroccan restaurant in Texas
SELECT business.name FROM business, category AS CATEGORY_0, category AS CATEGORY_1 WHERE business.state = 'Texas' AND CATEGORY_0.business_id = business.business_id AND CATEGORY_0.category_name = 'Moroccan' AND CATEGORY_1.business_id = business.business_id AND CATEGORY_1.category_name = 'restaurant'
yelp
CREATE TABLE table_36816 ( "LEMA/SUBLEMA" text, "Candidates" text, "Votes" real, "Ch. of Senators" text, "Ch. of Deputies" text )
Which LEMA/SUBLEMA that has Votes smaller than 218656, and a Ch of Deputies of 0?
SELECT "LEMA/SUBLEMA" FROM table_36816 WHERE "Votes" < '218656' AND "Ch. of Deputies" = '0'
wikisql
CREATE TABLE table_20547 ( "Season" text, "1st Place" text, "2nd Place" text, "3rd Place" text, "4th Place" text )
What seasons did unicaja m laga finish in 3rd?
SELECT "Season" FROM table_20547 WHERE "3rd Place" = 'Unicaja Málaga'
wikisql
CREATE TABLE table_78798 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
What is the Record of the February 26 date?
SELECT "Record" FROM table_78798 WHERE "Date" = 'february 26'
wikisql
CREATE TABLE table_25218 ( "Year" text, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text, "Report" text )
How long in miles (km) was the race that lasted 3:07:53?
SELECT "Miles (km)" FROM table_25218 WHERE "Race Time" = '3:07:53'
wikisql
CREATE TABLE table_38897 ( "Date" text, "Label" text, "Region" text, "Format" text, "Catalog" text )
What is the Label of the release in CD Maxi Format?
SELECT "Label" FROM table_38897 WHERE "Format" = 'cd maxi'
wikisql
CREATE TABLE table_11630008_5 ( season__number INTEGER, series__number VARCHAR )
What was the season number for the episode with the series number 61?
SELECT MAX(season__number) FROM table_11630008_5 WHERE series__number = 61
sql_create_context
CREATE TABLE table_11734041_9 ( player VARCHAR, years_for_rockets VARCHAR )
Which player who played for the Rockets for the years 1986-92?
SELECT player FROM table_11734041_9 WHERE years_for_rockets = "1986-92"
sql_create_context
CREATE TABLE table_204_546 ( id number, "year" number, "film" text, "song" text, "language" text )
how many total languages were there ?
SELECT COUNT(DISTINCT ("language")) FROM table_204_546
squall
CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15), Budget_Type_Description VARCHAR(255) ) CREATE TABLE Statements ( Statement_ID INTEGER, Statement_Details VARCHAR(255) ) CREATE TABLE Documents_with_Expenses ( Document_ID INTEGER, Budget_Type_Code CHAR(15), Document_Details VARCHAR...
Show the number of documents created in each day and bin document date by year interval with a line chart, and rank x-axis from high to low order.
SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code ORDER BY Document_Date DESC
nvbench