context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_2976 ( "French Title" text, "Date of Publication" real, "English Translation" text, "Writer" text, "Artist" text )
What was the French title of the story published in 1968?
SELECT "French Title" FROM table_2976 WHERE "Date of Publication" = '1968'
wikisql
CREATE TABLE table_68368 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time/Retired" text, "Grid" real )
Which manufacturer made Shoya Tomizawa's motorcycle?
SELECT "Manufacturer" FROM table_68368 WHERE "Rider" = 'shoya tomizawa'
wikisql
CREATE TABLE table_28180 ( "Institution" text, "Seniors" text, "Juniors" text, "Women" text, "Status" text, "Founded" real, "Affiliation (Population)" text, "Color" text, "Location" text )
What status of school is the school represented by the baby olympians?
SELECT "Status" FROM table_28180 WHERE "Juniors" = 'Baby Olympians'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ...
what is the number of patients with replaced route of drug administration?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "REPLACE"
mimicsql_data
CREATE TABLE table_204_988 ( id number, "responsible minister(s)" text, "crown entities" text, "monitoring department(s)" text, "category / type" text, "empowering legislation" text )
what is the crown entity listed before the takeovers panel ?
SELECT "crown entities" FROM table_204_988 WHERE id = (SELECT id FROM table_204_988 WHERE "crown entities" = 'takeovers panel') - 1
squall
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetake...
what is the total amount of urine output patient 011-57670 has since 908 days ago?
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-57670')) AND intakeoutput.celllabel = 'urine...
eicu
CREATE TABLE table_1305623_12 ( gold_medals INTEGER, ensemble VARCHAR )
How many gold medals does the Choctawhatchee High School have?
SELECT MAX(gold_medals) FROM table_1305623_12 WHERE ensemble = "Choctawhatchee High School"
sql_create_context
CREATE TABLE mzjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, 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, ...
检验报告单13992667471的标本代码是什么?标本名称叫什么?标本状态是什么?
SELECT zyjybgb.BBDM, zyjybgb.BBMC, zyjybgb.BBZT FROM zyjybgb WHERE zyjybgb.BGDH = '13992667471' UNION SELECT mzjybgb.BBDM, mzjybgb.BBMC, mzjybgb.BBZT FROM mzjybgb WHERE mzjybgb.BGDH = '13992667471'
css
CREATE TABLE table_14850099_18 ( burmese VARCHAR, cardinal_direction VARCHAR )
What is the Burmese term associated with a cardinal direction of west?
SELECT burmese FROM table_14850099_18 WHERE cardinal_direction = "West"
sql_create_context
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE labevents ( r...
how many hours had passed since patient 5828 had been admitted to the icu?
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', icustays.intime)) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5828) AND icustays.outtime IS NULL
mimic_iii
CREATE TABLE table_name_1 ( score VARCHAR, player VARCHAR )
What is Score, when Player is 'Tom Lehman'?
SELECT score FROM table_name_1 WHERE player = "tom lehman"
sql_create_context
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid nu...
what was patient 23436 last height during the current hospital 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 = 23436 AND admissions.dischtime IS NULL)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items...
mimic_iii
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...
病患奚白云所有检验报告单中时间在09年9月21日到12年11月3日内的审核日期时间都是什么时候?
SELECT jybgb.SHSJ 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 t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
在2015年7月7日到2018年2月18日内参保人88686860购买单一药品最大次数是多少?
SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_ID = '88686860' AND t_kc22.STA_DATE BETWEEN '2015-07-07' AND '2018-02-18' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_I...
css
CREATE TABLE table_name_44 ( points VARCHAR, performer VARCHAR )
How many points did Nigel Connell have?
SELECT points FROM table_name_44 WHERE performer = "nigel connell"
sql_create_context
CREATE TABLE table_34867 ( "Team" text, "Average" real, "Points" real, "Played" real, "1989-90" text, "1990-91" text, "1991-1992" real )
What is the total number of averages where the played is more than 38, the 1990-91 is 39, and the 1989-90 is 34?
SELECT SUM("Average") FROM table_34867 WHERE "Played" > '38' AND "1990-91" = '39' AND "1989-90" = '34'
wikisql
CREATE TABLE table_15294880_2 ( stage VARCHAR, winner VARCHAR, points_classification VARCHAR )
How many stages were there where the winner and the points classification were Alberto Contador?
SELECT COUNT(stage) FROM table_15294880_2 WHERE winner = "Alberto Contador" AND points_classification = "Alberto Contador"
sql_create_context
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 procedures ( ...
How many patients are with black/cape verdan ethnicity and lab test id 51249?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND lab.itemid = "51249"
mimicsql_data
CREATE TABLE table_66484 ( "Rank" real, "Athlete" text, "Country" text, "Time" text, "Notes" text )
What time was the race for the country of france with fb listed under notes?
SELECT "Time" FROM table_66484 WHERE "Notes" = 'fb' AND "Country" = 'france'
wikisql
CREATE TABLE table_69467 ( "Ranking" real, "Nationality" text, "Name" text, "Years" text, "Goals" real )
What are the years when the ranking is less than 8 with less than 66 goals and name is Paul McGee?
SELECT "Years" FROM table_69467 WHERE "Ranking" < '8' AND "Goals" < '66' AND "Name" = 'paul mcgee'
wikisql
CREATE TABLE table_51071 ( "Date" text, "Distance" text, "Handler" text, "Event" text, "Location" text )
Which event is located in Northfield, Mn?
SELECT "Event" FROM table_51071 WHERE "Location" = 'northfield, mn'
wikisql
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 inputevents_cv ( row_id number, subject_id number, ...
how much patient 18457 weighs on their last hospital encounter for the first time?
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 = 18457 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1)) AND chartevent...
mimic_iii
CREATE TABLE table_name_22 ( car__number INTEGER, sponsor VARCHAR, season VARCHAR )
What is the lowest car number sponsored by UPS before 2001?
SELECT MIN(car__number) FROM table_name_22 WHERE sponsor = "ups" AND season < 2001
sql_create_context
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, T...
Usuarios con 10 o m s preguntas sin aceptar.
SELECT U.Id, U.DisplayName, COUNT(CASE WHEN P.AcceptedAnswerId IS NULL THEN 1 ELSE NULL END) AS PreguntasSinAceptar, COUNT(CASE WHEN NOT P.AcceptedAnswerId IS NULL THEN 1 ELSE NULL END) AS PreguntasAceptadas FROM Users AS U INNER JOIN Posts AS P ON U.Id = P.OwnerUserId WHERE P.PostTypeId = 1 AND P.AnswerCount > 0 GROUP...
sede
CREATE TABLE table_1728 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Series" text )
Name the total number of series for april 26
SELECT COUNT("Series") FROM table_1728 WHERE "Date" = 'April 26'
wikisql
CREATE TABLE table_204_109 ( id number, "district" text, "incumbent" text, "party" text, "first\nelected" text, "result" text, "candidates" text )
how many districts are there in virginia ?
SELECT COUNT("district") FROM table_204_109
squall
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
how many asian patients are less than 47 years?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.age < "47"
mimicsql_data
CREATE TABLE table_26468 ( "Confederation" text, "Teams started" text, "Teams that have secured qualification" text, "Teams that can still qualify" text, "Teams that have been eliminated" text, "Remaining places in finals" text, "Total places in finals" text, "Qualifying start date" text...
How many qualifying start dates for the Concacaf confederation?
SELECT COUNT("Qualifying start date") FROM table_26468 WHERE "Confederation" = 'CONCACAF'
wikisql
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 (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE person_info.XM = '韦英秀' AND txmzjzjlb.JZKSRQ BETWEEN '2018-10-01' AND '2020-08-23' UNION SELECT COUNT(*) FROM p...
css
CREATE TABLE table_name_98 ( game INTEGER, location_attendance VARCHAR, date VARCHAR )
What is the least game that was played in Alexander Memorial Coliseum on October 16?
SELECT MIN(game) FROM table_name_98 WHERE location_attendance = "alexander memorial coliseum" AND date = "october 16"
sql_create_context
CREATE TABLE table_name_13 ( attendance VARCHAR, result VARCHAR )
What Attendance has a Result of l12 21?
SELECT attendance FROM table_name_13 WHERE result = "l12–21"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
how many patients are diagnosed with primary disease chest pain and stayed in hospital for more than 1 day?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CHEST PAIN" AND demographic.days_stay > "1"
mimicsql_data
CREATE TABLE table_name_29 ( nation VARCHAR, silver VARCHAR, total VARCHAR, bronze VARCHAR )
What nation has a total more than 3, with more than 5 for bronze, and less than 4 for the silver?
SELECT nation FROM table_name_29 WHERE total > 3 AND bronze > 5 AND silver < 4
sql_create_context
CREATE TABLE table_203_589 ( id number, "protein" text, "natural host" text, "normal function" text, "prion state" text, "prion phenotype" text, "year identified" number )
how many prions have been characterized ?
SELECT COUNT("protein") FROM table_203_589
squall
CREATE TABLE table_1805191_34 ( party VARCHAR, first_elected VARCHAR )
Which party was elected first in 1998?
SELECT party FROM table_1805191_34 WHERE first_elected = 1998
sql_create_context
CREATE TABLE table_10975034_5 ( position VARCHAR, pick__number VARCHAR )
What is the number of position where the pick number is 43?
SELECT COUNT(position) FROM table_10975034_5 WHERE pick__number = 43
sql_create_context
CREATE TABLE table_12275654_1 ( year INTEGER, mens_singles VARCHAR )
When did Chetan Anand win his first men's single?
SELECT MIN(year) FROM table_12275654_1 WHERE mens_singles = "Chetan Anand"
sql_create_context
CREATE TABLE table_15127 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
Name the total number of points for beta team march 1975 and chassis of march 751
SELECT COUNT("Points") FROM table_15127 WHERE "Entrant" = 'beta team march' AND "Year" = '1975' AND "Chassis" = 'march 751'
wikisql
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, ...
what is the amount of bisacodyl dose prescribed to patient 16554 since 01/2105?
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16554) AND prescriptions.drug = 'bisacodyl' AND STRFTIME('%y-%m', prescriptions.startdate) >= '2105-01'
mimic_iii
CREATE TABLE table_57752 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Series" text )
What is the Score with a Home of colorado, and a Date with may 11?
SELECT "Score" FROM table_57752 WHERE "Home" = 'colorado' AND "Date" = 'may 11'
wikisql
CREATE TABLE table_71749 ( "Election" text, "1st Member" text, "1st Party" text, "2nd Member" text, "2nd Party" text )
Which 1st Party has an election in 1847?
SELECT "1st Party" FROM table_71749 WHERE "Election" = '1847'
wikisql
CREATE TABLE table_name_27 ( nation VARCHAR, silver VARCHAR, rank VARCHAR )
What nation has more than 0 silver medals and is ranked 1?
SELECT nation FROM table_name_27 WHERE silver > 0 AND rank = "1"
sql_create_context
CREATE TABLE table_name_42 ( to_par VARCHAR, score VARCHAR )
what is the to par when the score is 67-68-76=211?
SELECT to_par FROM table_name_42 WHERE score = 67 - 68 - 76 = 211
sql_create_context
CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE author ( authorid int, authorname varchar...
how many papers in emnlp 2016
SELECT DISTINCT COUNT(paper.paperid) FROM paper, venue WHERE paper.year = 2016 AND venue.venueid = paper.venueid AND venue.venuename = 'emnlp'
scholar
CREATE TABLE table_67688 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text )
What is the Club, when the value for Lost is 9, and when the value for Tries is 55?
SELECT "Club" FROM table_67688 WHERE "Lost" = '9' AND "Tries for" = '55'
wikisql
CREATE TABLE table_61983 ( "Official Name" text, "Status" text, "Area km 2" real, "Population" real, "Census Ranking" text )
What is the area of the community with a census ranking of 636 of 5,008?
SELECT AVG("Area km 2") FROM table_61983 WHERE "Census Ranking" = '636 of 5,008'
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 hz_info ( KH text, KLX number...
往日患者92882146有过什么异常情况?
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 = '92882146' AND jyjgzbb.JCZBJGDL < jyjgzbb.CKZFWXX OR jyjgzbb...
css
CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TAB...
Who will teach Other classes next Winter ?
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr...
advising
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
Draw a bar chart about the distribution of All_Home and the average of School_ID , and group by attribute All_Home, show by the Y in ascending.
SELECT All_Home, AVG(School_ID) FROM basketball_match GROUP BY All_Home ORDER BY AVG(School_ID)
nvbench
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
provide the number of patients whose year of birth is less than 2104 and drug type is base?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2104" AND prescriptions.drug_type = "BASE"
mimicsql_data
CREATE TABLE table_731 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
What's the district that Otto Passman is the incumbent of?
SELECT "District" FROM table_731 WHERE "Incumbent" = 'Otto Passman'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, ...
what is the minimum total cost in a hospital that involves a reticulocyte count, automated laboratory test the previous year?
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'reticulocyte count, automated')) AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TI...
mimic_iii
CREATE TABLE table_27293285_4 ( won VARCHAR, points_against VARCHAR, played VARCHAR, lost VARCHAR )
Name the won for played being 22 and points against 511 and lost being 15
SELECT won FROM table_27293285_4 WHERE played = "22" AND lost = "15" AND points_against = "511"
sql_create_context
CREATE TABLE table_name_1 ( number_of_jews__wjc_ INTEGER, rank___wjc__ VARCHAR, rank__arda_ VARCHAR )
What was the highest number of WJC Jews that had a WJC rank of 6 and a ARDA rank of more than 8?
SELECT MAX(number_of_jews__wjc_) FROM table_name_1 WHERE rank___wjc__ = 6 AND rank__arda_ > 8
sql_create_context
CREATE TABLE table_name_52 ( source VARCHAR, internet_explorer VARCHAR )
Which source date has an Internet Explorer usage of 60.2%?
SELECT source FROM table_name_52 WHERE internet_explorer = "60.2%"
sql_create_context
CREATE TABLE table_37298 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
WHich Score has a Record of 31 28 3?
SELECT "Score" FROM table_37298 WHERE "Record" = '31–28–3'
wikisql
CREATE TABLE table_name_39 ( division_record VARCHAR, team VARCHAR )
What is the Senators' division record?
SELECT division_record FROM table_name_39 WHERE team = "senators"
sql_create_context
CREATE TABLE table_202_68 ( id number, "value" text, "diameter" text, "composition" text, "1979-1989\nobverse" text, "1979-1989\nreverse" text )
what is on the obverse side of each coin ?
SELECT DISTINCT "1979-1989\nobverse" FROM table_202_68
squall
CREATE TABLE table_53226 ( "Serial" text, "Airborne Unit" text, "Troop carrier Group" text, "# of C-47s" real, "UK Base" text, "Drop Zone" text, "Drop Zone Time" real )
Which UK base has 441st tcg Troop carrier group and 14 as their seir serial?
SELECT "UK Base" FROM table_53226 WHERE "Troop carrier Group" = '441st tcg' AND "Serial" = '14'
wikisql
CREATE TABLE table_67827 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real )
Name the qual for year of 1960
SELECT "Qual" FROM table_67827 WHERE "Year" = '1960'
wikisql
CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER ) CREATE TABLE Faculty ( FacID INTEGER, Lname VARCHAR(15), Fname VARCHAR(15), Rank VARCHAR(15), Sex VARCHAR(1), Phone INTEGER, Room VARCHAR(5), Building VARCHAR(13) ) CREATE TABLE Activity ( actid INTEGER, acti...
For each faculty rank, show the number of faculty members who have it. Show bar chart.
SELECT Rank, COUNT(*) FROM Faculty GROUP BY Rank
nvbench
CREATE TABLE table_62735 ( "Name" text, "Height" text, "Weight" text, "Spike" text, "2008 club" text )
Who was the 2008 club Apure?
SELECT "Name" FROM table_62735 WHERE "2008 club" = 'apure'
wikisql
CREATE TABLE table_29054902_1 ( production_code VARCHAR, us_viewers__million_ VARCHAR )
What is the production code of the episode that was watched by 3.81 million U.S. viewers?
SELECT production_code FROM table_29054902_1 WHERE us_viewers__million_ = "3.81"
sql_create_context
CREATE TABLE table_680 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text, "Candidatess" text )
What was the result when incumbent gil gutknecht ran?
SELECT "Results" FROM table_680 WHERE "Incumbent" = 'Gil Gutknecht'
wikisql
CREATE TABLE table_50964 ( "Title" text, "Parent magazine" text, "Magazine type" text, "Frequency" text, "Magazine run" text )
What titles come out monthly?
SELECT "Title" FROM table_50964 WHERE "Frequency" = 'monthly'
wikisql
CREATE TABLE table_71154 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Pts." text )
What ist he entrant later than 1963 with an eagle MK1 chassis?
SELECT "Entrant" FROM table_71154 WHERE "Year" > '1963' AND "Chassis" = 'eagle mk1'
wikisql
CREATE TABLE table_54258 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
What was the score of the game on 27 January 1996?
SELECT "Score" FROM table_54258 WHERE "Date" = '27 january 1996'
wikisql
CREATE TABLE table_train_143 ( "id" int, "gender" string, "systolic_blood_pressure_sbp" int, "agitation" bool, "npi" int, "aggression_domain" bool, "delusions_hallucinations" bool, "pulse_rate" int, "fridericia_corrected_qt_interval_qtcf" int, "diastolic_blood_pressure_dbp" int, ...
have a fridericia's corrected qt interval ( qtcf ) greater than ( > ) 450 milliseconds ( ms ) for male or 470 ms for female
SELECT * FROM table_train_143 WHERE (gender = 'male' AND fridericia_corrected_qt_interval_qtcf > 450) OR (gender = 'female' AND fridericia_corrected_qt_interval_qtcf > 470)
criteria2sql
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, ...
患者被门诊诊断为口齿病(龋齿病)的检测指标559847的参考值范围下限和上限是多少
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE wdmzjzjlb.JZZDSM = '口齿病(龋齿病)' AND jyjgzbb.JCZBDM = '559847' UNION SELECT jyjgzbb.CKZFW...
css
CREATE TABLE table_16494599_2 ( player VARCHAR, school_club_team VARCHAR )
How many players went to depaul?
SELECT COUNT(player) FROM table_16494599_2 WHERE school_club_team = "DePaul"
sql_create_context
CREATE TABLE table_name_9 ( time VARCHAR, opponent VARCHAR )
Tell me the time for buffalo bills
SELECT time FROM table_name_9 WHERE opponent = "buffalo bills"
sql_create_context
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 prescriptions...
give me the number of patients whose drug name is dobutamine?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "DOBUTamine"
mimicsql_data
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decima...
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, visualize a line chart about the change of commission_pct over hire_date , and sort X-axis from low to high order.
SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY HIRE_DATE
nvbench
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...
在这个33429029356就诊期间其住院时门诊中医诊断编号是啥?
SELECT wdmzjzjlb.MZZYZDZZBM FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '33429029356' UNION SELECT bdmzjzjlb.MZZYZDZZBM FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '33429029356'
css
CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE time_zone ( time_zone_code t...
all DL flights to everywhere if you can
SELECT DISTINCT flight_id FROM flight WHERE (airline_code = 'DL')
atis
CREATE TABLE table_name_46 ( name VARCHAR, best VARCHAR )
Tell me the name with best of 58.403
SELECT name FROM table_name_46 WHERE best = "58.403"
sql_create_context
CREATE TABLE table_name_99 ( played VARCHAR, losing_bonus VARCHAR, points_for VARCHAR )
Name the played with losing bonus of 2 and points for of 706
SELECT played FROM table_name_99 WHERE losing_bonus = "2" AND points_for = "706"
sql_create_context
CREATE TABLE table_66944 ( "Team 1" text, "Agg." text, "Team 2" text, "1st leg" text, "2nd leg" text )
Which team of the team 1 column, has a 2nd leg of 1-0?
SELECT "Team 1" FROM table_66944 WHERE "2nd leg" = '1-0'
wikisql
CREATE TABLE table_51374 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
What was the record on April 1?
SELECT "Record" FROM table_51374 WHERE "Date" = 'april 1'
wikisql
CREATE TABLE table_6968 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text )
Which Partner is on 22 april 2002?
SELECT "Partner" FROM table_6968 WHERE "Date" = '22 april 2002'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
how many patients whose days of hospital stay is greater than 0 and drug route is neb?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "0" AND prescriptions.route = "NEB"
mimicsql_data
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
count the number of patients who were admitted before 2158 and had thyroxine (t4) lab test.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2158" AND lab.label = "Thyroxine (T4)"
mimicsql_data
CREATE TABLE table_name_68 ( tournament VARCHAR )
WHAT IS THE 2009 PERFORMANCE FOR TOURNAMENTS PLAYED?
SELECT 2009 FROM table_name_68 WHERE tournament = "tournaments played"
sql_create_context
CREATE TABLE table_58229 ( "Production no." real, "Episode no." real, "Original Airdate" text, "Episode Title" text, "Host" text )
What is the title of the episode that originally aired on March 31, 2008?
SELECT "Episode Title" FROM table_58229 WHERE "Original Airdate" = 'march 31, 2008'
wikisql
CREATE TABLE table_40201 ( "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text )
For the tournament played on September 25, 1995, who was the Finals opponent?
SELECT "Opponent in the final" FROM table_40201 WHERE "Date" = 'september 25, 1995'
wikisql
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
how many patients had a microbiology abscess test in this year?
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT microbiologyevents.hadm_id FROM microbiologyevents WHERE microbiologyevents.spec_type_desc = 'abscess' AND DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year'))
mimic_iii
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...
Top Responders to Java questions in the UK or England.
WITH posts_WITH_java_tags AS (SELECT PostId FROM PostTags AS pt LEFT JOIN Tags AS t ON pt.TagId = t.Id WHERE LOWER(t.TagName) = 'java') SELECT u.Id AS "user_link", u.Reputation, COUNT(*) AS number_of_answers FROM Posts AS p INNER JOIN posts_WITH_java_tags AS pt ON pt.PostId = p.Id INNER JOIN Posts AS a ON a.ParentId = ...
sede
CREATE TABLE table_76496 ( "Game" real, "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" text )
What is the total game number with athlone town as the opponent?
SELECT COUNT("Game") FROM table_76496 WHERE "Opponent" = 'athlone town'
wikisql
CREATE TABLE table_name_3 ( away_team VARCHAR, home_team VARCHAR )
What is Away Team, when Home Team is 'Swindon Town'?
SELECT away_team FROM table_name_3 WHERE home_team = "swindon town"
sql_create_context
CREATE TABLE table_31471 ( "Event" real, "Circuit" text, "GT3 Pro Cup Winner" text, "GT3 Pro / Am Cup Winner" text, "GT3 Citation Cup Winner" text, "GT4 Cup Winner" text )
Who are the gt3 pro / am cup winners when the gt3 pro cup winner was no. 1 vita4one?
SELECT "GT3 Pro / Am Cup Winner" FROM table_31471 WHERE "GT3 Pro Cup Winner" = 'No. 1 Vita4One'
wikisql
CREATE TABLE table_70473 ( "Rank" real, "Gymnast" text, "Difficulty score" text, "Routine score" real, "Total" real )
What is the total with lower than rank 8, and higher than 27.6 score and 13.8 difficulty?
SELECT MIN("Total") FROM table_70473 WHERE "Rank" > '8' AND "Routine score" > '27.6' AND "Difficulty score" = '13.8'
wikisql
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 (...
what is the number of patients whose gender is m and primary disease is abdominal pain?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.diagnosis = "ABDOMINAL PAIN"
mimicsql_data
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9cod...
what is the total quantity of output that patient 017-36245 has had until 08/23/2102?
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-36245')) AND intakeoutput.cellpath LIKE '%ou...
eicu
CREATE TABLE table_10979230_4 ( oricon VARCHAR, japanese_title VARCHAR )
What rank is on the Japanese singles chart?
SELECT COUNT(oricon) FROM table_10979230_4 WHERE japanese_title = "愛のバカ"
sql_create_context
CREATE TABLE table_11803 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Kickoff [a ]" text, "Game site" text, "Attendance" text, "Record" text )
What is the attandance figure on October 7, 1990?
SELECT "Attendance" FROM table_11803 WHERE "Date" = 'october 7, 1990'
wikisql
CREATE TABLE table_name_80 ( utah VARCHAR, texas VARCHAR )
What's the value for utah when texas is humphrey?
SELECT utah FROM table_name_80 WHERE texas = "humphrey"
sql_create_context
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
Posts which used HTML version of FAA P/CG (W/Links).
SELECT 'http://aviation.stackexchange.com/' + LOWER(SUBSTRING(pt.Name, 1, 1)) + '/' + CAST(p.Id AS TEXT(255)) AS ID, pt.Name AS PostType, p.CreationDate, u.DisplayName AS PostWrittenBy, p.Title, p.Body FROM Posts AS p JOIN PostTypes AS pt ON p.PostTypeId = pt.Id JOIN Users AS u ON p.OwnerUserId = u.Id WHERE p.Body LIKE...
sede
CREATE TABLE table_203_397 ( id number, "series" text, "launch date" text, "finale date" text, "days" number, "housemates" number, "winner" text, "main presenter" text, "grand prize" text, "liveshow\naudience\nmillions" number )
how many days was the longest season of grande fratello ?
SELECT MAX("days") FROM table_203_397
squall
CREATE TABLE table_34531 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What is the date for the game played on week 8, with an attendance of more than 35,000?
SELECT "Date" FROM table_34531 WHERE "Attendance" > '35,000' AND "Week" = '8'
wikisql
CREATE TABLE party ( Party_ID int, Minister text, Took_office text, Left_office text, Region_ID int, Party_name text ) CREATE TABLE region ( Region_ID int, Region_name text, Date text, Label text, Format text, Catalogue text ) CREATE TABLE member ( Member_ID int, ...
Which ministers are not a part of the Progress Party, and count them by a bar chart, I want to show Y-axis from high to low order.
SELECT Minister, COUNT(Minister) FROM party WHERE Party_name <> 'Progress Party' GROUP BY Minister ORDER BY COUNT(Minister) DESC
nvbench