context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_204_160 ( id number, "rank" number, "name" text, "nationality" text, "time" text, "notes" text )
who is listed previous to prue watt ?
SELECT "name" FROM table_204_160 WHERE id = (SELECT id FROM table_204_160 WHERE "name" = 'prue watt') - 1
squall
CREATE TABLE table_name_71 ( crowd INTEGER, venue VARCHAR )
How many people attended the game at VFL Park?
SELECT SUM(crowd) FROM table_name_71 WHERE venue = "vfl park"
sql_create_context
CREATE TABLE table_name_89 ( circumstances VARCHAR, location VARCHAR )
What was the circumstance that happened on the road to Jalalabad?
SELECT circumstances FROM table_name_89 WHERE location = "road to jalalabad"
sql_create_context
CREATE TABLE table_43797 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What week had attendance of 52,714?
SELECT MAX("Week") FROM table_43797 WHERE "Attendance" = '52,714'
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 diagnoses ( ...
what is drug route of drug name lactated ringers?
SELECT prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Lactated Ringers"
mimicsql_data
CREATE TABLE table_23348 ( "Series #" real, "Season #" real, "Title" text, "Director(s)" text, "Writer(s)" text, "Airdate" text, "Production code" real, "Arties disguises" text )
Name the season number for 'the night of the feathered fury
SELECT COUNT("Season #") FROM table_23348 WHERE "Title" = 'The Night of the Feathered Fury'
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, ...
what is the number of medicaid insurance patients who have undergone hemodialysis?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.long_title = "Hemodialysis"
mimicsql_data
CREATE TABLE table_name_48 ( place VARCHAR, player VARCHAR )
Which Place has a Player of justin leonard?
SELECT place FROM table_name_48 WHERE player = "justin leonard"
sql_create_context
CREATE TABLE table_34959 ( "Outcome" text, "Year" text, "Venue" text, "Last opponent" text, "Score" text )
Venue of thessaloniki (without participation) had what score?
SELECT "Score" FROM table_34959 WHERE "Venue" = 'thessaloniki (without participation)'
wikisql
CREATE TABLE table_name_80 ( nangun INTEGER, rank VARCHAR, total VARCHAR )
WHAT IS THE AVERAGE NANGUN WITH A RANK LARGER THAN 2, TOTAL OF 17.85?
SELECT AVG(nangun) FROM table_name_80 WHERE rank > 2 AND total = 17.85
sql_create_context
CREATE TABLE table_76390 ( "Year" text, "Result" text, "Matches" text, "Wins" text, "Draws" text, "Losses" text )
What was the result for the team with 3 draws?
SELECT "Result" FROM table_76390 WHERE "Draws" = '3'
wikisql
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int )...
Am I able to take RCIDIV 316 and RCIDIV 224 in the same semester ?
SELECT COUNT(*) > 0 FROM course AS COURSE_0, course AS COURSE_1, course_offering AS COURSE_OFFERING_0, course_offering AS COURSE_OFFERING_1, course_prerequisite WHERE COURSE_OFFERING_1.semester = COURSE_OFFERING_0.semester AND COURSE_0.course_id = COURSE_OFFERING_0.course_id AND COURSE_0.department = 'RCIDIV' AND COURS...
advising
CREATE TABLE table_13505 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Event" text )
In what position did Salina Kosgei finish in the Tokyo Marathon?
SELECT "Position" FROM table_13505 WHERE "Competition" = 'tokyo marathon'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH te...
在患者55890390的诊疗记录里,从18年5月1日到20年11月25日这期间,为其检测指标836276的医务人员有哪几位,报一下工号及姓名
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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 jyjgzbb.JYRQ BETWEEN '2018-05-10' AND '2020-11-2...
css
CREATE TABLE table_63424 ( "State" text, "Adopted" text, "Population (2011-01-01)" text, "Nominal GDP World Bank, 2009 (million USD)" real, "Relative GDP of total (nominal)" text, "GDP per capita World Bank, 2009 nominal (USD)" real )
What is listed as the highest Nominal GDP World Bank, 2009 (million USD) that has a GDP per capita World Bank, 2009 nominal (USD) of 14267?
SELECT MAX("Nominal GDP World Bank, 2009 (million USD)") FROM table_63424 WHERE "GDP per capita World Bank, 2009 nominal (USD)" = '14267'
wikisql
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 hispanic or latino patients have an additive type drug prescription?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND prescriptions.drug_type = "ADDITIVE"
mimicsql_data
CREATE TABLE artist ( artist_id number, name text, country text, year_join number, age number ) CREATE TABLE exhibition ( exhibition_id number, year number, theme text, artist_id number, ticket_price number ) CREATE TABLE exhibition_record ( exhibition_id number, date t...
How many artists are above age 46 and joined after 1990?
SELECT COUNT(*) FROM artist WHERE age > 46 AND year_join > 1990
spider
CREATE TABLE table_name_11 ( result VARCHAR, opponent VARCHAR )
Opponent of igor samoilenco had what result?
SELECT result FROM table_name_11 WHERE opponent = "igor samoilenco"
sql_create_context
CREATE TABLE table_name_23 ( score VARCHAR, player VARCHAR, country VARCHAR, money___$__ VARCHAR )
What is the score for the United States when Harry Hampton is the player and the money is $73?
SELECT score FROM table_name_23 WHERE country = "united states" AND money___$__ = "73" AND player = "harry hampton"
sql_create_context
CREATE TABLE table_50250 ( "Institution" text, "Location" text, "Nickname" text, "Enrollment" real, "Established" real )
What is the average Enrollment of Dickinson College?
SELECT AVG("Enrollment") FROM table_50250 WHERE "Institution" = 'dickinson college'
wikisql
CREATE TABLE table_40549 ( "Race" text, "Pole position" text, "Fastest lap" text, "Most laps led" text, "Winning driver" text, "Winning team" text, "Report" text )
What is Most Laps Led, when Winning Team is Chip Ganassi Racing, and when Fastest Lap is Marco Andretti?
SELECT "Most laps led" FROM table_40549 WHERE "Winning team" = 'chip ganassi racing' AND "Fastest lap" = 'marco andretti'
wikisql
CREATE TABLE table_203_416 ( id number, "school name" text, "city" text, "grades" text, "establishment" number, "charter" text )
which school was established first ?
SELECT "school name" FROM table_203_416 ORDER BY "establishment" LIMIT 1
squall
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Tags ( Id num...
Average number of questions per day, over a week - about Apache Beam + Stack Overflow.
SELECT MIN(Posts.CreationDate) AS period, SUM(CASE WHEN Posts.PostTypeId = 1 THEN 1 ELSE 0 END) AS "questions per month" FROM Posts WHERE Posts.PostTypeId = 1 AND (Posts.Tags LIKE '%apache-beam%' OR Posts.Tags LIKE '%google-cloud-dataflow%') GROUP BY TIME_TO_STR(Posts.CreationDate, '%m'), TIME_TO_STR(Posts.CreationDate...
sede
CREATE TABLE table_name_24 ( since VARCHAR, goals VARCHAR, transfer_fee VARCHAR )
What is the since year for the player with more than 3 goals and a transfer fee of 400k?
SELECT since FROM table_name_24 WHERE goals > 3 AND transfer_fee = "£400k"
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
How many patients have had an open and other sigmoidectomy procedure?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Open and other sigmoidectomy"
mimicsql_data
CREATE TABLE table_58754 ( "\"Long\" vowels" text, "17th c." text, "American" text, "British" text, "Australian" text )
What is the 17th c. pronunciation when the british is ?
SELECT "17th c." FROM table_58754 WHERE "British" = 'əʊ'
wikisql
CREATE TABLE table_8806 ( "Game" real, "November" real, "Opponent" text, "Score" text, "Record" text )
What is the total number of games that led to a record of 12-4-2 after November 22?
SELECT COUNT("Game") FROM table_8806 WHERE "Record" = '12-4-2' AND "November" > '22'
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 d_icd_procedures ( row_id number, icd9_code text, s...
how many times patient 71129 was prescribed 0.9% sodium chloride in 2105?
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 71129) AND prescriptions.drug = '0.9% sodium chloride' AND STRFTIME('%y', prescriptions.startdate) = '2105'
mimic_iii
CREATE TABLE table_name_8 ( club VARCHAR, replacement VARCHAR )
Tell me the club with a replacement of alberto malesani
SELECT club FROM table_name_8 WHERE replacement = "alberto malesani"
sql_create_context
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...
在10年3月18日到20年8月21日期间姓名为吕睿明的投保病人所用的药品每种最多购买了几次?
SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '吕睿明' AND t_kc22.STA_DATE BETWEEN '2010-03-18' AND '2020-08-21' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22....
css
CREATE TABLE table_name_12 ( roll INTEGER, authority VARCHAR, name VARCHAR )
What is the biggest roll number of Sylvia Park School, which has a state authority?
SELECT MAX(roll) FROM table_name_12 WHERE authority = "state" AND name = "sylvia park school"
sql_create_context
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE program ( program_id int, name varchar, ...
What number of upper level courses have labs ?
SELECT COUNT(DISTINCT course.course_id) FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_lab = 'Y' AND program_course.category LIKE '%ULCS%'
advising
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org...
for the first time, what procedure did in the first hospital encounter patient 85407 receive?
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT procedures_icd.icd9_code FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 85407 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admit...
mimic_iii
CREATE TABLE table_name_72 ( type VARCHAR, date VARCHAR, condition VARCHAR )
What is the Type of castle from the 14th Century which Condition is preserved?
SELECT type FROM table_name_72 WHERE date = "14th century" AND condition = "preserved"
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 prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, ...
count the number of patients that were diagnosed with venous insufficiency nos and didn't come back to the hospital within the same month until 4 years ago.
SELECT (SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'venous ins...
mimic_iii
CREATE TABLE table_203_612 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
what is the difference in medals for fiji and tonga ?
SELECT (SELECT "total" FROM table_203_612 WHERE "nation" = 'fiji') - (SELECT "total" FROM table_203_612 WHERE "nation" = 'tonga')
squall
CREATE TABLE table_25731 ( "District" text, "SC/ST" text, "Nairs" text, "Ezhavas" text, "Syrian Christians" text, "Latin Christians" text, "Muslims" text, "Others" text, "Total" real )
Name the district for nairs 8.2
SELECT "District" FROM table_25731 WHERE "Nairs" = '8.2'
wikisql
CREATE TABLE table_38505 ( "Date" real, "2 January 2007" text, "19 October 2009" text, "5 November 2010" text, "16 December 2011" text, "30 March 2012" text )
5 November 2010 of dragon oil 4.02% has what average Date?
SELECT AVG("Date") FROM table_38505 WHERE "5 November 2010" = 'dragon oil 4.02%'
wikisql
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
医院6367701的非科室1908负责的所有医疗就诊在2009-05-23到2019-05-26内有哪些记录?
SELECT * FROM qtb WHERE qtb.MED_SER_ORG_NO = '6367701' AND qtb.IN_HOSP_DATE BETWEEN '2009-05-23' AND '2019-05-26' UNION SELECT * FROM gyb WHERE gyb.MED_SER_ORG_NO = '6367701' AND gyb.IN_HOSP_DATE BETWEEN '2009-05-23' AND '2019-05-26' UNION SELECT * FROM zyb WHERE zyb.MED_SER_ORG_NO = '6367701' AND zyb.IN_HOSP_DATE BETW...
css
CREATE TABLE table_76744 ( "Pick #" real, "NFL Team" text, "Player" text, "Position" text, "College" text )
Which NFL team has a pick# less than 200 for Travis Davis?
SELECT "NFL Team" FROM table_76744 WHERE "Pick #" < '200' AND "Player" = 'travis davis'
wikisql
CREATE TABLE table_56052 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text )
What was the record in the competition in which the home team was the Mavericks?
SELECT "Record" FROM table_56052 WHERE "Home" = 'mavericks'
wikisql
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int,...
During what times will 863 be offered each week ?
SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM semester INNER JOIN course_offering ON semester.semester_id = course_o...
advising
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 zzmzjzjlb ( HXPLC number, HZX...
名字叫做王子安的患者在医院6839787期间门诊所诊断出名称不包含肾结石的门诊诊察记录一共是哪几条?
SELECT * FROM person_info JOIN hz_info JOIN zzmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE person_info.XM = '王子安' AND hz_info.YLJGDM = '6839787' AND NOT zzmzjzjlb.JZZDSM LIKE '%肾结石%' UNION SELECT * FROM person_info J...
css
CREATE TABLE table_71191 ( "Player" text, "Position" text, "Previous Club" text, "Apps" real, "Tries" real, "Goals" text, "Points" real )
How many Goals did Matt Cook have?
SELECT "Goals" FROM table_71191 WHERE "Player" = 'matt cook'
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 discharge location is disch-tran to psych hosp and procedure icd9 code is 8674?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND procedures.icd9_code = "8674"
mimicsql_data
CREATE TABLE table_name_59 ( grid VARCHAR, time VARCHAR )
what's the grid with time +37.949?
SELECT COUNT(grid) FROM table_name_59 WHERE time = "+37.949"
sql_create_context
CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time...
Number of comments with links to Wikipedia.
SELECT COUNT(p.Id) FROM Comments AS p WHERE p.Text LIKE '%http://en.wikipedia%'
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
what is the number of patients whose admission type is emergency and procedure long title is percutaneous transluminal coronary angioplasty [ptca]?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.long_title = "Percutaneous transluminal coronary angioplasty [PTCA]"
mimicsql_data
CREATE TABLE table_48721 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Date" text, "Crowd" real )
What is the sum of Crowd, when Date is Sunday, 4 March, and when Home Team Score is 22.13 (145)?
SELECT SUM("Crowd") FROM table_48721 WHERE "Date" = 'sunday, 4 march' AND "Home team score" = '22.13 (145)'
wikisql
CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT )
Return a histogram on what is average age of male for different job title?
SELECT job, AVG(age) FROM Person WHERE gender = 'male' GROUP BY job
nvbench
CREATE TABLE table_69815 ( "Country" text, "Chart" text, "Period" text, "Peak position" text, "Sales" text )
Name the period for Chart of g-music j-pop/k-pop chart
SELECT "Period" FROM table_69815 WHERE "Chart" = 'g-music j-pop/k-pop chart'
wikisql
CREATE TABLE table_72899 ( "Position" real, "Team" text, "Played" real, "Won" real, "Drawn" real, "Lost" real, "Goals For" real, "Goals Against" real, "Goal Average 1" text, "Points 2" real )
List all losses with average goals of 1.21.
SELECT "Lost" FROM table_72899 WHERE "Goal Average 1" = '1.21'
wikisql
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
how much does patient 006-93378's weight differ second measured on the first hospital visit compared to the value first measured on the first hospital visit?
SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-93378' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1) AND NOT patient.admissionweight IS NULL OR...
eicu
CREATE TABLE table_203_873 ( id number, "model name" text, "length" text, "width" text, "height" text, "riders" number, "capacity" number, "description" text, "portable" text, "notes" number )
how many rides have a max capacity of 600 ?
SELECT COUNT(DISTINCT ("model name")) FROM table_203_873 WHERE "capacity" = 600
squall
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...
药物编码为461222-y在医疗就诊86670858122中的剂型和规格分别是什么?
SELECT DOSE_FORM, SPEC FROM t_kc22 WHERE MED_CLINIC_ID = '86670858122' AND SOC_SRT_DIRE_CD = '461222-y'
css
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE SuggestedEdits ( Id number, PostId n...
Protected questions by their number of deleted answers.
SELECT PostId AS "post_link", CreationDate FROM PostHistory WHERE PostHistoryTypeId = 19 ORDER BY CreationDate DESC
sede
CREATE TABLE table_name_34 ( silver INTEGER, nation VARCHAR, bronze VARCHAR )
Tell me the sum of silver for liechtenstein and bronze more than 4
SELECT SUM(silver) FROM table_name_34 WHERE nation = "liechtenstein" AND bronze > 4
sql_create_context
CREATE TABLE table_28853064_15 ( winner VARCHAR, mountains_classification VARCHAR, team_classification VARCHAR )
Who were the winners if the Mountain Classification award was given to Oscar Solis and Team Classification was given to EPM-Une?
SELECT winner FROM table_28853064_15 WHERE mountains_classification = "Oscar Solis" AND team_classification = "EPM-UNE"
sql_create_context
CREATE TABLE table_name_81 ( result VARCHAR, year VARCHAR, tournament VARCHAR )
for the tournament of world amateur championship what was the result in 2010?
SELECT result FROM table_name_81 WHERE year = 2010 AND tournament = "world amateur championship"
sql_create_context
CREATE TABLE table_74267 ( "Pick" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
How many draft pick positions did Matt Bradley have?
SELECT COUNT("Position") FROM table_74267 WHERE "Player" = 'Matt Bradley'
wikisql
CREATE TABLE table_60221 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real )
What country placed 3?
SELECT "Country" FROM table_60221 WHERE "Place" = '3'
wikisql
CREATE TABLE table_45004 ( "Year" real, "Award" text, "Name" text, "Institution" text, "Chief Judge" text )
What institution won 2nd more recently than 2007 with Peter Agre as Chief Judge?
SELECT "Institution" FROM table_45004 WHERE "Year" > '2007' AND "Award" = '2nd' AND "Chief Judge" = 'peter agre'
wikisql
CREATE TABLE table_name_57 ( away_team VARCHAR, home_team VARCHAR )
In the game against home team Fitzroy, what did the away team score?
SELECT away_team AS score FROM table_name_57 WHERE home_team = "fitzroy"
sql_create_context
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 text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
give me the number of patients whose discharge location is home and days of hospital stay is greater than 26?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME" AND demographic.days_stay > "26"
mimicsql_data
CREATE TABLE Employees ( Employee_ID INTEGER, Role_Code CHAR(15), Employee_Name VARCHAR(255), Gender_MFU CHAR(1), Date_of_Birth DATETIME, Other_Details VARCHAR(255) ) CREATE TABLE Roles ( Role_Code CHAR(15), Role_Name VARCHAR(255), Role_Description VARCHAR(255) ) CREATE TABLE All_D...
Show the location codes and the number of documents in each location in a bar chart, order the total number in descending order.
SELECT Location_Code, COUNT(*) FROM Document_Locations GROUP BY Location_Code ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE Organisation_Types ( organisation_type VARCHAR(10), organisation_type_description VARCHAR(255) ) CREATE TABLE Project_Staff ( staff_id DOUBLE, project_id INTEGER, role_code VARCHAR(10), date_from DATETIME, date_to DATETIME, other_details VARCHAR(255) ) CREATE TABLE Documen...
Plot how many date from by grouped by date from as a bar graph, list Y in asc order.
SELECT date_from, COUNT(date_from) FROM Project_Staff ORDER BY COUNT(date_from)
nvbench
CREATE TABLE table_32023 ( "Week #" real, "Finalists" text, "Status" text, "Eliminated" text, "Date" text )
Tell me the eliminated for week # larger than 4
SELECT "Eliminated" FROM table_32023 WHERE "Week #" > '4'
wikisql
CREATE TABLE table_37837 ( "District" text, "District Headquarters" text, "Area (km 2 .)" real, "Population 1991 Census" real, "Population 2001 Census" real )
What is the number of Population 2001 Census that has 476,815 in Population 1991 Census?
SELECT SUM("Population 2001 Census") FROM table_37837 WHERE "Population 1991 Census" = '476,815'
wikisql
CREATE TABLE country ( country_id SMALLINT UNSIGNED, country VARCHAR(50), last_update TIMESTAMP ) CREATE TABLE language ( language_id TINYINT UNSIGNED, name CHAR(20), last_update TIMESTAMP ) CREATE TABLE staff ( staff_id TINYINT UNSIGNED, first_name VARCHAR(45), last_name VARCHAR(4...
What are the number of the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa?, and show payment_date in asc order.
SELECT payment_date, COUNT(payment_date) FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa' GROUP BY payment_date ORDER BY payment_date
nvbench
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( ...
find out the number of patients who were discharged from the hospital.
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL
eicu
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
provide the number of patients whose admission location is trsf within this facility and procedure icd9 code is 9671?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND procedures.icd9_code = "9671"
mimicsql_data
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...
TOP 10 Most Viewed Questions.
SELECT Title, ViewCount, Id FROM Posts ORDER BY ViewCount DESC LIMIT 10
sede
CREATE TABLE table_27776266_1 ( production_code VARCHAR, us_viewers__million_ VARCHAR )
What was the production code of the episode with an audience of 14.79 million in the US?
SELECT production_code FROM table_27776266_1 WHERE us_viewers__million_ = "14.79"
sql_create_context
CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, applica...
what is the earliest flight from BOSTON to SAN FRANCISCO that serves a meal
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, food_service WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code AND ...
atis
CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) 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 Has_Allergy ( StuID INTEGE...
Draw a bar chart for how many students are affected by each allergy type?, display bars in ascending order.
SELECT AllergyType, COUNT(*) FROM Has_Allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy GROUP BY T2.AllergyType ORDER BY AllergyType
nvbench
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, Deletio...
Enterprise Library Answers By Year.
SELECT TIME_TO_STR(p.CreationDate, '%YEAR'), COUNT(*) FROM Posts AS p WHERE p.Tags LIKE ('%<enterprise-library>%') AND p.AnswerCount > 0 AND p.ClosedDate IS NULL GROUP BY TIME_TO_STR(p.CreationDate, '%YEAR')
sede
CREATE TABLE table_64423 ( "Name" text, "Nationality" text, "Position" text, "Year of birth" real, "Career" text, "Appearances" real, "Goals" real, "Club" text )
How many appearances did the player for the Rayo Vallecano club that scored more than 37 goals make?
SELECT COUNT("Appearances") FROM table_64423 WHERE "Club" = 'rayo vallecano' AND "Goals" > '37'
wikisql
CREATE TABLE table_name_50 ( time_retired VARCHAR, grid VARCHAR, laps VARCHAR, constructor VARCHAR )
What is the Time/Retired value for constructor Jordan - Peugeot with 66 laps and grid value 5?
SELECT time_retired FROM table_name_50 WHERE laps = "66" AND constructor = "jordan - peugeot" AND grid = "5"
sql_create_context
CREATE TABLE table_27293285_6 ( points VARCHAR, won VARCHAR )
For teams that won exactly 15, how many points were scored?
SELECT points FROM table_27293285_6 WHERE won = "15"
sql_create_context
CREATE TABLE table_name_65 ( fumble_rec INTEGER, solo VARCHAR, player VARCHAR, sacks VARCHAR, fumble_force VARCHAR )
How many fumble recoveries for scott gajos with 0 forced fubmles, 0 sacks, and under 2 solo tackles?
SELECT SUM(fumble_rec) FROM table_name_65 WHERE sacks = "0" AND fumble_force = "0" AND player = "scott gajos" AND solo < 2
sql_create_context
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, ...
Hidden gems: Lowest viewed questions with score 50 or higher.
SELECT Posts.Id AS "post_link", Posts.OwnerUserId AS "user_link", Score, ViewCount, Score * 1000 / ViewCount AS "Score per Thousand Views" FROM Posts WHERE Score >= 50 AND PostTypeId = 1 ORDER BY ViewCount LIMIT 1000
sede
CREATE TABLE table_48765 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
Which opponent had 38,642 attendance?
SELECT "Opponent" FROM table_48765 WHERE "Attendance" = '38,642'
wikisql
CREATE TABLE table_name_79 ( seats_2006 INTEGER, parties_and_voter_communities VARCHAR, _percentage_2006 VARCHAR )
What is the highest number of Seats 2006 held by the Christian Democratic Union of Germany Party/Voter Community, with a %2006 higher than 24.6?
SELECT MAX(seats_2006) FROM table_name_79 WHERE parties_and_voter_communities = "christian democratic union of germany" AND _percentage_2006 > 24.6
sql_create_context
CREATE TABLE table_35009 ( "Rank" text, "Name" text, "Height feet(m)" text, "Floors" real, "Year" real )
with rank of 31 what is the year?
SELECT COUNT("Year") FROM table_35009 WHERE "Rank" = '31'
wikisql
CREATE TABLE table_24731 ( "Date" text, "Event #" text, "Event" text, "Winner" text, "Prize" text, "Entries" text, "Prize Pool" text, "Elapsed Time" text )
Which event had 25,883 entries?
SELECT "Event" FROM table_24731 WHERE "Entries" = '25,883'
wikisql
CREATE TABLE table_4104 ( "Player" text, "County" text, "Matches" real, "Innings" real, "Runs" real, "Average" text, "Highest Score" text, "100s" real, "50s" real )
Which player has a 50 of 2?
SELECT "Player" FROM table_4104 WHERE "50s" = '2'
wikisql
CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE field ( fieldid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABL...
What are keyphrases by Christof Dallermassl in 2000 ?
SELECT DISTINCT paperkeyphrase.keyphraseid FROM author, paper, paperkeyphrase, writes WHERE author.authorname = 'Christof Dallermassl' AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2000 AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
scholar
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAc...
TOP Haskell users in Oregon.
WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON u.Id =...
sede
CREATE TABLE table_name_1 ( date VARCHAR, series VARCHAR )
What is Date, when Series is ATCC Round 5?
SELECT date FROM table_name_1 WHERE series = "atcc round 5"
sql_create_context
CREATE TABLE table_4318 ( "Year" real, "Event" text, "Venue" text, "Driver" text, "Result" text, "Category" text )
What was the result of the syracuse grand prix?
SELECT "Result" FROM table_4318 WHERE "Event" = 'syracuse grand prix'
wikisql
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
医疗就诊56971731612的怎么描述病情?
SELECT MAIN_COND_DES FROM t_kc21 WHERE MED_CLINIC_ID = '56971731612'
css
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE labevents ( row_id number, subje...
has patient 12568 excreted the foley since 260 days ago?
SELECT COUNT(*) > 0 FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12568)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'foley' AND d_i...
mimic_iii
CREATE TABLE table_77875 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
If the Crowd is larger than 10,000 and the Away team score is 11.15 (81), what is the venue being played at?
SELECT "Venue" FROM table_77875 WHERE "Away team score" = '11.15 (81)' AND "Crowd" > '10,000'
wikisql
CREATE TABLE table_14142 ( "Pick" real, "Team" text, "Player" text, "Position" text, "College" text )
what is the highest pick for the position tight end?
SELECT MAX("Pick") FROM table_14142 WHERE "Position" = 'tight end'
wikisql
CREATE TABLE table_name_20 ( hometown VARCHAR, year VARCHAR, club VARCHAR )
What hometown was FR Year, and ha Brown's Gymnastics club?
SELECT hometown FROM table_name_20 WHERE year = "fr" AND club = "brown's gymnastics"
sql_create_context
CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Rev...
Closed questions that either have answers or haven't been downvoted.. Closed questions that either have answers or haven't been downvoted. These won't go away unless you make them. (This only checks for the 30-days rule; see http://meta.stackoverflow.com/a/92006 for the full criteria.)
SELECT Score, Id AS "post_link", CASE WHEN AnswerCount = 0 THEN NULL ELSE AnswerCount END AS Answers, CASE WHEN NOT AcceptedAnswerId IS NULL THEN 'Yes' ELSE NULL END AS Accepted, CASE WHEN NOT CommunityOwnedDate IS NULL THEN 'Yes' ELSE NULL END AS Wiki, ViewCount AS Views, OwnerUserId AS "user_link" FROM Posts WHERE NO...
sede
CREATE TABLE table_name_92 ( circuit VARCHAR, race VARCHAR )
What circuit was the British Grand Prix?
SELECT circuit FROM table_name_92 WHERE race = "british grand prix"
sql_create_context
CREATE TABLE table_name_57 ( award VARCHAR, category VARCHAR )
Which Award is the winner for Outstanding Revival of a Musical given?
SELECT award FROM table_name_57 WHERE category = "outstanding revival of a musical"
sql_create_context
CREATE TABLE table_name_32 ( number INTEGER, western_name VARCHAR )
What is the lowest number for the english word Aquarius?
SELECT MIN(number) FROM table_name_32 WHERE western_name = "aquarius"
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 bdmzjzjlb ( CYBQDM text, CYBQ...
在08年5月15日到08年10月14日内患者67621156所有检验结果指标记录中的检测方法是什么?
SELECT jyjgzbb.JCFF FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_in...
css