context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, U...
Unanswered questions by active users.
SELECT DisplayName FROM Users WHERE LastAccessDate >= DATEDIFF(d, 2, GETDATE())
sede
CREATE TABLE table_22355_5 ( rank INTEGER )
What's the minimal rank of a athlete shown in the chart?
SELECT MIN(rank) FROM table_22355_5
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 intakeoutput ( in...
when was the first time the heartrate for patient 027-136480 was greater than 122.0 until 12/30/2105?
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-136480')) AND vitalperiodic.heartrate > 122.0 A...
eicu
CREATE TABLE table_name_40 ( finalists VARCHAR, week__number INTEGER )
Tell me the finalists for week # less than 2
SELECT finalists FROM table_name_40 WHERE week__number < 2
sql_create_context
CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE keyphrase ( keyphraseid int, keyphrase...
keyphrases used by Magdalena Balazinska
SELECT DISTINCT keyphrase.keyphraseid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'Magdalena Balazinska' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
scholar
CREATE TABLE table_27129 ( "Wind farm" text, "Installed capacity (MW)" text, "Turbine Manufacturer" text, "County" text, "Date in Service" text )
When did this wind farm started service with a capacity of 135 MW?
SELECT "Date in Service" FROM table_27129 WHERE "Installed capacity (MW)" = '135'
wikisql
CREATE TABLE table_61155 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Notes" text )
Which Year has a Competition of european championships, and Notes of 66.81 m?
SELECT SUM("Year") FROM table_61155 WHERE "Competition" = 'european championships' AND "Notes" = '66.81 m'
wikisql
CREATE TABLE table_1204998_2 ( pinyin VARCHAR, population VARCHAR )
Which pinyin have a population of 374047?
SELECT pinyin FROM table_1204998_2 WHERE population = 374047
sql_create_context
CREATE TABLE table_28714 ( "Monarch" text, "Heir" text, "Status" text, "Relationship to Monarch" text, "Became heir; reason" text, "Ceased to be heir; reason" text, "Next in succession" text )
Who was the heir when the monarch was Wareru?
SELECT "Heir" FROM table_28714 WHERE "Monarch" = 'Wareru'
wikisql
CREATE TABLE table_16284 ( "Rnd" text, "Race Name" text, "Circuit" text, "City/Location" text, "Date" text, "Pole position" text, "Fastest lap" text, "Winning driver" text, "Winning team" text, "Report" text )
In which reports does Michael Andretti have the pole position and Galles-Kraco Racing is the winning team?
SELECT "Report" FROM table_16284 WHERE "Pole position" = 'Michael Andretti' AND "Winning team" = 'Galles-Kraco Racing'
wikisql
CREATE TABLE table_47898 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text, "Position in table" text )
What team did the manager come from who departed due to an end of tenure as caretaker?
SELECT "Team" FROM table_47898 WHERE "Manner of departure" = 'end of tenure as caretaker'
wikisql
CREATE TABLE table_201_25 ( id number, "party" text, "leader" text, "from" text, "to" text )
how many parties had the same leader in office twice ?
SELECT COUNT(DISTINCT "party") FROM table_201_25 GROUP BY "leader" HAVING COUNT("leader") = 2
squall
CREATE TABLE table_name_48 ( virtues VARCHAR, psycho_social_crisis VARCHAR )
What Virtue looks at the intimacy vs. isolation crisis?
SELECT virtues FROM table_name_48 WHERE psycho_social_crisis = "intimacy vs. isolation"
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...
医院1900114中单价最高的患者21485538在被开出的药品编码和名称及其单价分别是?
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '21485538' AND qtb.MED_SER_ORG_NO = '1900114' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '21485538' AND gyb.MED_SER_ORG_NO = '1900...
css
CREATE TABLE table_name_62 ( team__number1 VARCHAR )
What is the 2nd leg with ldu quito as team 1?
SELECT 2 AS nd_leg FROM table_name_62 WHERE team__number1 = "ldu quito"
sql_create_context
CREATE TABLE table_2961 ( "Name" text, "Aperture m" text, "Aper. in" text, "Mirror/type" text, "Nationality/Sponsors" text, "Site" text, "Built/Used" text )
Which aperture were built or used between 1987-2001?
SELECT "Aper. in" FROM table_2961 WHERE "Built/Used" = '1987-2001'
wikisql
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 many days have passed since the last time that patient 027-85328 stayed on the current hospital encounter in the ward 996?
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '027-85328' AND patient.wardid = 996 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime DESC LIMIT 1
eicu
CREATE TABLE table_3248 ( "Party" text, "January 2010" text, "February 2010" text, "March 2010" text, "April 2010" text, "May 2010" text, "June 2010" text )
Name the bed 2010 for 6.5%
SELECT "February 2010" FROM table_3248 WHERE "June 2010" = '6.5%'
wikisql
CREATE TABLE table_name_2 ( team VARCHAR, grid VARCHAR )
What team started in grid 11?
SELECT team FROM table_name_2 WHERE grid = "11"
sql_create_context
CREATE TABLE table_45078 ( "Number notation" real, "Power notation" text, "Short scale" text, "Long scale" text, "Indian (or South Asian) English" text )
For a power notation of 10 12, what is the long scale?
SELECT "Long scale" FROM table_45078 WHERE "Power notation" = '10 12'
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
provide the number of patients whose marital status is single and procedure short title is cv cath plcmt w guidance?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "SINGLE" AND procedures.short_title = "CV cath plcmt w guidance"
mimicsql_data
CREATE TABLE table_24628683_2 ( method_of_elimination VARCHAR, time VARCHAR )
What was the method of elimination in the chamber with a time of 24:02?
SELECT method_of_elimination FROM table_24628683_2 WHERE time = "24:02"
sql_create_context
CREATE TABLE table_18823880_10 ( l2_cache VARCHAR, release_date VARCHAR, part_number_s_ VARCHAR )
When by80607002529af is the part number and september 2009 is the release date what is the l2 cache?
SELECT l2_cache FROM table_18823880_10 WHERE release_date = "September 2009" AND part_number_s_ = "BY80607002529AF"
sql_create_context
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...
这位患者00768748号在医院6769443出院时姓马的医生为其出院诊断出院结果是哪次?
SELECT OUT_DIAG_DIS_CD, OUT_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '00768748' AND MED_SER_ORG_NO = '6769443' AND OUT_DIAG_DOC_NM LIKE '马%'
css
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_...
what are the five most commonly performed procedures for patients who were previously diagnosed with heparin-indu thrombocyto within 2 months, in 2104?
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi...
mimic_iii
CREATE TABLE table_name_62 ( record VARCHAR, time VARCHAR )
What was his record when the match went for 3:05?
SELECT record FROM table_name_62 WHERE time = "3:05"
sql_create_context
CREATE TABLE table_203_590 ( id number, "date" text, "venue" text, "opponents" text, "score" text, "competition" text, "scotland scorer(s)" text )
against which opponent did scotland have no scorers ?
SELECT "opponents" FROM table_203_590 WHERE "score" = 0
squall
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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, ...
count the number of patients with lab test item id 51221 who have abnormal lab test status.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51221" AND lab.flag = "abnormal"
mimicsql_data
CREATE TABLE table_name_60 ( player VARCHAR, score INTEGER )
Can you tell me the Player that has the Score larger than 67?
SELECT player FROM table_name_60 WHERE score > 67
sql_create_context
CREATE TABLE table_204_945 ( id number, "episode" number, "name" text, "synopsis" text, "sent home" text, "highest seller" text )
what was the last episode with two people sent home ?
SELECT "name" FROM table_204_945 WHERE "sent home" = 2 ORDER BY "episode" DESC LIMIT 1
squall
CREATE TABLE table_15431959_1 ( original_air_date VARCHAR, written_by VARCHAR )
What was the original air date of Stargate SG-1 written by Peter Deluise?
SELECT original_air_date FROM table_15431959_1 WHERE written_by = "Peter DeLuise"
sql_create_context
CREATE TABLE table_name_42 ( bronze INTEGER, silver INTEGER )
What is the sum of the bronze medals of the nation with less than 0 silvers?
SELECT SUM(bronze) FROM table_name_42 WHERE silver < 0
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, ...
科室96274从05年2月9日到15年5月8日有多少门诊量?
SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.JZKSBM = '96274' AND wdmzjzjlb.JZKSRQ BETWEEN '2005-02-09' AND '2015-05-08' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.JZKSBM = '96274' AND bdmzjzjlb.JZKSRQ BETWEEN '2005-02-09' AND '2015-05-08'
css
CREATE TABLE table_71910 ( "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text )
Who were the Opponents in the final that played on a carpet (i) Surface?
SELECT "Opponents in the final" FROM table_71910 WHERE "Surface" = 'carpet (i)'
wikisql
CREATE TABLE table_name_46 ( pick VARCHAR, round VARCHAR, name VARCHAR )
Which Pick has a Round larger than 17, and a Name of gene stewart?
SELECT COUNT(pick) FROM table_name_46 WHERE round > 17 AND name = "gene stewart"
sql_create_context
CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE equipment_...
list all flights going from BOSTON to ATLANTA before 500 o'clock am on thursday
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, date_day, days, flight WHERE ((date_day.day_number = 24 AND date_day.month_number = 5 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time...
atis
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, val...
since 2 years ago for the patients of age 60 or above, what were the top three most frequent diagnoses?
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age >= 60) ...
mimic_iii
CREATE TABLE table_12210 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
What is the time where the record is 10-1?
SELECT "Time" FROM table_12210 WHERE "Record" = '10-1'
wikisql
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
exactly how much does patient 19412's arterial bp mean differ last measured on the last icu visit compared to the first value measured on the last icu 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 = 19412) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents...
mimic_iii
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text...
i would like to fly UA from WASHINGTON to DENVER colorado
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 = 'WASHIN...
atis
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId n...
Group by DateTime cut-off point.
WITH Orders AS (SELECT * FROM (VALUES (CAST('2012-01-01 06:10:01' AS DATETIME), 2), ('2012-01-01 08:10:01', 2), ('2012-01-01 10:10:01', 4), ('2012-01-02 08:00:07', 4), ('2012-01-02 10:00:07', 4)) AS Orders(DateReceived, Total)) SELECT CAST(TIME_TO_STR(DATE('datereceived', '-12 hour'), '%Y/%m/%d') AS TEXT(30)) AS "dt_da...
sede
CREATE TABLE table_name_42 ( time VARCHAR, rank VARCHAR, rider VARCHAR )
What is the time value for the rider Brian Finch and a rank greater than 3?
SELECT time FROM table_name_42 WHERE rank > 3 AND rider = "brian finch"
sql_create_context
CREATE TABLE table_name_7 ( home_team VARCHAR, venue VARCHAR )
What was the home team's score at kardinia park?
SELECT home_team AS score FROM table_name_7 WHERE venue = "kardinia park"
sql_create_context
CREATE TABLE table_58087 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What was the result of week 16?
SELECT "Result" FROM table_58087 WHERE "Week" = '16'
wikisql
CREATE TABLE Ship ( Ship_ID int, Name text, Type text, Built_Year real, Class text, Flag text ) CREATE TABLE captain ( Captain_ID int, Name text, Ship_ID int, age text, Class text, Rank text )
How many captains with younger than 50 are in each rank.
SELECT Rank, COUNT(*) FROM captain WHERE age < 50 GROUP BY Rank
nvbench
CREATE TABLE table_67195 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
How many times is brannon condren with and overall more than 131 drafted?
SELECT COUNT("Round") FROM table_67195 WHERE "Name" = 'brannon condren' AND "Overall" > '131'
wikisql
CREATE TABLE table_name_1 ( manufacturer VARCHAR, rider VARCHAR )
Who was the Manufacturer for the Rider Colin Edwards?
SELECT manufacturer FROM table_name_1 WHERE rider = "colin edwards"
sql_create_context
CREATE TABLE table_name_79 ( block INTEGER, director VARCHAR )
What is the lowest block for director Graeme Harper?
SELECT MIN(block) FROM table_name_79 WHERE director = "graeme harper"
sql_create_context
CREATE TABLE grapes ( id number, grape text, color text ) CREATE TABLE wine ( no number, grape text, winery text, appelation text, state text, name text, year number, price number, score number, cases number, drink text ) CREATE TABLE appellations ( no numbe...
What is the color of the grape whose wine products has the highest average price?
SELECT T1.color FROM grapes AS T1 JOIN wine AS T2 ON T1.grape = T2.grape GROUP BY T2.grape ORDER BY AVG(price) DESC LIMIT 1
spider
CREATE TABLE table_name_1 ( capital VARCHAR, voivodeship_separate_city VARCHAR )
what is the capital with the Voivodeship Separate city of bia ostockie?
SELECT capital FROM table_name_1 WHERE voivodeship_separate_city = "białostockie"
sql_create_context
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text...
Draw a bar chart about the distribution of Time and ID , rank by the bars from low to high.
SELECT Time, ID FROM swimmer ORDER BY Time
nvbench
CREATE TABLE table_name_17 ( round INTEGER, position VARCHAR, overall VARCHAR )
Which Round has a Position of qb, and an Overall larger than 6?
SELECT MAX(round) FROM table_name_17 WHERE position = "qb" AND overall > 6
sql_create_context
CREATE TABLE table_11303072_5 ( fielding_team VARCHAR, runs VARCHAR )
What is the fielding team with 155 runs?
SELECT fielding_team FROM table_11303072_5 WHERE runs = "155"
sql_create_context
CREATE TABLE table_name_72 ( loss INTEGER, name VARCHAR, long VARCHAR )
Which Loss has a Name of bullock, chris, and a Long smaller than 36?
SELECT SUM(loss) FROM table_name_72 WHERE name = "bullock, chris" AND long < 36
sql_create_context
CREATE TABLE table_16036 ( "Player" text, "Current singles ranking" text, "Current doubles ranking" text, "First year played" real, "Ties played" real, "Total W\u2013L" text, "Singles W\u2013L" text, "Doubles W\u2013L" text )
What is the Current singles ranking for the player named Mantas Bugaili kis?
SELECT "Current singles ranking" FROM table_16036 WHERE "Player" = 'Mantas Bugailiškis'
wikisql
CREATE TABLE table_77766 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
What time/retired for grid 18?
SELECT "Time/Retired" FROM table_77766 WHERE "Grid" = '18'
wikisql
CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE faculty_participates_in ( facid number, actid number ) CREATE TABLE activity ( actid number, activity_name text ) CREATE TABLE...
Show the ids of the faculty who don't participate in any activity.
SELECT facid FROM faculty EXCEPT SELECT facid FROM faculty_participates_in
spider
CREATE TABLE table_name_20 ( entrant VARCHAR, chassis VARCHAR )
Which entrant had a chassis of March CG891?
SELECT entrant FROM table_name_20 WHERE chassis = "march cg891"
sql_create_context
CREATE TABLE table_34601 ( "Game" real, "February" real, "Opponent" text, "Score" text, "Record" text )
What is the team's record on februrary 23?
SELECT "Record" FROM table_34601 WHERE "February" = '23'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
how many patients whose discharge location is rehab/distinct part hosp and primary disease is syncope;telemetry?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "REHAB/DISTINCT PART HOSP" AND demographic.diagnosis = "SYNCOPE;TELEMETRY"
mimicsql_data
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...
患者何歌韵的免疫球蛋白M(标准)在2007-12-19到2017-04-22期间是怎样的
SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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_MZJZ...
css
CREATE TABLE table_name_94 ( location VARCHAR, tournament VARCHAR )
What is the Location of the byron nelson golf classic?
SELECT location FROM table_name_94 WHERE tournament = "byron nelson golf classic"
sql_create_context
CREATE TABLE table_25923164_1 ( original_air_date VARCHAR, directed_by VARCHAR )
What was the original air date of the episode directed by gloria muzio?
SELECT original_air_date FROM table_25923164_1 WHERE directed_by = "Gloria Muzio"
sql_create_context
CREATE TABLE table_60740 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text )
What was the score in the August 20, 2007 match?
SELECT "Score" FROM table_60740 WHERE "Date" = 'august 20, 2007'
wikisql
CREATE TABLE table_57290 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
Which year has a total of 0 points and a chassis of Toleman tg181?
SELECT AVG("Year") FROM table_57290 WHERE "Points" = '0' AND "Chassis" = 'toleman tg181'
wikisql
CREATE TABLE table_name_51 ( crude_death_rate__per_1000_ INTEGER, deaths VARCHAR, crude_birth_rate__per_1000_ VARCHAR )
Which Crude death rate (per 1000) has Deaths of 768, and a Crude birth rate (per 1000) smaller than 29.7?
SELECT MIN(crude_death_rate__per_1000_) FROM table_name_51 WHERE deaths = "768" AND crude_birth_rate__per_1000_ < 29.7
sql_create_context
CREATE TABLE table_26842217_18 ( broadcast VARCHAR, time VARCHAR, home_team VARCHAR )
Name the broadcast for 7:00pm and mississippi state
SELECT broadcast FROM table_26842217_18 WHERE time = "7:00pm" AND home_team = "Mississippi State"
sql_create_context
CREATE TABLE table_38202 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the highest amount of bronze medals when the rank was larger than 9?
SELECT MAX("Bronze") FROM table_38202 WHERE "Rank" > '9'
wikisql
CREATE TABLE procedures ( 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 ) ...
give me the number of patients whose ethnicity is white and drug route is ivpca?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE" AND prescriptions.route = "IVPCA"
mimicsql_data
CREATE TABLE table_55102 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
In the game where the home team scored 12.14 (86), what was the total crowd number?
SELECT COUNT("Crowd") FROM table_55102 WHERE "Home team score" = '12.14 (86)'
wikisql
CREATE TABLE table_22462 ( "Township" text, "County" text, "Pop. (2010)" real, "Land ( sqmi )" text, "Water (sqmi)" text, "Latitude" text, "Longitude" text, "GEO ID" real, "ANSI code" real )
What is the geo id for Logan county?
SELECT MAX("GEO ID") FROM table_22462 WHERE "County" = 'Logan'
wikisql
CREATE TABLE table_61370 ( "Number" real, "Time" real, "Aircraft" text, "Opponent" text, "Location" text )
Who is the opponent with a time higher than 1040, a Spad xiii aircraft in Dun-Sur-Meuse with a lower number than 22?
SELECT "Opponent" FROM table_61370 WHERE "Time" > '1040' AND "Aircraft" = 'spad xiii' AND "Number" < '22' AND "Location" = 'dun-sur-meuse'
wikisql
CREATE TABLE table_69647 ( "Tournament" text, "Date" text, "Surface" text, "Round" text, "Opponent" text )
Name the date for chris evert opponent and carpet surface
SELECT "Date" FROM table_69647 WHERE "Opponent" = 'chris evert' AND "Surface" = 'carpet'
wikisql
CREATE TABLE table_name_56 ( total INTEGER, nation VARCHAR, bronze VARCHAR )
What is the average total of Italy and has a bronze larger than 1?
SELECT AVG(total) FROM table_name_56 WHERE nation = "italy" AND bronze > 1
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
give me the number of patients whose marital status is single and procedure icd9 code is 8968?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "SINGLE" AND procedures.icd9_code = "8968"
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, ...
how many unmarried patients take medication via left eye?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "SINGLE" AND prescriptions.route = "LEFT EYE"
mimicsql_data
CREATE TABLE table_58981 ( "Outcome" text, "Date" text, "Championship" text, "Surface" text, "Opponent in the final" text, "Score in the final" text )
What Date has a Score in the final of 3 6, 2 6, 4 6?
SELECT "Date" FROM table_58981 WHERE "Score in the final" = '3–6, 2–6, 4–6'
wikisql
CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, basePrice INTEGER, decor TEXT ) CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adul...
What is the average base price of rooms, for each bed type. Show a pie chart.
SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType
nvbench
CREATE TABLE farm_competition ( Competition_ID int, Year int, Theme text, Host_city_ID int, Hosts text ) CREATE TABLE competition_record ( Competition_ID int, Farm_ID int, Rank int ) CREATE TABLE city ( City_ID int, Official_Name text, Status text, Area_km_2 real, P...
Show how many competitions are held in each year with a line chart, I want to list X in desc order.
SELECT Year, COUNT(Year) FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID ORDER BY Year DESC
nvbench
CREATE TABLE table_61830 ( "School" text, "Location" text, "Nickname(s)" text, "Colors" text, "Years Member" text )
What Nickname(s) has a Location of elkville, illinois?
SELECT "Nickname(s)" FROM table_61830 WHERE "Location" = 'elkville, illinois'
wikisql
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttim...
calculate the number of patients who had received a bilirubin, total, ascites test since 6 years ago.
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bilirubin, total, ascites') AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME(), '-6 ye...
mimic_iii
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE T...
Show questions with a body containing capitals only.
SELECT Id AS "post_link", CreationDate, Tags FROM Posts WHERE PostTypeId = 1 AND UPPER(Body) = Body ORDER BY CreationDate
sede
CREATE TABLE table_name_45 ( laps INTEGER, time_retired VARCHAR )
How many laps were driven in 2:54:23.8?
SELECT SUM(laps) FROM table_name_45 WHERE time_retired = "2:54:23.8"
sql_create_context
CREATE TABLE table_name_73 ( high_assists VARCHAR, team VARCHAR )
Who had the most high assists from Milwaukee?
SELECT high_assists FROM table_name_73 WHERE team = "milwaukee"
sql_create_context
CREATE TABLE table_train_201 ( "id" int, "blood_pressure_bilaterally" bool, "creatinine_clearance_cl" float, "total_cholesterol" int, "smoking" bool, "triglyceride_tg" float, "NOUSE" float )
creatinine greater than 2 mg / dl
SELECT * FROM table_train_201 WHERE creatinine_clearance_cl >= 2
criteria2sql
CREATE TABLE table_66622 ( "City of license" text, "Identifier" text, "Frequency" text, "Power" text, "Class" text, "RECNet" text )
What Class has a Frequency of 90.1 FM?
SELECT "Class" FROM table_66622 WHERE "Frequency" = '90.1 fm'
wikisql
CREATE TABLE table_22591910_4 ( position VARCHAR )
who was position 3 in 2007-2008?
SELECT 2007 AS _2008 FROM table_22591910_4 WHERE position = 3
sql_create_context
CREATE TABLE table_35418 ( "Week" real, "Date" text, "Opponent" text, "Time ( ET )" text, "Result" text )
Which week has a Result of w 23 6?
SELECT "Week" FROM table_35418 WHERE "Result" = 'w 23–6'
wikisql
CREATE TABLE table_name_38 ( population___2011_census__ INTEGER, land_area__km²_ INTEGER )
What was the lowest 2011 Census population of an area with a land area larger than 908,607.67 km ?
SELECT MIN(population___2011_census__) FROM table_name_38 WHERE land_area__km²_ > 908 OFFSET 607.67
sql_create_context
CREATE TABLE table_11677100_4 ( player VARCHAR, hometown VARCHAR )
What player is from Spring, Tx?
SELECT player FROM table_11677100_4 WHERE hometown = "Spring, TX"
sql_create_context
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostLinks ( Id number, Crea...
Usu rios vs. Votantes no SOpt.
SELECT (SELECT COUNT(*) FROM Users) AS TotalUsuarios, (SELECT COUNT(*) FROM Users WHERE Reputation >= 15) AS PodemVotar, (SELECT COUNT(*) FROM Users WHERE UpVotes + DownVotes > 0) AS Votaram, (SELECT COUNT(*) FROM Users WHERE UpVotes + DownVotes > 9) AS VotaramDezVezes, (SELECT COUNT(*) FROM Users WHERE Reputation >= 2...
sede
CREATE TABLE table_76034 ( "Tournament" text, "Wins" real, "Top-25" real, "Events" real, "Cuts made" real )
What is the lowest Top-25 with Wins less than 0?
SELECT MIN("Top-25") FROM table_76034 WHERE "Wins" < '0'
wikisql
CREATE TABLE table_2879165_1 ( network_station VARCHAR, country VARCHAR )
What is listed in Network station when the country is Brunei?
SELECT COUNT(network_station) FROM table_2879165_1 WHERE country = "Brunei"
sql_create_context
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...
比较下医疗费明细支出记录22687525523中,药品单价和数目相乘是不是能得到药品的总花费
SELECT (SELECT QTY * UNIVALENT FROM t_kc22 WHERE MED_EXP_DET_ID = '22687525523') = (SELECT AMOUNT FROM t_kc22 WHERE MED_EXP_DET_ID = '22687525523')
css
CREATE TABLE Images ( image_id INTEGER, image_alt_text VARCHAR(80), image_name VARCHAR(40), image_url VARCHAR(255) ) CREATE TABLE Roles ( role_code VARCHAR(15), role_description VARCHAR(80) ) CREATE TABLE Documents ( document_code VARCHAR(15), document_structure_code VARCHAR(15), d...
Bar graph to show the total number from different role code
SELECT role_code, COUNT(*) FROM Users GROUP BY role_code
nvbench
CREATE TABLE table_41519 ( "Date" text, "Cover model" text, "Centerfold model" text, "Interview subject" text, "20 Questions" text )
Who was the Interview Subject when the Centerfold Model was Melissa Deanne Holliday?
SELECT "Interview subject" FROM table_41519 WHERE "Centerfold model" = 'melissa deanne holliday'
wikisql
CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH 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, KLX n...
在检验报告单23063677904中都有哪些类型的检验?
SELECT jybgb.JYLX FROM jybgb WHERE jybgb.BGDH = '23063677904'
css
CREATE TABLE table_2511876_1 ( year VARCHAR, league VARCHAR )
Name the total number of years for usisl pro league
SELECT COUNT(year) FROM table_2511876_1 WHERE league = "USISL Pro league"
sql_create_context
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodici...
for patients who took anticonvulsants , what are the top five most frequent procedures that followed in the same hospital visit?
SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antic...
eicu
CREATE TABLE table_name_70 ( population INTEGER, density VARCHAR, rank VARCHAR )
WHat is the number of Population has a Density of 50.09 and a Rank larger than 30?
SELECT SUM(population) FROM table_name_70 WHERE density = 50.09 AND rank > 30
sql_create_context