context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_name_9 ( record VARCHAR, loss VARCHAR )
What is the record number of the game where Guardado lost?
SELECT record FROM table_name_9 WHERE loss = "guardado"
sql_create_context
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time...
on tuesday i'd like to fly from DETROIT to ST. PETERSBURG
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 (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST. PETERSBURG' AND date_day.day_number = 22 AND date_day.month_number = ...
atis
CREATE TABLE table_33648 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which team's home is the Western Oval?
SELECT "Home team" FROM table_33648 WHERE "Venue" = 'western oval'
wikisql
CREATE TABLE table_3259 ( "Date" text, "Time (ET)" text, "Event #" real, "Event" text, "Winner" text, "Prize" text, "Entries" text, "Prize Pool" text, "Elapsed Time" text )
Name the entries for 6 h 23 min elapsed time
SELECT "Entries" FROM table_3259 WHERE "Elapsed Time" = '6 h 23 min'
wikisql
CREATE TABLE table_17429402_7 ( school VARCHAR, last_occ_championship VARCHAR )
How many schools won their last occ championship in 2006?
SELECT COUNT(school) FROM table_17429402_7 WHERE last_occ_championship = "2006"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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...
列出患者奚妮娜的检验报告单中结果指标均正常的检验报告单号
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb 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 AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '奚...
css
CREATE TABLE table_name_99 ( record VARCHAR, home VARCHAR, visitor VARCHAR )
What record has detroit as the home and mtl. maroons as the visitor?
SELECT record FROM table_name_99 WHERE home = "detroit" AND visitor = "mtl. maroons"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
give me the number of patients whose admission year is less than 2156 and drug name is fentanyl citrate?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2156" AND prescriptions.drug = "Fentanyl Citrate"
mimicsql_data
CREATE TABLE table_43114 ( "Player" text, "Club" text, "League" real, "FA Cup" real, "FA Trophy" real, "League Cup" real, "Total" real )
How many FA Trophy has a Total larger than 17 and a Player of david gamble and a League Cup larger than 0?
SELECT COUNT("FA Trophy") FROM table_43114 WHERE "Total" > '17' AND "Player" = 'david gamble' AND "League Cup" > '0'
wikisql
CREATE TABLE table_45373 ( "Stage" text, "Winner" text, "General Classification" text, "Mountains Classification" text, "Points Classification" text, "Sprints classification" text, "Team Classification" text )
What is the Mountains Classification for Winner jos luis carrasco?
SELECT "Mountains Classification" FROM table_45373 WHERE "Winner" = 'josé luis carrasco'
wikisql
CREATE TABLE table_name_13 ( figures INTEGER, total INTEGER )
What is the sum of the figure skating scores whose total is less than 117.78?
SELECT SUM(figures) FROM table_name_13 WHERE total < 117.78
sql_create_context
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
has any microbiology test been performed on patient 96774 since 148 months ago?
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 96774) AND DATETIME(microbiologyevents.charttime) >= DATETIME(CURRENT_TIME(), '-148 month')
mimic_iii
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 prescriptions ( subject_id text, hadm_id...
how many patients whose admission type is emergency and age is less than 67?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.age < "67"
mimicsql_data
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate tim...
List of user's edit summaries. not sure what to make of all this
SELECT Comment AS "Edit summary", MAX(CreationDate) AS "Date", AVG(PostId) AS "post_link" FROM PostHistory AS ph, PostHistoryTypes AS pht WHERE UserId = 9314 AND PostHistoryTypeId = pht.Id AND pht.Id != 2 AND pht.Id != 6 AND NOT Comment IS NULL GROUP BY Comment ORDER BY MAX(CreationDate)
sede
CREATE TABLE table_name_96 ( drawn VARCHAR, points_against VARCHAR )
What was the draw when the points against was 234?
SELECT drawn FROM table_name_96 WHERE points_against = "234"
sql_create_context
CREATE TABLE table_47829 ( "Round" real, "Pick #" real, "Player" text, "Position" text, "College" text )
What is the highest pick # after round 11?
SELECT MAX("Pick #") FROM table_47829 WHERE "Round" > '11'
wikisql
CREATE TABLE table_name_85 ( no9 VARCHAR, no6 VARCHAR )
Who is the no. 9 team that has a no. 6 player of paulo?
SELECT no9 FROM table_name_85 WHERE no6 = "paulo"
sql_create_context
CREATE TABLE table_name_89 ( ship_size VARCHAR )
What ship size had a cargo value of $46,000 in 2006?
SELECT ship_size FROM table_name_89 WHERE 2006 = "$46,000"
sql_create_context
CREATE TABLE table_10361230_1 ( round INTEGER, position VARCHAR )
Where does the defensive back position appear first?
SELECT MIN(round) FROM table_10361230_1 WHERE position = "Defensive Back"
sql_create_context
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, Mark...
Open posts with body character count of 25 or less sorted (asc) by vote count. Looking at open posts with less than 26 characters in it by vote count.
SELECT ParentId AS "post_link", Body, LENGTH(Body), Score FROM Posts WHERE PostTypeId = 2 AND LENGTH(Body) < 25 AND ClosedDate IS NULL ORDER BY Score
sede
CREATE TABLE table_29133 ( "English" text, "Proto-Semitic" text, "IPA" text, "Arabic" text, "Hebrew" text, "Tigrinya" text, "Sabaean" text )
Name the hebrew for tis -
SELECT "Hebrew" FROM table_29133 WHERE "Arabic" = 'tisʕ-'
wikisql
CREATE TABLE table_1048 ( "Series #" real, "Season #" real, "Title" text, "Story by" text, "Teleplay by" text, "Directed by" text, "Original air date" text )
What was the series number of the episode directed by Rob Bailey?
SELECT MAX("Series #") FROM table_1048 WHERE "Directed by" = 'Rob Bailey'
wikisql
CREATE TABLE table_13340 ( "Name" text, "Platform" text, "Indication" text, "Status" text, "Collaboration" text )
What did the phase 2b status target?
SELECT "Indication" FROM table_13340 WHERE "Status" = 'phase 2b'
wikisql
CREATE TABLE table_44774 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
What was the tie number when bradford park avenue was the away team?
SELECT "Tie no" FROM table_44774 WHERE "Away team" = 'bradford park avenue'
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...
what is marital status and age of subject id 2560?
SELECT demographic.marital_status, demographic.age FROM demographic WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
for patient id 9575, specify the duration of hospital stay and death status.
SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "9575"
mimicsql_data
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod...
how did patient 6990 enter the hospital for the last time?
SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 6990 ORDER BY admissions.admittime DESC LIMIT 1
mimic_iii
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
患者尤永年被门诊诊断为疾病I64.781,他的检测指标661673的结果定量及单位是怎么样的
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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 = j...
css
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
what is the number of patients whose primary disease is st elevated myocardial infarction\cardiac cath and procedure icd9 code is 9465?
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 = "9465"
mimicsql_data
CREATE TABLE table_69105 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
Which opponent has a Loss of corcoran (4-4)?
SELECT "Opponent" FROM table_69105 WHERE "Loss" = 'corcoran (4-4)'
wikisql
CREATE TABLE table_name_7 ( artist VARCHAR, genre VARCHAR )
Who is the artist of the rock song?
SELECT artist FROM table_name_7 WHERE genre = "rock"
sql_create_context
CREATE TABLE table_28214 ( "Countries and Territories" text, "Conditions of access" text, "Length of stay permitted" text, "Fee (if applicable)" text, "Access using a Croatian identity card" text )
Can one access the Faroe Islands using a Croatian identity card?
SELECT "Access using a Croatian identity card" FROM table_28214 WHERE "Countries and Territories" = 'Faroe Islands'
wikisql
CREATE TABLE table_name_66 ( score VARCHAR, date VARCHAR, time VARCHAR )
What is the score on 15 Aug with a 17:30 time?
SELECT score FROM table_name_66 WHERE date = "15 aug" AND time = "17:30"
sql_create_context
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC...
从2009年9月11日直到17年9月26日为止编号为52631015的作为检查人对患者15672063所有检验结果指标记载的检验指标流水号都是啥?
SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.B...
css
CREATE TABLE table_70716 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
What is the name of the opponent that has a record of 66-69?
SELECT "Opponent" FROM table_70716 WHERE "Record" = '66-69'
wikisql
CREATE TABLE table_name_57 ( rank INTEGER, country VARCHAR )
What is the lowest ranking team in Australia?
SELECT MIN(rank) FROM table_name_57 WHERE country = "australia"
sql_create_context
CREATE TABLE table_64832 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the lowest silver that has 1 for the bronze, 1 as the total, 17 as the rank, with a gold less than 0?
SELECT MIN("Silver") FROM table_64832 WHERE "Bronze" = '1' AND "Total" = '1' AND "Rank" = '17' AND "Gold" < '0'
wikisql
CREATE TABLE host ( Host_ID int, Name text, Nationality text, Age text ) CREATE TABLE party ( Party_ID int, Party_Theme text, Location text, First_year text, Last_year text, Number_of_hosts int ) CREATE TABLE party_host ( Party_ID int, Host_ID int, Is_Main_in_Charge...
Give me a bar chart, that group by location and count them, rank x axis in ascending order.
SELECT Location, COUNT(Location) FROM party GROUP BY Location ORDER BY Location
nvbench
CREATE TABLE table_35767 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
Name the date with chicago visiting
SELECT "Date" FROM table_35767 WHERE "Visitor" = 'chicago'
wikisql
CREATE TABLE AssignedTo ( Scientist int, Project char(4) ) CREATE TABLE Projects ( Code Char(4), Name Char(50), Hours int ) CREATE TABLE Scientists ( SSN int, Name Char(30) )
Find the number of scientists involved for each project name, I want to sort the total number in descending order.
SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project GROUP BY T1.Name ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_24646 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" text, "Avg. Finish" text, "Winnings" text, "Position" text, "Team(s)" text )
What was the position of the team with an average finish of 21.5?
SELECT "Position" FROM table_24646 WHERE "Avg. Finish" = '21.5'
wikisql
CREATE TABLE table_80073 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
How many bronzes have a Nation of jamaica (jam), and a Total smaller than 7?
SELECT COUNT("Bronze") FROM table_80073 WHERE "Nation" = 'jamaica (jam)' AND "Total" < '7'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost numbe...
when was the first time patient 027-107035 in this year received a antihypertensives - labetalol procedure?
SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-107035')) AND treatment.treatmentname = 'antihypertensives - ...
eicu
CREATE TABLE table_66392 ( "Year" real, "Title" text, "Type" text, "Label" text, "Label-Nr" text )
What is the song title on the Pacific Jazz label, and a Label-Nr of st-20124?
SELECT "Title" FROM table_66392 WHERE "Label" = 'pacific jazz' AND "Label-Nr" = 'st-20124'
wikisql
CREATE TABLE table_name_77 ( time VARCHAR, lane VARCHAR )
What was the time of the swimmer in lane 7?
SELECT time FROM table_name_77 WHERE lane = 7
sql_create_context
CREATE TABLE table_48177 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
what is the competition when the score is 2-1?
SELECT "Competition" FROM table_48177 WHERE "Score" = '2-1'
wikisql
CREATE TABLE table_name_32 ( grid INTEGER, laps INTEGER )
When the laps are over 53, what's the average grid?
SELECT AVG(grid) FROM table_name_32 WHERE laps > 53
sql_create_context
CREATE TABLE table_25604 ( "Star" text, "Stellar classification" text, "Distance from Earth ( ly )" text, "Constellation" text, "Dust (or Debris; Temperature (K)" text, "System" text, "Dust (or Debris) Location (AU)" text, "Cool Dust > 10 AU" text, "Stellar Age (Myr)" text )
Name number of stellar classification for 3 neptune planets < 1 au
SELECT COUNT("Stellar classification") FROM table_25604 WHERE "System" = '3 Neptune planets < 1 AU'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number...
how many prescription drugs are ordered for patient 003-83?
SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-83'))
eicu
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
Questions that I haven't voted on.
SELECT Posts.Id FROM Posts JOIN Votes ON Posts.Id = Votes.PostId WHERE Votes.UserId = 3169
sede
CREATE TABLE table_name_97 ( director VARCHAR, year VARCHAR, role VARCHAR )
Who directed the eula goodnight movie after 1949?
SELECT director FROM table_name_97 WHERE year > 1949 AND role = "eula goodnight"
sql_create_context
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
病人韦嘉泽有多少次医院是在03年3月16日到12年1月12日内去的?
SELECT (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '韦嘉泽' AND mzjzjlb.JZKSRQ BETWEEN '2003-03-16' AND '2012-01-12') + (SELECT COUNT(*) FROM person_info J...
css
CREATE TABLE table_name_17 ( crowd INTEGER, venue VARCHAR )
How many people attended Junction Oval?
SELECT SUM(crowd) FROM table_name_17 WHERE venue = "junction oval"
sql_create_context
CREATE TABLE table_48550 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
Who is the home team with a tie no. 12?
SELECT "Home team" FROM table_48550 WHERE "Tie no" = '12'
wikisql
CREATE TABLE table_name_58 ( party VARCHAR, representative VARCHAR )
Which party did Thomas L. Young belong to?
SELECT party FROM table_name_58 WHERE representative = "thomas l. young"
sql_create_context
CREATE TABLE table_23944006_4 ( surface VARCHAR, score VARCHAR )
Name the number of surfaces for 4-6, 2-6
SELECT COUNT(surface) FROM table_23944006_4 WHERE score = "4-6, 2-6"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospita...
until 24 months ago, list the monthly average systemicsystolic of patient 008-57160.
SELECT AVG(vitalperiodic.systemicsystolic) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '008-57160')) AND NOT vitalperiodic.systemicsy...
eicu
CREATE TABLE table_name_78 ( serials_issued VARCHAR, design VARCHAR )
Which serials were issued with a design of black on yellow?
SELECT serials_issued FROM table_name_78 WHERE design = "black on yellow"
sql_create_context
CREATE TABLE table_26859 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "FLaps" real, "Podiums" real, "Points" text, "Position" text )
Name the least flaps
SELECT MIN("FLaps") FROM table_26859
wikisql
CREATE TABLE table_6792 ( "Event" text, "Record" text, "Nation" text, "Date" text, "Venue" text )
What is the Nation with a Record that is 7.39?
SELECT "Nation" FROM table_6792 WHERE "Record" = '7.39'
wikisql
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 number, appelation text, county text, state text, area text,...
What are the names of wines, sorted by price ascending?
SELECT DISTINCT name FROM wine ORDER BY price
spider
CREATE TABLE table_1013129_11 ( nationality VARCHAR, player VARCHAR )
What is the nationality of Shayne Wright?
SELECT nationality FROM table_1013129_11 WHERE player = "Shayne Wright"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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,...
患者的门诊诊断为疾病E91.673的苯妥因的参考值范围下限是什么?上限是什么?
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE zzmzjzjlb.JZZDBM = 'E91.673' AND jyjgzbb.JCZBMC = '苯妥因' UNION SELECT jyjgzbb.CKZFWXX, ...
css
CREATE TABLE table_72356 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
In what district was the incumbent Steve Chabot?
SELECT "District" FROM table_72356 WHERE "Incumbent" = 'Steve Chabot'
wikisql
CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREAT...
Create a bar chart showing the total number across city code, and I want to show in ascending by the y-axis.
SELECT city_code, COUNT(*) FROM Student GROUP BY city_code ORDER BY COUNT(*)
nvbench
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, ...
give me the number of patients whose ethnicity is asian and drug name is glyburide?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "ASIAN" AND prescriptions.drug = "GlyBURIDE"
mimicsql_data
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 procedure icd9 code and procedure short title of subject name michelle skidmore?
SELECT procedures.icd9_code, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Michelle Skidmore"
mimicsql_data
CREATE TABLE table_name_16 ( danish_title VARCHAR, year VARCHAR, director VARCHAR )
Prior to 1978, what is the Danish of the Film directed by Bent Christensen?
SELECT danish_title FROM table_name_16 WHERE year < 1978 AND director = "bent christensen"
sql_create_context
CREATE TABLE table_204_279 ( id number, "name of place" text, "number\nof\ncounties" number, "principal\ncounty" text, "zip code\nlower" number, "zip code\nupper" number )
what is the name of the place listed after dallas ?
SELECT "name of place" FROM table_204_279 WHERE id = (SELECT id FROM table_204_279 WHERE "name of place" = 'dallas') + 1
squall
CREATE TABLE table_name_95 ( time VARCHAR, release_date VARCHAR, song_title VARCHAR )
Tell me the time for 6/6/77 release date and song title of way down
SELECT time FROM table_name_95 WHERE release_date = "6/6/77" AND song_title = "way down"
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 diagnoses ( ...
calculate the total number of patients aged below 86 who had wheelchair dependence
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "86" AND diagnoses.long_title = "Wheelchair dependence"
mimicsql_data
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
what is the number of patients whose ethnicity is american indian/alaska native and year of birth is less than 1879?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.dob_year < "1879"
mimicsql_data
CREATE TABLE table_203_36 ( id number, "parish" text, "locality" text, "parish priest" text, "founded" number, "closed" number )
how many parishes were founded before 1900 ?
SELECT COUNT("parish") FROM table_203_36 WHERE "founded" < 1900
squall
CREATE TABLE table_name_82 ( team VARCHAR, college VARCHAR )
What team has a player from Santa Clara?
SELECT team FROM table_name_82 WHERE college = "santa clara"
sql_create_context
CREATE TABLE table_train_191 ( "id" int, "gender" string, "hemoglobin_a1c_hba1c" float, "diabetic" string, "serum_creatinine" float, "allergy_to_glyburide" bool, "kidney_disease" bool, "drug_abuse" bool, "age" float, "NOUSE" float )
history or evidence of chronic kidney disease ( serum creatinine > 1.5 mg / dl ) .
SELECT * FROM table_train_191 WHERE kidney_disease = 1 OR serum_creatinine > 1.5
criteria2sql
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...
把2006年9月3日到2009年2月7日期间患者82114728总共花了多少医保统筹基金金额查看一下
SELECT SUM(OVE_PAY) FROM t_kc24 WHERE PERSON_ID = '82114728' AND CLINIC_SLT_DATE BETWEEN '2006-09-03' AND '2009-02-07'
css
CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE T...
i would like the cheapest flight from BOSTON to SAN FRANCISCO
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1....
atis
CREATE TABLE mzb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
编号是89718939232的医疗就诊用的是哪个门诊号或住院号
SELECT qtb.CLINIC_ID FROM qtb WHERE qtb.MED_CLINIC_ID = '89718939232' UNION SELECT gyb.CLINIC_ID FROM gyb WHERE gyb.MED_CLINIC_ID = '89718939232' UNION SELECT zyb.CLINIC_ID FROM zyb WHERE zyb.MED_CLINIC_ID = '89718939232' UNION SELECT mzb.CLINIC_ID FROM mzb WHERE mzb.MED_CLINIC_ID = '89718939232'
css
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE prescriptions ( row_id number, subject_id number,...
there is a microbiology test result for patient 2238 since 2 years ago?
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2238) AND DATETIME(microbiologyevents.charttime) >= DATETIME(CURRENT_TIME(), '-2 year')
mimic_iii
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
what is the number of patients whose marital status is divorced and admission year is less than 2152?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "DIVORCED" AND demographic.admityear < "2152"
mimicsql_data
CREATE TABLE table_15370 ( "Year" real, "Song" text, "Album" text, "Language" text, "Composer" text )
What 2013 album was produced by sachin-jigar and contained the song 'mann basiyo sanwariyo'?
SELECT "Album" FROM table_15370 WHERE "Composer" = 'sachin-jigar' AND "Year" = '2013' AND "Song" = 'mann basiyo sanwariyo'
wikisql
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 prescriptions ( subject_id text, hadm_id...
what is the number of patients whose gender is m and diagnoses long title is dysthymic disorder?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.long_title = "Dysthymic disorder"
mimicsql_data
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...
患者体征在门诊就诊69843663895中,记录日期是几号?
SELECT wdmzjzjlb.JLSJ FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '69843663895' UNION SELECT bdmzjzjlb.JLSJ FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '69843663895'
css
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
有多少检验报告单是病人48698459在00年9月24日到2010年6月21日内开出其科室编码以及名称都是什么?
SELECT jybgb.KSBM, jybgb.KSMC 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 = '48698459' AND jybgb.BGRQ BETWEEN '2000-09-24' AND '2010-...
css
CREATE TABLE table_203_204 ( id number, "year" number, "film" text, "language" text, "actors" text, "music" text, "banner" text, "note" text )
how many total movies did m.s. viswanathan do the music for ?
SELECT COUNT("film") FROM table_203_204 WHERE "music" = 'm. s. viswanathan'
squall
CREATE TABLE table_43777 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text )
What is ICAO, when IATA is 'HKG'?
SELECT "ICAO" FROM table_43777 WHERE "IATA" = 'hkg'
wikisql
CREATE TABLE table_77730 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
What's the record when the attendance was 28,531?
SELECT "Record" FROM table_77730 WHERE "Attendance" = '28,531'
wikisql
CREATE TABLE table_name_42 ( chief_judge VARCHAR, appointed_by VARCHAR )
Which Chief Judge has Appointed by of reagan category:articles with hcards?
SELECT chief_judge FROM table_name_42 WHERE appointed_by = "reagan category:articles with hcards"
sql_create_context
CREATE TABLE table_21543 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
How many high assist are on the date December 13?
SELECT COUNT("High assists") FROM table_21543 WHERE "Date" = 'December 13'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
how many of the female patients had a lab test for rbc?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "F" AND lab.label = "RBC"
mimicsql_data
CREATE TABLE table_1342270_24 ( first_elected INTEGER )
what was the maxiumum for the first elected?
SELECT MAX(first_elected) FROM table_1342270_24
sql_create_context
CREATE TABLE table_30940 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Date" text )
How many scores were there for the home team when the away team was fitzroy?
SELECT COUNT("Home team score") FROM table_30940 WHERE "Away team" = 'Fitzroy'
wikisql
CREATE TABLE table_name_54 ( date VARCHAR, length_duration VARCHAR )
What was the date of the race that lasted 6 hours?
SELECT date FROM table_name_54 WHERE length_duration = "6 hours"
sql_create_context
CREATE TABLE table_name_31 ( total INTEGER, year_s__won VARCHAR )
In 1991, what was the lowest total?
SELECT MIN(total) FROM table_name_31 WHERE year_s__won = "1991"
sql_create_context
CREATE TABLE table_228973_11 ( no_in_season VARCHAR, original_air_date VARCHAR )
The episode which originally aired on February 11, 2005 had which episode # of the season?
SELECT no_in_season FROM table_228973_11 WHERE original_air_date = "February 11, 2005"
sql_create_context
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, ...
calculate the number of patients who were admitted to transfer from hosp/extram and were treated with aztr1000fb
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND prescriptions.formulary_drug_cd = "AZTR1000FB"
mimicsql_data
CREATE TABLE table_33859 ( "Name" text, "Caps" real, "Goals" real, "First cap" text, "Latest cap" text )
Latest cap of september 5, 2011 had how many goals?
SELECT "Goals" FROM table_33859 WHERE "Latest cap" = 'september 5, 2011'
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 jybgb ( BBCJBW text, BBDM tex...
在11年2月3日到19年7月25日内的C反应蛋白在患者21776586身上是什么情况?
SELECT * FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i...
css
CREATE TABLE table_35 ( "Calls" text, "Frequency" text, "Branding" text, "Format" text, "Market/Rank" text, "Timeslot" text, "Group owner" text )
What is the Frequency at the Market/Rank of Burlington - Plattsburgh , Vermont - New York /143?
SELECT COUNT("Frequency") FROM table_35 WHERE "Market/Rank" = 'Burlington - Plattsburgh , Vermont - New York /143'
wikisql
CREATE TABLE table_37327 ( "Player" text, "Position" text, "Date of Birth (Age)" text, "Caps" real, "Club/province" text )
Name the club/province for steve borthwick
SELECT "Club/province" FROM table_37327 WHERE "Player" = 'steve borthwick'
wikisql