context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_52227 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Save" text, "Attendance" real, "Record" text )
What was the Attendance on April 28?
SELECT SUM("Attendance") FROM table_52227 WHERE "Date" = 'april 28'
wikisql
CREATE TABLE table_1793 ( "Position" real, "Club" text, "Games played" real, "Wins" real, "Draws" real, "Loses" real, "Goals scored" real, "Goals conceded" real, "Points" real )
List total loses forh the tauras taurag team.
SELECT COUNT("Loses") FROM table_1793 WHERE "Club" = 'Tauras Tauragė'
wikisql
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, P...
Top Java Comments from Top Questions.
SELECT Id, Score, Text, CreationDate FROM Comments WHERE CreationDate < '2014-10-10' AND PostId IN (SELECT Id FROM Posts WHERE ParentId IN (SELECT Id FROM Posts WHERE Tags LIKE '%<java>%') UNION SELECT Id FROM Posts WHERE Tags LIKE '%<java>%') ORDER BY Score, CreationDate LIMIT 100
sede
CREATE TABLE table_49045 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Record" text )
Who was the opponent on April 2?
SELECT "Opponent" FROM table_49045 WHERE "Date" = 'april 2'
wikisql
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE p...
For the ULCS requirement , which The Global Screen courses are there ?
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%The Global Screen%' OR course.description LIKE '%The Global Screen%' OR course.name LIKE '%The G...
advising
CREATE TABLE table_name_17 ( to_par VARCHAR, total VARCHAR )
How many strokes off par was the player who scored 157?
SELECT COUNT(to_par) FROM table_name_17 WHERE total = 157
sql_create_context
CREATE TABLE table_name_79 ( kk___1 VARCHAR, kk___3 VARCHAR )
What is KK -1 if KK -3 is 1,100?
SELECT kk___1 FROM table_name_79 WHERE kk___3 = "1,100"
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 ...
give me the number of patients whose primary disease is st elevated myocardial infarction\cardiac cath and procedure icd9 code is 7935?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH" AND procedures.icd9_code = "7935"
mimicsql_data
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, ...
tell me the number of patients with chronic pancreatitis diagnoses who are less than 83 years of age.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "83" AND diagnoses.short_title = "Chronic pancreatitis"
mimicsql_data
CREATE TABLE table_name_91 ( played INTEGER, points VARCHAR, drawn VARCHAR, goals_for VARCHAR )
What is the highest number of plays when drawn is more than 4, more than 30 points were earned, and 37 goals scored for the team?
SELECT MAX(played) FROM table_name_91 WHERE drawn > 4 AND goals_for = 37 AND points > 30
sql_create_context
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 allergy ( allergy...
what the first height of patient 006-188114 since 01/2105.
SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-188114') AND NOT patient.admissionheight IS NULL AND STRFTIME('%y-%m', patient.unitadmittime) >= '2105-01' ORDER BY patient.unitadmittime LIMIT 1
eicu
CREATE TABLE table_16952 ( "Date" text, "Tournament" text, "Location" text, "Purse( $ )" real, "Winner" text, "Score" text, "1st Prize( $ )" real )
Where was the GTE Suncoast Classic tournament held?
SELECT "Location" FROM table_16952 WHERE "Tournament" = 'GTE Suncoast Classic'
wikisql
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
医疗就诊67013595973中审核超过11份检验报告单的有哪些人?列出这些审核人工号是什么?姓名是什么?
SELECT SHRGH, SHRXM FROM jybgb WHERE JZLSH = '67013595973' GROUP BY SHRGH HAVING COUNT(*) > 11
css
CREATE TABLE table_name_47 ( venue VARCHAR, date VARCHAR )
Name the venue for march 28, 2008
SELECT venue FROM table_name_47 WHERE date = "march 28, 2008"
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...
计算年龄小于23岁的患者的医疗记录的平均治病费总额数是多少?
SELECT AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc21_t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_AGE < 23)
css
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...
what is the number of patients whose item id is 51259 and lab test abnormal status is delta?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51259" AND lab.flag = "delta"
mimicsql_data
CREATE TABLE table_12099 ( "Date" text, "Epicenter" text, "Magnitude" text, "Intensity" text, "Casualties" text )
How many casualties were in the earthquake with an unknown intensity and an epicenter in the bou ra province?
SELECT "Casualties" FROM table_12099 WHERE "Intensity" = 'unknown' AND "Epicenter" = 'bouïra province'
wikisql
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 are the four most frequent specimen tests given to patients in the same hospital encounter after being diagnosed with hypovolemic shock - hemorrhagic?
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypovolem...
eicu
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...
从2001年1月15日至2009年6月20日期间列举出病人李慧美所有检验结果指标记录中的检测方法吗?
SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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...
css
CREATE TABLE table_40154 ( "Branding" text, "Callsign" text, "Frequency" text, "Power (kW)" text, "Coverage" text )
What is the frequency for the station with DYBT as its callsign?
SELECT "Frequency" FROM table_40154 WHERE "Callsign" = 'dybt'
wikisql
CREATE TABLE Maintenance_Contracts ( maintenance_contract_id INTEGER, maintenance_contract_company_id INTEGER, contract_start_date DATETIME, contract_end_date DATETIME, other_contract_details VARCHAR(255) ) CREATE TABLE Skills ( skill_id INTEGER, skill_code VARCHAR(20), skill_descriptio...
A stacked bar chart showing the number of faults for different fault short name and skills required to fix them The x-axis is skill description and group by fault short name, display by the y axis in descending.
SELECT skill_description, COUNT(skill_description) FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY fault_short_name, skill_description ORDER BY COUNT(skill_description) DESC
nvbench
CREATE TABLE table_58256 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What team was the home team against Melbourne?
SELECT "Home team" FROM table_58256 WHERE "Away team" = 'melbourne'
wikisql
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime tim...
how much was the platelet count change of patient 13782 last measured on the last hospital visit compared to the first value measured on the last hospital visit?
SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13782 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.l...
mimic_iii
CREATE TABLE table_1820752_1 ( spectral_type VARCHAR, constellation VARCHAR )
If the constellation is Gemini, what is the spectral type?
SELECT spectral_type FROM table_1820752_1 WHERE constellation = "Gemini"
sql_create_context
CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Rev...
What percent of Stack Exchange users have a global reputation over 5000?.
SELECT COUNT(Id) * 100 FROM Users WHERE Reputation > 5000 / (SELECT COUNT(Id) FROM Users)
sede
CREATE TABLE table_13448 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "County" text, "Year Joined" real )
When did crawfordsville join?
SELECT MAX("Year Joined") FROM table_13448 WHERE "Location" = 'crawfordsville'
wikisql
CREATE TABLE table_name_98 ( country_of_release VARCHAR, year_of_release VARCHAR )
Where was the title released in 1977?
SELECT country_of_release FROM table_name_98 WHERE year_of_release = 1977
sql_create_context
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 text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
列出郑波涛在8549699的就诊记录里,患者出院科室的名字有关节病字样的住院就诊记录
SELECT * FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '郑波涛' AND hz_info.YLJGDM = '8549699' AND wdmzjzjlb.CYKSMC LIKE '%关节病%' UNION SELECT * FROM person_info JOIN ...
css
CREATE TABLE table_name_62 ( place_of_birth VARCHAR, acquired VARCHAR )
Of those acquired in 2008, where were they born?
SELECT place_of_birth FROM table_name_62 WHERE acquired = 2008
sql_create_context
CREATE TABLE table_name_38 ( wins INTEGER, top_5 VARCHAR, events VARCHAR )
What is the most wins associated with under 4 events with 0 top-5s?
SELECT MAX(wins) FROM table_name_38 WHERE top_5 > 0 AND events < 4
sql_create_context
CREATE TABLE table_262383_1 ( margin VARCHAR, runner_s__up VARCHAR )
what is the space where the next winner is skee riegel
SELECT margin FROM table_262383_1 WHERE runner_s__up = "Skee Riegel"
sql_create_context
CREATE TABLE staff ( staff_id number, staff_details text ) CREATE TABLE policies ( policy_id number, customer_id number, policy_type_code text, start_date time, end_date time ) CREATE TABLE claims_processing_stages ( claim_stage_id number, next_claim_stage_id number, claim_stat...
What are the type codes of the policies used by the customer 'Dayana Robel'?
SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = "Dayana Robel"
spider
CREATE TABLE table_38558 ( "Name" text, "Street address" text, "Years as tallest" text, "Height feet / m" text, "Floors" real )
What's the address of the union bank of California tower?
SELECT "Street address" FROM table_38558 WHERE "Name" = 'union bank of california tower'
wikisql
CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ...
how is the most cited author in ACL ?
SELECT DISTINCT COUNT(DISTINCT cite.citingpaperid), writes.authorid FROM cite, paper, venue, writes WHERE venue.venueid = paper.venueid AND venue.venuename = 'ACL' AND writes.paperid = cite.citedpaperid AND writes.paperid = paper.paperid GROUP BY writes.authorid ORDER BY COUNT(DISTINCT cite.citingpaperid) DESC
scholar
CREATE TABLE table_25042332_31 ( incarceration_rate_total VARCHAR, prison_inmates_women VARCHAR )
How many regions had 153 women prison inmates?
SELECT COUNT(incarceration_rate_total) FROM table_25042332_31 WHERE prison_inmates_women = 153
sql_create_context
CREATE TABLE table_79344 ( "Rank" real, "Heat" real, "Name" text, "Nationality" text, "Result" real )
Which Rank has a Name of tsvetelina kirilova, and a Result smaller than 55.97?
SELECT MAX("Rank") FROM table_79344 WHERE "Name" = 'tsvetelina kirilova' AND "Result" < '55.97'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wa...
what drug was prescribed to patient 005-77687 within 2 days after the procedure of nephrology consultation a month before?
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-77687') AND treatment.treatme...
eicu
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 do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of last_name and department_id , could you rank by the x axis in ascending please?
SELECT LAST_NAME, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME
nvbench
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId nu...
Posts with the most images. Posts containing images, sorted by the number of images.
SELECT Id AS "post_link", LENGTH(Body) - LENGTH(REPLACE(Body, '<img ', '<img')) AS "images", Score, CASE PostTypeId WHEN 1 THEN 'Q' WHEN 2 THEN 'A' ELSE '?' END AS "type", Body FROM Posts WHERE Body LIKE '%<img %' ORDER BY Images DESC
sede
CREATE TABLE table_76320 ( "Game" real, "January" real, "Opponent" text, "Score" text, "Record" text )
Who was the opponent with the record of 15-21-6?
SELECT "Opponent" FROM table_76320 WHERE "Record" = '15-21-6'
wikisql
CREATE TABLE table_29984 ( "Pick" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
For college/junior/club team is brandon wheat kings (whl) mention all the player name
SELECT "Player" FROM table_29984 WHERE "College/junior/club team" = 'Brandon Wheat Kings (WHL)'
wikisql
CREATE TABLE table_name_82 ( bronze INTEGER, silver VARCHAR, gold VARCHAR, rank VARCHAR )
What is the sum of bronzes for teams with more than 2 gold, ranked under 3, and less than 22 silver?
SELECT SUM(bronze) FROM table_name_82 WHERE gold > 2 AND rank < 3 AND silver < 22
sql_create_context
CREATE TABLE table_65277 ( "Manufacturer" text, "Model" text, "Transmission" text, "Engine Capacity" real, "Fuel Type" text, "L/100km Urban (Cold)" real, "L/100km Extra-Urban" real, "L/100km Combined" real, "mpg-UK Urban (Cold)" real, "mpg-UK Extra-Urban" real, "mpg-UK Combin...
What is the mpg-uk combined with an mpg-uk urban (cold) greater than 26.6, a m5 transmission, a diesel fuel type, and an engine capacity less than 1560?
SELECT "mpg-UK Combined" FROM table_65277 WHERE "mpg-UK Urban (Cold)" > '26.6' AND "Transmission" = 'm5' AND "Fuel Type" = 'diesel' AND "Engine Capacity" < '1560'
wikisql
CREATE TABLE table_55076 ( "NGC number" real, "Object type" text, "Constellation" text, "Right ascension ( J2000 )" text, "Declination ( J2000 )" text )
what is the object type when the ngc number is 3314?
SELECT "Object type" FROM table_55076 WHERE "NGC number" = '3314'
wikisql
CREATE TABLE table_name_76 ( money___ INTEGER, score VARCHAR )
What is the highest amount of money a player with a score of 69-71-71-73=284 has?
SELECT MAX(money___) AS $__ FROM table_name_76 WHERE score = 69 - 71 - 71 - 73 = 284
sql_create_context
CREATE TABLE table_80368 ( "Date" text, "Round" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real, "Scorers" text )
Who was in a with opponent St. Johnstone?
SELECT "Scorers" FROM table_80368 WHERE "Venue" = 'a' AND "Opponent" = 'st. johnstone'
wikisql
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...
Give me the comparison about ACC_Percent over the All_Road by a bar chart, and I want to show by the total number from high to low.
SELECT All_Road, ACC_Percent FROM basketball_match ORDER BY ACC_Percent DESC
nvbench
CREATE TABLE table_name_47 ( winner VARCHAR, course VARCHAR )
Who won at course Forl to Carpi?
SELECT winner FROM table_name_47 WHERE course = "forlì to carpi"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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 te...
在2012年9月17日到2021年6月15日内84842097患者被开出的所有检验报告单的检验报告单号一共都有哪些?
SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON 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_MZJZJLB AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH ...
css
CREATE TABLE table_name_55 ( location_attendance VARCHAR, high_points VARCHAR, score VARCHAR )
What is the Location Attendance, when High Points is 'D. McKey (24)', and when Score is 'L 96-105'?
SELECT location_attendance FROM table_name_55 WHERE high_points = "d. mckey (24)" AND score = "l 96-105"
sql_create_context
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 microlab ( microl...
how much does it cost for creatinine lab tests?
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'lab' AND cost.eventid IN (SELECT lab.labid FROM lab WHERE lab.labname = 'creatinine')
eicu
CREATE TABLE table_29473 ( "Team" text, "Head coach" text, "Team captain" text, "Kit maker" text, "Shirt sponsor" text, "Past Season" text )
How many head coaches named Darius Mikaeili?
SELECT COUNT("Head coach") FROM table_29473 WHERE "Team captain" = 'Darius Mikaeili'
wikisql
CREATE TABLE table_name_61 ( nationality VARCHAR, college_country_team VARCHAR )
What nationality was the player whose college team was Georgia Tech?
SELECT nationality FROM table_name_61 WHERE college_country_team = "georgia tech"
sql_create_context
CREATE TABLE table_name_15 ( other VARCHAR, xdsl VARCHAR )
What is the other for a 78.2% xDSL?
SELECT other FROM table_name_15 WHERE xdsl = "78.2%"
sql_create_context
CREATE TABLE table_name_45 ( number_of_seats INTEGER, leader VARCHAR )
What is Jillian Evans highest number of seats?
SELECT MAX(number_of_seats) FROM table_name_45 WHERE leader = "jillian evans"
sql_create_context
CREATE TABLE table_name_68 ( memory_map VARCHAR, model VARCHAR, byte_string VARCHAR, max_memory__kwords_ VARCHAR )
On a Sigma 9 with a standard byte string and more than 128 max memory, what is the value of the memory map?
SELECT memory_map FROM table_name_68 WHERE byte_string = "standard" AND max_memory__kwords_ > 128 AND model = "sigma 9"
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,...
盐酸帕罗西汀片在医疗就诊14864928570中,他的收费项目分多少等级?
SELECT CHA_ITEM_LEV FROM t_kc22 WHERE MED_CLINIC_ID = '14864928570' AND SOC_SRT_DIRE_NM = '盐酸帕罗西汀片'
css
CREATE TABLE table_train_197 ( "id" int, "dyscrasia" bool, "gender" string, "bleeding" int, "hemoglobin_a1c_hba1c" float, "diabetic" string, "body_mass_index_bmi" float, "age" float, "NOUSE" float )
type ii diabetes patients with an hba1c score over 7
SELECT * FROM table_train_197 WHERE diabetic = 'ii' AND hemoglobin_a1c_hba1c > 7
criteria2sql
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...
Show school id vs acc_percent as scatter plot use a different color for each All_Home
SELECT School_ID, ACC_Percent FROM basketball_match GROUP BY All_Home
nvbench
CREATE TABLE table_52361 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text )
What was the record for the game on April 9, 2008?
SELECT "Record" FROM table_52361 WHERE "Date" = 'april 9, 2008'
wikisql
CREATE TABLE table_11860 ( "Rank" real, "Player" text, "Country" text, "Earnings( $ )" real, "Wins" real )
What is the low rank for hale irwin with under 32 wins?
SELECT MIN("Rank") FROM table_11860 WHERE "Player" = 'hale irwin' AND "Wins" < '32'
wikisql
CREATE TABLE table_name_23 ( position VARCHAR, round VARCHAR, college VARCHAR )
What was the position of the player from the college of Nevada with a round over 5?
SELECT position FROM table_name_23 WHERE round > 5 AND college = "nevada"
sql_create_context
CREATE TABLE table_36974 ( "Club" text, "Played" 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 )
Which Club has 1 Losing bonus?
SELECT "Club" FROM table_36974 WHERE "Losing bonus" = '1'
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 person_info_hz_info ( RYBH text, ...
哪些韩志明患者的检验报告单号对应的检验结果指标均异常和检验报告单号都是那个?
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ...
css
CREATE TABLE table_4464 ( "Round" real, "Track" text, "Date" text, "Pole Position" text, "Fastest Lap" text, "Winner" text, "Team" text )
On round 3 for Arting Team Impul, who held pole position?
SELECT "Pole Position" FROM table_4464 WHERE "Team" = 'arting team impul' AND "Round" = '3'
wikisql
CREATE TABLE table_name_24 ( winning_driver VARCHAR, round VARCHAR )
Name the winning driver for round 7
SELECT winning_driver FROM table_name_24 WHERE round = 7
sql_create_context
CREATE TABLE table_36885 ( "Rank" text, "Bowling" text, "Player" text, "Opponent" text, "Venue" text, "Season" text )
What is rank of player Charles Eady and a Bowling of 12/63?
SELECT "Rank" FROM table_36885 WHERE "Player" = 'charles eady' AND "Bowling" = '12/63'
wikisql
CREATE TABLE product_characteristics ( product_id number, characteristic_id number, product_characteristic_value text ) CREATE TABLE ref_product_categories ( product_category_code text, product_category_description text, unit_of_measure text ) CREATE TABLE products ( product_id number, ...
What is the code of the category that the product with the name 'flax' belongs to?
SELECT product_category_code FROM products WHERE product_name = "flax"
spider
CREATE TABLE table_name_49 ( country VARCHAR, player VARCHAR )
What country is Chad Campbell from?
SELECT country FROM table_name_49 WHERE player = "chad campbell"
sql_create_context
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE T...
For all employees who have the letters D or S in their first name, a bar chart shows the distribution of job_id and the sum of manager_id , and group by attribute job_id, could you order by the total number of manager id from low to high?
SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY SUM(MANAGER_ID)
nvbench
CREATE TABLE table_9398 ( "Goalkeeper" text, "Goals" real, "Matches" real, "Average" real, "Team" text )
How many goals were scored on the goalkeeper with fewer than 37 matches and an average of 1.5?
SELECT "Goals" FROM table_9398 WHERE "Matches" < '37' AND "Average" = '1.5'
wikisql
CREATE TABLE table_name_78 ( rank INTEGER, total VARCHAR )
Which average rank has a total of 16?
SELECT AVG(rank) FROM table_name_78 WHERE total = 16
sql_create_context
CREATE TABLE table_name_94 ( rifle VARCHAR, german_gewehr_98 VARCHAR )
What is the Rifle when the German Gewehr 98 is 74cm?
SELECT rifle FROM table_name_94 WHERE german_gewehr_98 = "74cm"
sql_create_context
CREATE TABLE player ( player_id number, player text, team text, age number, position text, school_id number ) CREATE TABLE school_details ( school_id number, nickname text, colors text, league text, class text, division text ) CREATE TABLE school_performance ( schoo...
Show the nicknames of schools that are not in division 1.
SELECT nickname FROM school_details WHERE division <> "Division 1"
spider
CREATE TABLE table_1933 ( "Country" text, "Contestant" text, "Age" real, "Height (cm)" real, "Height (ft)" text, "Hometown" text )
When finland is the country how many hometowns are there?
SELECT COUNT("Hometown") FROM table_1933 WHERE "Country" = 'Finland'
wikisql
CREATE TABLE table_name_81 ( home VARCHAR, league VARCHAR )
What is the home for the league 3rd liga (iii)?
SELECT home FROM table_name_81 WHERE league = "3rd liga (iii)"
sql_create_context
CREATE TABLE table_75000 ( "Medal" text, "Name" text, "Games" text, "Sport" text, "Event" text )
Which Games had a Name of manuel felix diaz?
SELECT "Games" FROM table_75000 WHERE "Name" = 'manuel felix diaz'
wikisql
CREATE TABLE table_name_27 ( visitor VARCHAR, date VARCHAR )
WHAT IS THE VISITOR FOR FEBRUARY 9?
SELECT visitor FROM table_name_27 WHERE date = "february 9"
sql_create_context
CREATE TABLE table_13981938_1 ( village VARCHAR, wine_style VARCHAR, vineyard_surface__2010_ VARCHAR )
what's the village with wine style being red wine and vineyard surface (2010) being hectares (acres)
SELECT village FROM table_13981938_1 WHERE wine_style = "Red wine" AND vineyard_surface__2010_ = "hectares (acres)"
sql_create_context
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, ...
都是什么编号的医疗记录上显示了王霞英这个病人吃的药的价格都高于689.98元的?
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '王霞英' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 689.98)
css
CREATE TABLE table_name_18 ( distance VARCHAR, date VARCHAR )
What is Distance, when Date is '2008-01-12'?
SELECT distance FROM table_name_18 WHERE date = "2008-01-12"
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...
How many patients with item id 50804 had an abnormal delta lab test status?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "50804" AND lab.flag = "delta"
mimicsql_data
CREATE TABLE table_name_35 ( longitude VARCHAR, name VARCHAR )
What is the longitude of Angerona Tholus?
SELECT longitude FROM table_name_35 WHERE name = "angerona tholus"
sql_create_context
CREATE TABLE table_79296 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
What is Elizabeth Simmonds' average lane number?
SELECT AVG("Lane") FROM table_79296 WHERE "Name" = 'elizabeth simmonds'
wikisql
CREATE TABLE table_18481791_3 ( title VARCHAR, us_viewers__in_millions_ VARCHAR )
What is the title when u.s. viewers (millions) is 3.97?
SELECT title FROM table_18481791_3 WHERE us_viewers__in_millions_ = "3.97"
sql_create_context
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, war...
did patient 27463 undergone cardiac mapping procedure?
SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'cardiac mapping') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27463)
mimic_iii
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...
患者苏晓莉检验下肢的各项指标结果如何?
SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM...
css
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( medication...
what is the average cost of a hospital bill that includes a drug called 1 ml vial: lorazepam 2 mg/ml ij soln during this year?
SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = '1 ml vial: lorazepam 2 mg/ml ij soln')) AND DA...
eicu
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...
列出患者金鸿轩就诊科室名称不包含产科的在医院3113072中所有门诊就诊记录是什么流水号?
SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb 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.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND ...
css
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_items ( row_id number, ...
what's the change in the heart rate of patient 5828 second measured on the current intensive care unit visit compared to the first value measured on the current intensive care unit visit?
SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5828) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_it...
mimic_iii
CREATE TABLE table_30997 ( "Episode" real, "Date" text, "Official rating 4+" text, "Share 4+" text, "Official rating 16-39" text, "Share 16-39" text )
When did the official rating 4+ reach 4 633 925?
SELECT "Date" FROM table_30997 WHERE "Official rating 4+" = '4 633 925'
wikisql
CREATE TABLE table_18614 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text )
how many party with candidates being john j. phillips (r) 57.6% n. e. west (d) 42.4%
SELECT COUNT("Party") FROM table_18614 WHERE "Candidates" = 'John J. Phillips (R) 57.6% N. E. West (D) 42.4%'
wikisql
CREATE TABLE table_9656 ( "Artist" text, "Title" text, "Label" text, "Number" text, "Date" real )
What is the latest date that has a serial number of Infec 107CDSX?
SELECT MAX("Date") FROM table_9656 WHERE "Number" = 'infec 107cdsx'
wikisql
CREATE TABLE table_50261 ( "Tournament" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text )
What is the 2005 value for the 2010 grand slam tournaments?
SELECT "2005" FROM table_50261 WHERE "2010" = 'grand slam tournaments'
wikisql
CREATE TABLE table_name_64 ( notes VARCHAR, year VARCHAR, position VARCHAR )
What Notes after 1983 have a Position of 18th?
SELECT notes FROM table_name_64 WHERE year > 1983 AND position = "18th"
sql_create_context
CREATE TABLE table_13291 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "IHSAA Football Class" text, "# / County" text )
Which School has a Location of peru?
SELECT "School" FROM table_13291 WHERE "Location" = 'peru'
wikisql
CREATE TABLE table_14752049_3 ( change__2009_to_2010_ VARCHAR, international_tourist_arrivals__2011_ VARCHAR )
Name the change 2009 to 2010 where international tourist arrivals is 9.4 million
SELECT change__2009_to_2010_ FROM table_14752049_3 WHERE international_tourist_arrivals__2011_ = "9.4 million"
sql_create_context
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, ...
患者68633649从10年9月24日到10年10月29日之间医保的统筹基金支出共有多少钱?
SELECT SUM(t_kc24.OVE_PAY) FROM t_kc24 WHERE t_kc24.PERSON_ID = '68633649' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2010-09-24' AND '2010-10-29'
css
CREATE TABLE table_name_92 ( player VARCHAR, long VARCHAR, yards VARCHAR )
Can you tell me the Player that has the Long larger than 28, and the Yards of 222?
SELECT player FROM table_name_92 WHERE long > 28 AND yards = 222
sql_create_context
CREATE TABLE table_22087 ( "Team / Competition" text, "2008 Suruga Bank Championship" text, "2008 Recopa Sudamericana" text, "2008 Copa Sudamericana" text, "2009 Copa Libertadores" text )
how many times did estudiantes de la plata participate in 2008 suruga bank championship
SELECT COUNT("2008 Suruga Bank Championship") FROM table_22087 WHERE "Team / Competition" = 'Estudiantes de La Plata'
wikisql