context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, va...
the value of mcv of patient 17237 was last measured on the last hospital visit less than second to last 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 = 17237 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 intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age te...
what were the five most frequent microbiological tests that followed within 2 months for patients who received glucose - d50 since 2101?
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'glucose - d50' AND STRFTIME('%y', treatment....
eicu
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number...
Number of upvotes and downvotes by a given user.
SELECT Id AS "user_link", UpVotes, DownVotes FROM Users WHERE Id = '##id##'
sede
CREATE TABLE table_name_34 ( to_par VARCHAR, player VARCHAR )
Which To par has a Player of bernhard langer?
SELECT to_par FROM table_name_34 WHERE player = "bernhard langer"
sql_create_context
CREATE TABLE table_27274222_2 ( valid_votes VARCHAR, province VARCHAR )
When Denizli was the province, what was the total number of valid votes?
SELECT COUNT(valid_votes) FROM table_27274222_2 WHERE province = "Denizli"
sql_create_context
CREATE TABLE table_name_63 ( home VARCHAR, visitor VARCHAR )
Who was the home team that played against the visiting team Minnesota?
SELECT home FROM table_name_63 WHERE visitor = "minnesota"
sql_create_context
CREATE TABLE table_name_83 ( school_club_team VARCHAR, player VARCHAR )
What School/Club Team is Player Howard Wood from?
SELECT school_club_team FROM table_name_83 WHERE player = "howard wood"
sql_create_context
CREATE TABLE table_20546 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written By" text, "Originalairdate" text, "TV Broadcast" text )
Who directed the show that had a TV broadcast of S07E04?
SELECT "Directed by" FROM table_20546 WHERE "TV Broadcast" = 'S07E04'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( vitalperiodicid nu...
in this month, have there been any microbiology tests conducted for patient 025-44495?
SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-44495')) AND DATETIME(microlab.culturetakentime, 'start of month') = DATET...
eicu
CREATE TABLE All_Documents ( Document_ID INTEGER, Date_Stored DATETIME, Document_Type_Code CHAR(15), Document_Name CHAR(255), Document_Description CHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Ref_Locations ( Location_Code CHAR(15), Location_Name VARCHAR(255), Location_Descri...
How many documents in different ending date? Return a line chart binning ending date by year interval, could you rank by the X-axis from low to high?
SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations ORDER BY Date_in_Locaton_To
nvbench
CREATE TABLE table_50567 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What place had a score of 73-69-68=210?
SELECT "Place" FROM table_50567 WHERE "Score" = '73-69-68=210'
wikisql
CREATE TABLE table_30518 ( "Nr." real, "Player" text, "Games played" real, "Starting" real, "Sub" real, "Subbed" real, "Mins played" real, "Goals" real, "Pens. against" real, "Pens. for" real, "Fouls suff." real, "Fouls comm." real, "Yellow C" real, "Red c" real, ...
What is the most number of assists for players with exactly 25 games played?
SELECT MAX("Assists") FROM table_30518 WHERE "Games played" = '25'
wikisql
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...
在15年8月6日到16年2月8日这段时间,患者37516141一共有多少检验报告单,把这些检验报告单的标本采集部位列出来
SELECT jybgb.BBCJBW FROM hz_info JOIN mzjzjlb JOIN jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '37516141' AND jybgb.BGRQ BETWEEN '2015-08-06' AND '2016-02-08' UNI...
css
CREATE TABLE table_201400_2 ( malayalam_name_മലയാളം VARCHAR, tamil_name_தமிழ் VARCHAR )
what is the malayalam name of tamil name punarpoosam
SELECT malayalam_name_മലയാളം FROM table_201400_2 WHERE tamil_name_தமிழ் = "Punarpoosam புனர்பூசம்"
sql_create_context
CREATE TABLE table_70137 ( "Member" text, "Party" text, "Electorate" text, "State" text, "First elected" text )
What is the year First elected when the Member is John Armitage?
SELECT "First elected" FROM table_70137 WHERE "Member" = 'john armitage'
wikisql
CREATE TABLE table_39429 ( "Category" text, "Type" text, "Attribute" text, "Bubbles" text, "Cancelable" text )
Name the cancelable for onmouseover
SELECT "Cancelable" FROM table_39429 WHERE "Attribute" = 'onmouseover'
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 wdmzjzjlb ( CYBQDM text, CYBQ...
名叫孔红艳的病人在2002年11月10日至2007年9月10日内测验人为13231895的所有检验结果指标记录的检验指数的流水号是啥?
SELECT jyjgzbb.JYZBLSH 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 = ...
css
CREATE TABLE table_73040 ( "Position" real, "Gymnast" text, "Floor" text, "Pommel Horse" text, "Rings" text, "Vault" text, "Parallel Bars" text, "Horizontal Bar" text, "Total" text )
If the floor number is 14.200, what is the number for the parallel bars?
SELECT "Parallel Bars" FROM table_73040 WHERE "Floor" = '14.200'
wikisql
CREATE TABLE club_rank ( Rank real, Club_ID int, Gold real, Silver real, Bronze real, Total real ) CREATE TABLE competition ( Competition_ID int, Year real, Competition_type text, Country text ) CREATE TABLE competition_result ( Competition_ID int, Club_ID_1 int, Cl...
What is the number of types of competition?, order in asc by the names.
SELECT Competition_type, COUNT(Competition_type) FROM competition GROUP BY Competition_type ORDER BY Competition_type
nvbench
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...
Return the name of rooms and the number of reservations made for each of the rooms to draw a bar chart.
SELECT roomName, COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room
nvbench
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimme...
Draw a bar chart about the distribution of meter_300 and ID , and rank X-axis in descending order.
SELECT meter_300, ID FROM swimmer ORDER BY meter_300 DESC
nvbench
CREATE TABLE table_name_56 ( class VARCHAR, quantity_preserved VARCHAR, quantity_made VARCHAR )
What class has 0 preserved and 2 made?
SELECT class FROM table_name_56 WHERE quantity_preserved = "0" AND quantity_made = "2"
sql_create_context
CREATE TABLE table_9724 ( "Year" real, "Miss Earth Venezuela" text, "1st Runner Up" text, "2nd Runner Up" text, "3rd Runner Up" text, "4th Runner Up" text )
who is the 4th runner-up when the 2nd runner-up is osmariel villalobos?
SELECT "4th Runner Up" FROM table_9724 WHERE "2nd Runner Up" = 'osmariel villalobos'
wikisql
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ...
ru.SO tags with in wiki.
SELECT TagName, Count, LastEditorUserId, LastEditDate, Body FROM Tags INNER JOIN Posts ON WikiPostId = Posts.Id WHERE Body LIKE '% %' OR Body LIKE '% %' OR Body LIKE N'% %' ORDER BY Count DESC
sede
CREATE TABLE table_name_2 ( Id VARCHAR )
What shows for 2008 when 2010 is 138?
SELECT 2008 FROM table_name_2 WHERE 2010 = "138"
sql_create_context
CREATE TABLE table_47886 ( "Name" text, "Height (m)" real, "Height (ft)" real, "Location" text, "Year built" real )
What is the sum of the heights in meters for the commerzbank tower built after 1984?
SELECT SUM("Height (m)") FROM table_47886 WHERE "Year built" > '1984' AND "Name" = 'commerzbank tower'
wikisql
CREATE TABLE table_71425 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
What was the sum of the years, when the entrant was Scuderia Centro Sud, and when there were 6 points?
SELECT SUM("Year") FROM table_71425 WHERE "Entrant" = 'scuderia centro sud' AND "Points" = '6'
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...
Draw a scatter chart about the correlation between School_ID and All_Games_Percent , and group by attribute ACC_Home.
SELECT School_ID, All_Games_Percent FROM basketball_match GROUP BY ACC_Home
nvbench
CREATE TABLE table_24018112_1 ( brand_name VARCHAR, model__list_ VARCHAR )
What brand is model G6xxx?
SELECT brand_name FROM table_24018112_1 WHERE model__list_ = "G6xxx"
sql_create_context
CREATE TABLE table_17019 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (millions)" text )
Which episode was written by anthony e. zuiker & ken solarz
SELECT "Title" FROM table_17019 WHERE "Written by" = 'Anthony E. Zuiker & Ken Solarz'
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
what is ethnicity of subject id 6983?
SELECT demographic.ethnicity FROM demographic WHERE demographic.subject_id = "6983"
mimicsql_data
CREATE TABLE table_49277 ( "Season" text, "Skip" text, "Third" text, "Second" text, "Lead" text )
Who has the lead in the season where Cathrine Norberg is second and Anna Rindeskog is third?
SELECT "Lead" FROM table_49277 WHERE "Second" = 'cathrine norberg' AND "Third" = 'anna rindeskog'
wikisql
CREATE TABLE table_name_5 ( webcast VARCHAR, website VARCHAR, frequency VARCHAR )
Name the webcast for website of and frequency of 103.3
SELECT webcast FROM table_name_5 WHERE website = "•" AND frequency = 103.3
sql_create_context
CREATE TABLE table_63495 ( "Club" text, "Wins" real, "Losses" real, "Draws" real, "Against" real )
What is the highest number of wins when there are less than 2 losses?
SELECT MAX("Wins") FROM table_63495 WHERE "Losses" < '2'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
列出患者姜浩歌就诊科室在医院1560846中名称包含牙病的所有门诊就诊记录是什么流水号?
SELECT wdmzjzjlb.JZLSH 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 = '1560846' AND wdmzjzjlb.JZKSMC LIKE '%牙病%' UNION SELECT bdmzjzjlb.J...
css
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description...
Question posted with most favorites given the specified tag and duration.
SELECT p1.Title AS "Question", 'http://www.stackoverflow.com/questions/' + CAST(p1.Id AS TEXT) AS "URL", p1.FavoriteCount AS "Favorite Votes" FROM Posts AS p1, PostTypes AS ptypes1, PostTags AS ptags1, Tags AS t1 WHERE p1.PostTypeId = ptypes1.Id AND ptypes1.Id = 1 AND p1.Id = ptags1.PostId AND ptags1.TagId = t1.Id AND ...
sede
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
how many patients died in or before year 2126 due to bowel obstruction?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "BOWEL OBSTRUCTION" AND demographic.dod_year <= "2126.0"
mimicsql_data
CREATE TABLE table_203_271 ( id number, "date" text, "series" text, "circuit" text, "city / state" text, "winner" text, "team" text, "car" text, "report" text )
what was the total number of races ?
SELECT COUNT(*) FROM table_203_271
squall
CREATE TABLE table_name_5 ( tie_no VARCHAR, attendance VARCHAR, home_team VARCHAR )
For the attendance of 2 january 1999 with a home team of plymouth argyle what is the tie no. ?
SELECT tie_no FROM table_name_5 WHERE attendance = "2 january 1999" AND home_team = "plymouth argyle"
sql_create_context
CREATE TABLE table_name_94 ( yacht VARCHAR, loa__metres_ VARCHAR )
What type of yacht has a LOA of 15.15 metres?
SELECT yacht AS Type FROM table_name_94 WHERE loa__metres_ = 15.15
sql_create_context
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 cost ( row_id number, subject_id number, hadm_id nu...
what was the last arterial bp mean of patient 19428 on the current intensive care unit visit.
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 = 19428) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHE...
mimic_iii
CREATE TABLE table_72650 ( "Category" text, "Type" text, "Attribute" text, "Description" text, "Bubbles" text, "Cancelable" text )
what's the attribute with cancelable being yes
SELECT "Attribute" FROM table_72650 WHERE "Cancelable" = 'Yes'
wikisql
CREATE TABLE table_203_763 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text )
what is the higher number of meters listed in the notes section of the table ?
SELECT "notes" FROM table_203_763 ORDER BY "notes" DESC LIMIT 1
squall
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
how many patients were admitted in emergency primarily for brain mass; intracranial hemorrhage ?
SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE"
mimicsql_data
CREATE TABLE table_22835602_1 ( directed_by VARCHAR, production_code VARCHAR )
How many directors were there for the production code 1ark08?
SELECT COUNT(directed_by) FROM table_22835602_1 WHERE production_code = "1ARK08"
sql_create_context
CREATE TABLE table_name_48 ( date VARCHAR, winning_driver VARCHAR )
What date was Rodger Ward the winning driver?
SELECT date FROM table_name_48 WHERE winning_driver = "rodger ward"
sql_create_context
CREATE TABLE table_name_72 ( venue VARCHAR, score VARCHAR )
Where was the game played when the score was 1-4?
SELECT venue FROM table_name_72 WHERE score = "1-4"
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...
医疗机构9550631从零七年二月二十六截止到二零年八月三号这个时间未就业人员就诊花费的医疗费超过了5252.43块的就诊记录数量
SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '9550631' AND IN_HOSP_DATE BETWEEN '2007-02-26' AND '2020-08-03' AND INSURED_STS = '未就业' AND MED_AMOUT >= 5252.43
css
CREATE TABLE table_4299 ( "Year" real, "GDP at constant prices (THB trillions)" text, "GDP at constant prices growth rate (percent change)" text, "GDP at current prices (USD billions)" text, "Export volume of goods and services (percent change)" text, "Current account balance (percent of GDP)" t...
How many current account balances are associated with GDP at constant prices growth rates of 4.6?
SELECT COUNT("Current account balance (percent of GDP)") FROM table_4299 WHERE "GDP at constant prices growth rate (percent change)" = '4.6'
wikisql
CREATE TABLE table_17369472_2 ( points VARCHAR, tries_for VARCHAR )
How many points were there when tries for were 84?
SELECT points FROM table_17369472_2 WHERE tries_for = "84"
sql_create_context
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime...
calculate the one year survival probability of patients that were prescribed amiodarone (cordarone) 150 mg in d5w 100ml bolus after they were diagnosed with acute respiratory failure - due to inability to clear secretions?
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid...
eicu
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
For those records from the products and each product's manufacturer, show me about the distribution of founder and the average of price , and group by attribute founder in a bar chart, and rank in desc by the x-axis.
SELECT Founder, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder DESC
nvbench
CREATE TABLE table_name_18 ( torque VARCHAR, power VARCHAR, trim VARCHAR )
What is the Torque that has a Power of hp (kw), and a Trim of xr (2009)? Question 6
SELECT torque FROM table_name_18 WHERE power = "hp (kw)" AND trim = "xr (2009)"
sql_create_context
CREATE TABLE table_name_51 ( overall INTEGER, college VARCHAR, round VARCHAR )
What's the lowest Overall average that has a College of Arkansas, and a Round larger than 3?
SELECT MIN(overall) FROM table_name_51 WHERE college = "arkansas" AND round > 3
sql_create_context
CREATE TABLE table_22081847_1 ( wins INTEGER )
What was the maximum number of wins?
SELECT MAX(wins) FROM table_22081847_1
sql_create_context
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, ...
i would like to fly from PHILADELPHIA to DALLAS
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 = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'D...
atis
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
在门诊就诊的病人被诊断为结膜炎的,其超敏甲状腺球蛋白数值的平均值以及最值分别是多少
SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE mzjzjlb.JZZDSM = '结膜炎' AND jyjgzbb.JCZBMC = '超敏甲状腺球蛋白'
css
CREATE TABLE table_name_82 ( opponent VARCHAR, score VARCHAR )
What is the Opponent of the game with a Score of 74-66?
SELECT opponent FROM table_name_82 WHERE score = "74-66"
sql_create_context
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE admissions ( row_id number, subject_id number, ...
how many people had been diagnosed with hx of physical abuse until 4 years ago?
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'hx of physical abuse') AND DATETIME(diagnoses_icd.charttim...
mimic_iii
CREATE TABLE table_12728 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
What is the Home team of Tie no 40?
SELECT "Home team" FROM table_12728 WHERE "Tie no" = '40'
wikisql
CREATE TABLE table_203_150 ( id number, "season" number, "series" text, "team" text, "races" number, "wins" number, "poles" number, "f/laps" number, "podiums" number, "points" number, "position" text )
what is nico rosberg 's total number of wins throughout his career ?
SELECT SUM("wins") FROM table_203_150
squall
CREATE TABLE table_10098 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/Junior/Club Team (League)" text )
What college or club team did Dale Mitchell play for?
SELECT "College/Junior/Club Team (League)" FROM table_10098 WHERE "Player" = 'dale mitchell'
wikisql
CREATE TABLE table_47853 ( "Driver" text, "Team" text, "Laps" real, "Time/Retired" text, "Grid" real, "Points" real )
WHAT ARE THE LAPS WITH POINTS LARGER THAN 5, WITH FORSYTHE RACING, AND GRID 5?
SELECT MIN("Laps") FROM table_47853 WHERE "Points" > '5' AND "Team" = 'forsythe racing' AND "Grid" = '5'
wikisql
CREATE TABLE table_27055 ( "Branding" text, "Callsign" text, "Ch. #" text, "Power kW" text, "Station Type" text, "Location (Transmitter site)" text )
What is the power in KW of the transmitter situated in Borongan?
SELECT "Power kW" FROM table_27055 WHERE "Location (Transmitter site)" = 'Borongan'
wikisql
CREATE TABLE table_name_39 ( score VARCHAR )
What's in third place that's going 1-0?
SELECT 3 AS rd_place FROM table_name_39 WHERE score = "1-0"
sql_create_context
CREATE TABLE table_12552 ( "Club" text, "City" text, "Arena" text, "Capacity" real, "Last Year" text )
What is the smallest capacity for Bursa?
SELECT MIN("Capacity") FROM table_12552 WHERE "City" = 'bursa'
wikisql
CREATE TABLE table_name_22 ( week_6 VARCHAR, week_2 VARCHAR, week_3 VARCHAR, week_7 VARCHAR, week_4 VARCHAR )
What is week 6 when week 7, week 4, and week 3 are evicted and week 2 29.35?
SELECT week_6 FROM table_name_22 WHERE week_7 = "evicted" AND week_4 = "evicted" AND week_3 = "evicted" AND week_2 = "29.35"
sql_create_context
CREATE TABLE table_6846 ( "Position" text, "Name" text, "Height (cm)" real, "Weight (kg)" real, "Birthdate" text, "Birthplace" text, "1997\u20131998 Team" text )
What is the Position with a height of less than 183, and a weight of less than 91 kg and born in bloomington, minnesota?
SELECT "Position" FROM table_6846 WHERE "Height (cm)" < '183' AND "Weight (kg)" < '91' AND "Birthplace" = 'bloomington, minnesota'
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...
let me know the time of admission and primary disease of patient michael tyndall.
SELECT demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.name = "Michael Tyndall"
mimicsql_data
CREATE TABLE table_1342013_20 ( incumbent VARCHAR, first_elected VARCHAR )
Who is the incumbent first elected in 1944?
SELECT incumbent FROM table_1342013_20 WHERE first_elected = 1944
sql_create_context
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId numb...
Get Unique technology or programming related keywords.
SELECT * FROM Tags ORDER BY Count DESC
sede
CREATE TABLE table_64445 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Opposition" text )
Which player is from County Dublin?
SELECT "Player" FROM table_64445 WHERE "County" = 'dublin'
wikisql
CREATE TABLE table_203_633 ( id number, "title" text, "year" number, "platform" text, "developer" text, "publisher" text )
the title swat 4 shared the same developer as what other title ?
SELECT "title" FROM table_203_633 WHERE "title" <> 'swat 4' AND "developer" = (SELECT "developer" FROM table_203_633 WHERE "title" = 'swat 4')
squall
CREATE TABLE table_25279 ( "Constituency" text, "Winner" text, "Party" text, "Margin" real, "Runner-up a" text, "Party a" text )
Name the constituency for 175130
SELECT "Constituency" FROM table_25279 WHERE "Margin" = '175130'
wikisql
CREATE TABLE table_3194 ( "Episode #" real, "Production Count" real, "Original Airdate" text, "Prod. Code" text, "Title" text, "Viewing Figures millions" text )
List the 1st air date for the episode titled 'baby talk'.
SELECT "Original Airdate" FROM table_3194 WHERE "Title" = 'Baby Talk'
wikisql
CREATE TABLE table_69341 ( "Position" real, "Club" text, "Played" real, "Points" text, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
What club has less than 61 goals for and 55 goals against?
SELECT "Club" FROM table_69341 WHERE "Goals for" < '61' AND "Goals against" = '55'
wikisql
CREATE TABLE table_name_17 ( enrollment INTEGER, left VARCHAR, current_conference VARCHAR )
What is the lowest enrollment amount for a year left of 2012 and a current conference of Mid-South?
SELECT MIN(enrollment) FROM table_name_17 WHERE left = 2012 AND current_conference = "mid-south"
sql_create_context
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, Acce...
Find Laravel Experts Near Salt Lake City, UT.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Location, Reputation FROM Users WHERE LOWER(Location) LIKE LOWER('%##Location##%') ORDER BY Reputation DESC
sede
CREATE TABLE table_36060 ( "Year" real, "Name" text, "Country" text, "Language(s)" text, "Literary tradition" text )
What nation was the film from that was in english and had a Literary tradition of canadian literature?
SELECT "Country" FROM table_36060 WHERE "Language(s)" = 'english' AND "Literary tradition" = 'canadian literature'
wikisql
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_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, C...
统计年龄不高于26岁的患者医疗记录的平均看病费总额是多少元?
SELECT AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_AGE <= 26)
css
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, ...
编号为82173410的患者的踝部的各项指标检验的结果是什么样?
SELECT * FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE hz_info.RYBH = '82173410' AND jyjgzbb.jybgb_BBCJBW = '踝部' UNION SELECT * FR...
css
CREATE TABLE table_23284271_9 ( location_attendance VARCHAR, record VARCHAR )
List the stadium and number of people in attendance when the team record was 45-22.
SELECT COUNT(location_attendance) FROM table_23284271_9 WHERE record = "45-22"
sql_create_context
CREATE TABLE table_45917 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location/Attendance" text, "Record" text )
WHAT IS THE HIGHEST POINTS FOR LOS ANGELES?
SELECT "High points" FROM table_45917 WHERE "Opponent" = 'los angeles'
wikisql
CREATE TABLE table_42685 ( "Frequency" text, "Call sign" text, "Format" text, "Owner" text, "Notes" text )
What is the Notes of the Frequency with a Format of soft adult contemporary?
SELECT "Notes" FROM table_42685 WHERE "Format" = 'soft adult contemporary'
wikisql
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...
把2002年3月16日到2004年10月26日期间患者鲁和颂总共花了多少医保统筹基金金额查看一下
SELECT SUM(t_kc24.OVE_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '鲁和颂' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-03-16' AND '2004-10-26'
css
CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description ...
top user in every tag.
WITH user_tag AS (SELECT t.TagName, a.OwnerUserId AS "user_link", SUM(a.Score) / 10.0 AS Score, COUNT(a.Score) AS "count", ((SUM(a.Score) / 10.0) + COUNT(a.Score)) / 2.0 AS Total FROM Posts AS a JOIN Posts AS q ON a.ParentId = q.Id JOIN PostTags AS qt ON q.Id = qt.PostId JOIN Tags AS t ON t.Id = qt.TagId WHERE a.PostTy...
sede
CREATE TABLE table_name_15 ( hereditary_peers VARCHAR, total VARCHAR )
Which Hereditary peers have a Total of 1?
SELECT hereditary_peers FROM table_name_15 WHERE total = 1
sql_create_context
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
能知道在2015-12-15到2020-02-16内,患者苗曼青在看病时是哪些工号及姓名的医生给检测茶碱的吗
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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 mzjzj...
css
CREATE TABLE submission ( submission_id number, scores number, author text, college text ) CREATE TABLE workshop ( workshop_id number, date text, venue text, name text ) CREATE TABLE acceptance ( submission_id number, workshop_id number, result text )
Which submission received the highest score in acceptance result. Show me the result.
SELECT T1.result FROM acceptance AS T1 JOIN submission AS T2 ON T1.submission_id = T2.submission_id ORDER BY T2.scores DESC LIMIT 1
spider
CREATE TABLE table_name_42 ( Id VARCHAR )
what 2001 has 1991 of 4r?
SELECT 2001 FROM table_name_42 WHERE 1991 = "4r"
sql_create_context
CREATE TABLE table_18373863_2 ( mlb_team VARCHAR, years_played VARCHAR, fcsl_team VARCHAR )
when deland is the fcsl team and 2008 is the year played who is the mlb team?
SELECT mlb_team FROM table_18373863_2 WHERE years_played = "2008" AND fcsl_team = "DeLand"
sql_create_context
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
provide the number of patients with procedure icd9 code 9229 who died on or before 2126.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2126.0" AND procedures.icd9_code = "9229"
mimicsql_data
CREATE TABLE table_61350 ( "Home (1st leg)" text, "Home (2nd leg)" text, "1st Leg" text, "2nd leg" text, "Aggregate" text )
What was the 2nd leg score when atl tico tucum n played at home?
SELECT "2nd leg" FROM table_61350 WHERE "Home (2nd leg)" = 'atlético tucumán'
wikisql
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE semester ( semester_id int, ...
Is FILMVID 503 available for me to take over the Fall ?
SELECT COUNT(*) > 0 FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN...
advising
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous...
All posts in early January 2017.
SELECT * FROM Posts WHERE MONTH(CreationDate) = 1 AND YEAR(CreationDate) = 2017
sede
CREATE TABLE table_8057 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
What were the high rebounds when the score was l 101 109 (ot)?
SELECT "High rebounds" FROM table_8057 WHERE "Score" = 'l 101–109 (ot)'
wikisql
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) 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 ...
during their last hospital visit what was the insurance plan of patient 29741?
SELECT admissions.insurance FROM admissions WHERE admissions.subject_id = 29741 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1
mimic_iii
CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, JCZBJGDX text, JCZBJGDL number, JCZBJGDW text, SBBM text, YQBH text...
手外的门诊量在03年4月3日到08年5月21之间,是多少?
SELECT COUNT(*) FROM mzjzjlb WHERE JZKSMC = '手外科' AND JZKSRQ BETWEEN '2003-04-03' AND '2008-05-21'
css
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, d...
what was the name of the drug that's been prescribed to patient 006-47576 two times on the current hospital encounter?
SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006...
eicu
CREATE TABLE competition_result ( competition_id number, club_id_1 number, club_id_2 number, score text ) CREATE TABLE player ( player_id number, name text, position text, club_id number, apps number, tries number, goals text, points number ) CREATE TABLE club_rank ( ...
What is the total number of points for all players?
SELECT SUM(points) FROM player
spider