context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_name_61 ( date VARCHAR, winning_driver VARCHAR )
What Date has a Winning driver of ugo sivocci?
SELECT date FROM table_name_61 WHERE winning_driver = "ugo sivocci"
sql_create_context
CREATE TABLE table_name_30 ( home VARCHAR, date VARCHAR, geust VARCHAR )
Who was the home team of the match on 21.10.07, which had bsc young boys (asl) as the geust?
SELECT home FROM table_name_30 WHERE date = "21.10.07" AND geust = "bsc young boys (asl)"
sql_create_context
CREATE TABLE table_23589 ( "Title" text, "Author" text, "Reader" text, "Format" text, "Company" text, "Release Date" text, "Notes" text )
who the reader of title department x?
SELECT "Reader" FROM table_23589 WHERE "Title" = 'Department X'
wikisql
CREATE TABLE table_name_15 ( time VARCHAR, show_name VARCHAR )
What Time has a Show Name of mornings with neil mitchell?
SELECT time FROM table_name_15 WHERE show_name = "mornings with neil mitchell"
sql_create_context
CREATE TABLE table_name_75 ( status VARCHAR, authors VARCHAR )
What is varricchio's status?
SELECT status FROM table_name_75 WHERE authors = "varricchio"
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...
列出对于凤锐达患者医疗记录中医疗费总额高于7564.57元的入院诊断疾病号码和名称都是哪些?
SELECT t_kc24.t_kc21_IN_DIAG_DIS_CD, t_kc24.t_kc21_IN_DIAG_DIS_NM FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_NM = '凤锐达' AND t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 7564.57)
css
CREATE TABLE table_179174_2 ( years VARCHAR, flights VARCHAR )
What years had 134 orbital flights?
SELECT years FROM table_179174_2 WHERE flights = "134 Orbital"
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 ( ...
what is the average age of patients who have stayed in the hospital for 4 days with a government insurance policy?
SELECT AVG(demographic.age) FROM demographic WHERE demographic.insurance = "Government" AND demographic.days_stay = "4"
mimicsql_data
CREATE TABLE table_58556 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What was the bronze medal count of the team that finished with 47 total medals?
SELECT AVG("Bronze") FROM table_58556 WHERE "Total" = '47'
wikisql
CREATE TABLE table_name_33 ( player VARCHAR, position VARCHAR, year VARCHAR )
What player has a no pick position in 1976?
SELECT player FROM table_name_33 WHERE position = "no pick" AND year = 1976
sql_create_context
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, res...
how do i get from BWI to WASHINGTON
SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city AS CITY_0, city AS CITY_1, ground_service WHERE airport.airport_code = airport_service.airport_code AND CITY_0.city_name = 'WASHINGTON' AND CITY_1.city_code = airport_service.city_code AND CITY_1.city_name = 'WASHINGTON' AND ground_servic...
atis
CREATE TABLE table_name_10 ( silver VARCHAR, bronze INTEGER )
What is the number of silver when bronze is less than 0?
SELECT COUNT(silver) FROM table_name_10 WHERE bronze < 0
sql_create_context
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the average of manufacturer , and group by attribute name, and I want to order in desc by the y axis please.
SELECT T2.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Manufacturer DESC
nvbench
CREATE TABLE table_12976038_1 ( director VARCHAR, viewers__in_millions_ VARCHAR )
Who directed the episode that had 6.04 million viewers?
SELECT director FROM table_12976038_1 WHERE viewers__in_millions_ = "6.04"
sql_create_context
CREATE TABLE table_11677100_17 ( school VARCHAR, player VARCHAR )
How many schools did Bubba Starling attend?
SELECT COUNT(school) FROM table_11677100_17 WHERE player = "Bubba Starling"
sql_create_context
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose...
what is the three most frequent drugs that were prescribed within 2 months to a female patient 20s after they have been diagnosed with hyp kid nos w cr kid v, since 4 years ago?
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
mimic_iii
CREATE TABLE table_44577 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
What event has a 0:49 time?
SELECT "Event" FROM table_44577 WHERE "Time" = '0:49'
wikisql
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 patients ( row_id number, subject_id number, gender text, dob time, dod time ) CR...
what were the top five common drugs that patients were prescribed within 2 months after they had been prescribed with bystolic since 2 years ago?
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'bystolic' AND DATETIME(prescriptions.startdate) >= DATETIME(CURRE...
mimic_iii
CREATE TABLE team ( team_id number, name text ) CREATE TABLE match_season ( season number, player text, position text, country number, team number, draft_pick_number number, draft_class text, college text ) CREATE TABLE player ( player_id number, player text, years_...
Count the number of different teams involved in match season.
SELECT COUNT(DISTINCT team) FROM match_season
spider
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
how many patients whose admission location is emergency room admit and year of birth is less than 1850?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.dob_year < "1850"
mimicsql_data
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE course...
Which of the courses I 've taken is considered the hardest ?
SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE program_course.workload = (SELECT MAX(PROGRAM_COURSEalias1.workload) ...
advising
CREATE TABLE table_name_25 ( bronze VARCHAR, silver VARCHAR )
Name the bronze when silver is 1
SELECT bronze FROM table_name_25 WHERE silver = 1
sql_create_context
CREATE TABLE table_name_92 ( date VARCHAR, opponent VARCHAR, week VARCHAR, game_site VARCHAR )
What is the date of the game in a week earlier than 10 played in Texas stadium agains the Atlanta Falcons?
SELECT date FROM table_name_92 WHERE week < 10 AND game_site = "texas stadium" AND opponent = "atlanta falcons"
sql_create_context
CREATE TABLE table_22288 ( "Departure" text, "Going to" text, "Calling at" text, "Arrival" text, "Operator" text )
Who was the train operator when the train departed at 11.02 in 1922?
SELECT "Operator" FROM table_22288 WHERE "Departure" = '11.02'
wikisql
CREATE TABLE table_2147588_4 ( vacator VARCHAR, successor VARCHAR )
When nathaniel g. taylor (u) is the successor what is the vacator?
SELECT vacator FROM table_2147588_4 WHERE successor = "Nathaniel G. Taylor (U)"
sql_create_context
CREATE TABLE table_2013 ( "Branding" text, "Callsign" text, "Frequency" text, "Power (kW)" text, "Location" text )
Where is the frequency 92.3mhz?
SELECT "Location" FROM table_2013 WHERE "Frequency" = '92.3MHz'
wikisql
CREATE TABLE table_name_63 ( surface VARCHAR, championship VARCHAR, outcome VARCHAR )
What surface has indian wells as the championship, with winner as the outcome?
SELECT surface FROM table_name_63 WHERE championship = "indian wells" AND outcome = "winner"
sql_create_context
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
Users with most deleted questions.
SELECT Users.Id, COUNT(Posts.Id) FROM Users LEFT JOIN Posts ON Users.Id = Posts.OwnerUserId WHERE Posts.DeletionDate IS NULL AND PostTypeId = 1 GROUP BY Users.Id
sede
CREATE TABLE table_1401 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game Site" text, "Attendance" real )
At which stadiums was attendance total 79176?
SELECT "Game Site" FROM table_1401 WHERE "Attendance" = '79176'
wikisql
CREATE TABLE table_dev_47 ( "id" int, "gender" string, "gestational_diabetes" bool, "systolic_blood_pressure_sbp" int, "leukopenia" int, "hemoglobin_a1c_hba1c" float, "cd4_count" int, "platelets" int, "diabetic" string, "elevated_blood_pressure" bool, "diastolic_blood_pressur...
elevated blood pressure > 130 mmhg systolic, > 85 mmhg diastolic
SELECT * FROM table_dev_47 WHERE elevated_blood_pressure = 1 OR (systolic_blood_pressure_sbp > 130 OR diastolic_blood_pressure_dbp > 85)
criteria2sql
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE comment_instructor ( instructor_id int...
What class can I take this semester that 's a prerequisite for most other classes ?
SELECT COUNT(DISTINCT COURSE_PREREQUISITEalias0.course_id), COURSEalias0.department, COURSEalias0.name, COURSEalias0.number FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course AS COURSEalias1, course_offering AS COURSE_OFFERINGali...
advising
CREATE TABLE table_26181 ( "Neighbourhood" text, "% 0-19" text, "% 20-39" text, "% 40-59" text, "% 60-74" text, "% 75 +" text )
What is every value for % 40-59 if % 60-74 is 12,40%?
SELECT "% 40-59" FROM table_26181 WHERE "% 60-74" = '12,40%'
wikisql
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
For those records from the products and each product's manufacturer, find name and price , and group by attribute founder, and visualize them by a bar chart, and sort by the Y from low to high.
SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Price
nvbench
CREATE TABLE table_35320 ( "Season" real, "Overall" real, "Slalom" text, "Giant Slalom" real, "Super G" text, "Downhill" text, "Combined" text )
What is the value for Slalom in seasons later than 1994 and overall value greater than 22?
SELECT "Slalom" FROM table_35320 WHERE "Season" > '1994' AND "Overall" > '22'
wikisql
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...
张昊焱这位参保人年门诊医疗费总额有多少元
SELECT SUM(mzb.MED_CLINIC_ID) FROM mzb WHERE mzb.PERSON_SEX = '张昊焱'
css
CREATE TABLE table_11803648_21 ( position VARCHAR, player VARCHAR )
What position does Cody Ceci play?
SELECT position FROM table_11803648_21 WHERE player = "Cody Ceci"
sql_create_context
CREATE TABLE table_name_55 ( home_team VARCHAR, venue VARCHAR )
Who was home at Princes Park?
SELECT home_team AS score FROM table_name_55 WHERE venue = "princes park"
sql_create_context
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime ...
how much does it cost to get diagnostic of bmi 33.0-33.9,adult?
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'diagnoses_icd' AND cost.event_id IN (SELECT diagnoses_icd.row_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'bmi 33.0-33.9,adult'))
mimic_iii
CREATE TABLE table_name_38 ( to_par VARCHAR, country VARCHAR, place VARCHAR )
What is the to par of the player from the United States with a t5 place?
SELECT to_par FROM table_name_38 WHERE country = "united states" AND place = "t5"
sql_create_context
CREATE TABLE table_18602462_22 ( round_of_16 VARCHAR, semifinals VARCHAR )
The semifinal score of vergeer ( ned ) l 0-6, 1-6 follows a round of 16 result of what?
SELECT round_of_16 FROM table_18602462_22 WHERE semifinals = "Vergeer ( NED ) L 0-6, 1-6"
sql_create_context
CREATE TABLE table_47260 ( "Country" text, "Skip" text, "Ends Won" real, "Ends Lost" real, "Blank Ends F/A" text, "Stolen Ends For" real, "Stolen Ends Against" real, "Shot %" real )
What is the lowest ends lost when the stolen ends for is less than 13, and stolten ends against is 6?
SELECT MIN("Ends Lost") FROM table_47260 WHERE "Stolen Ends For" < '13' AND "Stolen Ends Against" = '6'
wikisql
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
患者尤永年被门诊诊断为疾病I64.781,他的检测指标661673的结果定量及单位是怎么样的
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND...
css
CREATE TABLE table_29464 ( "#" real, "Episode" text, "Air Date" text, "Rating" text, "Share" text, "18-49 (Rating/Share)" text, "Viewers (m)" text, "Weekly Rank (#)" text )
when air date is october 14, 2010 what are all 18-49 (rating/share date.
SELECT "18-49 (Rating/Share)" FROM table_29464 WHERE "Air Date" = 'October 14, 2010'
wikisql
CREATE TABLE table_11820086_1 ( directed_by VARCHAR, us_viewers__millions_ VARCHAR )
Who directed the episode that was viewed by 2.57 million people in the U.S.?
SELECT directed_by FROM table_11820086_1 WHERE us_viewers__millions_ = "2.57"
sql_create_context
CREATE TABLE table_name_6 ( bronze VARCHAR, silver VARCHAR, total VARCHAR )
What is Bronze, when Silver is less than 89, and when Total is '4'?
SELECT bronze FROM table_name_6 WHERE silver < 89 AND total = 4
sql_create_context
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 with title length shorter than 15 characters.
SELECT Id AS "post_link", LENGTH(Title), * FROM Posts WHERE PostTypeId = 1 AND LENGTH(Title) < 15
sede
CREATE TABLE table_203_215 ( id number, "year" number, "competition" text, "venue" text, "position" text, "event" text, "notes" text )
did ito take 1st in the 10,000 m before or after he took 28th in the 10,000 m ?
SELECT (SELECT "year" FROM table_203_215 WHERE "position" = 1 AND "event" = '10,000m') < (SELECT "year" FROM table_203_215 WHERE "position" = 28 AND "event" = '10,000m')
squall
CREATE TABLE table_name_14 ( money___ VARCHAR, to_par VARCHAR )
How much money has a to par of E?
SELECT COUNT(money___) AS $__ FROM table_name_14 WHERE to_par = "e"
sql_create_context
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicatio...
how many patients until 4 years ago were diagnosed with change in mental status during the same month after being diagnosed with esophagitis - regurgitant?
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'change in mental status' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-4 year')) AS t1...
eicu
CREATE TABLE table_204_364 ( id number, "year" number, "competition" text, "venue" text, "position" text, "event" text, "notes" text )
how many 800m events ?
SELECT COUNT("event") FROM table_204_364 WHERE "event" = 800
squall
CREATE TABLE table_name_39 ( end_term INTEGER, start_term VARCHAR, name VARCHAR )
What is the smallest End term with a Start term of 1913, and a Name of ludwig iii?
SELECT MIN(end_term) FROM table_name_39 WHERE start_term = 1913 AND name = "ludwig iii"
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
show me the number of patients on main type of drug prescription who have procedure icd9 code 4523.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "4523" AND prescriptions.drug_type = "MAIN"
mimicsql_data
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...
查一下患者53607326踝部检验的各项指标结果
SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info JOIN person_info 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....
css
CREATE TABLE table_45394 ( "Rank" text, "Name" text, "Height (m)" real, "Height (ft)" real, "Floors" text )
What is the Height of the Canterbury House with 12 Floors and a Rank of 75=?
SELECT AVG("Height (ft)") FROM table_45394 WHERE "Floors" = '12' AND "Rank" = '75=' AND "Name" = 'canterbury house'
wikisql
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id...
Fast-gun' distribution for a user.
WITH Dates AS (SELECT a.Id, q.CreationDate AS QDate, a.CreationDate AS ADate FROM Posts AS q, Posts AS a WHERE q.Id = a.ParentId AND q.PostTypeId = 1 AND a.PostTypeId = 2 AND a.OwnerUserId = '##UserId##'), Delays AS (SELECT Id, CAST((JULIANDAY(ADate) - JULIANDAY(QDate)) * 1440.0 AS INT) AS Delay FROM Dates) SELECT SUM(...
sede
CREATE TABLE table_5182 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Record" text )
Location of brendan byrne arena had what score?
SELECT "Score" FROM table_5182 WHERE "Location" = 'brendan byrne arena'
wikisql
CREATE TABLE table_67516 ( "Venue" text, "City" text, "State" text, "Tickets Sold / Available" text, "Gross Revenue (1982)" text, "Gross Revenue (2011)" text )
Which city had a gross revenue in 2011 of $739,578?
SELECT "City" FROM table_67516 WHERE "Gross Revenue (2011)" = '$739,578'
wikisql
CREATE TABLE table_67054 ( "BR No." real, "Name" text, "Builder" text, "Whenbuilt" text, "Withdrawn" text )
When was moray firth built?
SELECT "Whenbuilt" FROM table_67054 WHERE "Name" = 'moray firth'
wikisql
CREATE TABLE fgwyjzb ( CLINIC_ID text, CLINIC_TYPE 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, ...
自01年12月21日起,到04年6月2日,医院0169842的哪些科室涉及的医疗费总额不少于7232.0元
SELECT COUNT(*) FROM (SELECT gwyjzb.MED_ORG_DEPT_CD FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '0169842' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2001-12-21' AND '2004-06-02' GROUP BY gwyjzb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) >= 7232.0 UNION SELECT fgwyjzb....
css
CREATE TABLE STUDENT ( STU_NUM int, STU_LNAME varchar(15), STU_FNAME varchar(15), STU_INIT varchar(1), STU_DOB datetime, STU_HRS int, STU_CLASS varchar(2), STU_GPA float(8), STU_TRANSFER numeric, DEPT_CODE varchar(18), STU_PHONE varchar(4), PROF_NUM int ) CREATE TABLE CL...
Which departments have the top 3 highest number of students? Show the department address and number of students with a pie chart.
SELECT DEPT_ADDRESS, COUNT(*) FROM STUDENT AS T1 JOIN DEPARTMENT AS T2 ON T1.DEPT_CODE = T2.DEPT_CODE GROUP BY T1.DEPT_CODE ORDER BY COUNT(*) DESC LIMIT 3
nvbench
CREATE TABLE table_name_10 ( cpu_chip VARCHAR, model VARCHAR, modem VARCHAR, type VARCHAR )
What is the CPU chip in the Dishplayer 7100, which is a dish tuner with a v.90 modem?
SELECT cpu_chip FROM table_name_10 WHERE modem = "v.90" AND type = "dish tuner" AND model = "dishplayer 7100"
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
count the number of patients whose year of birth is less than 2200 and lab test name is homocysteine?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2200" AND lab.label = "Homocysteine"
mimicsql_data
CREATE TABLE table_17482534_1 ( no_in_series VARCHAR, production_code VARCHAR )
What number in the series are the episodes with production code 5016/5017?
SELECT no_in_series FROM table_17482534_1 WHERE production_code = "5016/5017"
sql_create_context
CREATE TABLE endowment ( endowment_id int, School_id int, donator_name text, amount real ) CREATE TABLE School ( School_id text, School_name text, Location text, Mascot text, Enrollment int, IHSAA_Class text, IHSAA_Football_Class text, County text ) CREATE TABLE budget ...
Compute the total sum enrollment across county as a pie chart.
SELECT County, SUM(Enrollment) FROM School GROUP BY County
nvbench
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
What are the PreMajor classes ?
SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id
advising
CREATE TABLE table_204_982 ( id number, "party/electoral alliance" text, "seats" number, "change" number, "votes" number, "%" text )
total number of parties who lost seats in the argentine chamber of deputies in the legislative election of 1930
SELECT COUNT("party/electoral alliance") FROM table_204_982 WHERE "change" < 0
squall
CREATE TABLE table_69586 ( "Birth" text, "Marriage" text, "Became Consort" text, "Ceased to be Consort" text, "Death" text, "Spouse" text )
Name the marriage of the person who is married for christian viii
SELECT "Marriage" FROM table_69586 WHERE "Spouse" = 'christian viii'
wikisql
CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password VARCHAR(10), personal_name VARCHAR(40), middle_name VARCHAR(40), family_name VARCHAR(40) ) CREATE TABLE Courses ( course_id INTEGER, author_...
Find the number of the enrollment date for all the tests that have 'Pass' result.
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass"
nvbench
CREATE TABLE table_train_84 ( "id" int, "gender" string, "mini_mental_state_examination_mmse" int, "modified_hachinski_ischemia_scale" int, "post_menopausal" bool, "allergy_to_rifaximin" bool, "surgically_sterilized" bool, "body_mass_index_bmi" float, "age" float, "NOUSE" float )
age between 55 _ 85 ;
SELECT * FROM table_train_84 WHERE age >= 55 AND age <= 85
criteria2sql
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 type is emergency and procedure icd9 code is 9955?
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.icd9_code = "9955"
mimicsql_data
CREATE TABLE table_name_68 ( length VARCHAR, version VARCHAR )
What is the length of the UK remix version?
SELECT length FROM table_name_68 WHERE version = "uk remix"
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
provide the number of patients whose gender is m and diagnoses long title is unspecified procedure as the cause of abnormal reaction of patient, or of later complication, without mention of misadventure at time of procedure?
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 = "Unspecified procedure as the cause of abnormal reaction of patient, or of later complication, without mention of misadventure at time ...
mimicsql_data
CREATE TABLE table_name_1 ( location VARCHAR, circuit VARCHAR )
What is Location, when Circuit is August 16?
SELECT location FROM table_name_1 WHERE circuit = "august 16"
sql_create_context
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
when is the last time that patient 006-66713 had the minimum value of heartrate until 2100 days ago?
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-66713')) AND NOT vitalperiodic.heartrate IS NUL...
eicu
CREATE TABLE fires ( fire_year number, discovery_date number, discovery_doy number, discovery_time text, stat_cause_code number, stat_cause_descr text, cont_date text, cont_doy text, cont_time text, fire_size number, fire_size_class text, latitude number, longitude nu...
How many wildfires in Gloucester county have been larger than 10 acres?
SELECT COUNT(*) FROM fires WHERE county = "Gloucester" AND fire_size > 10
uswildfires
CREATE TABLE table_4106 ( "Player" text, "County" text, "Matches" real, "Innings" real, "Runs" real, "Average" text, "Highest Score" text, "100s" real, "50s" real )
What is the average for the player from Lancashire 1 100?
SELECT "Average" FROM table_4106 WHERE "County" = 'Lancashire' AND "100s" = '1'
wikisql
CREATE TABLE table_name_75 ( shooter VARCHAR, total VARCHAR )
Which shooter was the olympic bronze medalist?
SELECT shooter FROM table_name_75 WHERE total = "olympic bronze medalist"
sql_create_context
CREATE TABLE table_64779 ( "Channel" real, "Video" text, "Aspect" text, "PSIP Short Name" text, "Network" text )
Which video has a 16:9 aspect?
SELECT "Video" FROM table_64779 WHERE "Aspect" = '16:9'
wikisql
CREATE TABLE table_22163 ( "Title" text, "Developer" text, "Category" text, "Function" text, "Release date" text, "Version" text )
What is the function of 1.4 version of Windows live messenger?
SELECT "Function" FROM table_22163 WHERE "Version" = '1.4' AND "Title" = 'Windows Live Messenger'
wikisql
CREATE TABLE table_60897 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" real )
What is To par, when Total is less than 148, and when Country is 'South Africa'?
SELECT "To par" FROM table_60897 WHERE "Total" < '148' AND "Country" = 'south africa'
wikisql
CREATE TABLE table_name_35 ( result VARCHAR, date VARCHAR )
What was the result of the game played on May 9, 2012?
SELECT result FROM table_name_35 WHERE date = "may 9, 2012"
sql_create_context
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...
Single awarded badges and users.
WITH awarded AS (SELECT COUNT(*) AS num, Name, Class FROM Badges GROUP BY Name, Class HAVING COUNT(*) = 1) SELECT b.Name, b.Class, u.DisplayName FROM Badges AS b JOIN awarded AS a ON a.Name = b.Name AND a.Class = b.Class JOIN Users AS u ON u.Id = b.UserId
sede
CREATE TABLE table_5658 ( "Club" text, "Position in 2012\u201313" text, "First season in top division" text, "Number of seasons in top division" real, "Number of seasons in Prva HNL" real, "First season of current spell in top division" text, "Top division titles" text, "Last top divisio...
Name the average number of seasons for Prva HNL of 17
SELECT AVG("Number of seasons in top division") FROM table_5658 WHERE "Number of seasons in Prva HNL" = '17'
wikisql
CREATE TABLE table_1930 ( "Country" text, "Contestant" text, "Age" real, "Height (cm)" real, "Height (ft)" text, "Hometown" text )
When santiago del estero is the hometown who is the contestant?
SELECT "Contestant" FROM table_1930 WHERE "Hometown" = 'Santiago del Estero'
wikisql
CREATE TABLE table_26005 ( "Round" real, "Finishing Date" text, "Rally Name" text, "Rally Base" text, "Surface" text, "Support Category" text )
Name the rally base for rallye de france alsace
SELECT "Rally Base" FROM table_26005 WHERE "Rally Name" = 'Rallye de France Alsace'
wikisql
CREATE TABLE music_festival ( id number, music_festival text, date_of_ceremony text, category text, volume number, result text ) CREATE TABLE artist ( artist_id number, artist text, age number, famous_title text, famous_release_date text ) CREATE TABLE volume ( volume_i...
What are the famous titles of artists who have not only had volumes that spent more than 2 weeks on top but also volumes that spent less than 2 weeks on top?
SELECT T1.famous_title FROM artist AS T1 JOIN volume AS T2 ON T1.artist_id = T2.artist_id WHERE T2.weeks_on_top > 2 INTERSECT SELECT T1.famous_title FROM artist AS T1 JOIN volume AS T2 ON T1.artist_id = T2.artist_id WHERE T2.weeks_on_top < 2
spider
CREATE TABLE table_52527 ( "Munsee Delaware" text, "Unami Delaware" text, "De Laet (1633)" text, "Campanius (ca. 1645)" text, "Interpreter (1684?)" text, "Thomas (1698)" text )
What is the Campanius term for an Unami Delaware term of pal naxk?
SELECT "Campanius (ca. 1645)" FROM table_52527 WHERE "Unami Delaware" = 'palé·naxk'
wikisql
CREATE TABLE table_name_59 ( country VARCHAR, to_par VARCHAR )
What is the Country of the Player with a To par of +1?
SELECT country FROM table_name_59 WHERE to_par = "+1"
sql_create_context
CREATE TABLE table_62467 ( "Parish (Prestegjeld)" text, "Sub-Parish (Sokn)" text, "Church Name" text, "Year Built" text, "Location of the Church" text )
What is the Sub-Parish (Sokn) that was built in 1957 in the location of Stavang?
SELECT "Sub-Parish (Sokn)" FROM table_62467 WHERE "Year Built" = '1957' AND "Location of the Church" = 'stavang'
wikisql
CREATE TABLE table_name_28 ( team VARCHAR, car_no VARCHAR )
What team operates car 11?
SELECT team FROM table_name_28 WHERE car_no = "11"
sql_create_context
CREATE TABLE table_68244 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
Which of the opponents has a record of 17-25?
SELECT "Opponent" FROM table_68244 WHERE "Record" = '17-25'
wikisql
CREATE TABLE table_33417 ( "Round" real, "Overall" real, "Player" text, "Position" text, "School/Club Team" text )
Which player was drafted higher than 374 and went to the school Stephen F. Austin?
SELECT "Player" FROM table_33417 WHERE "Overall" < '374' AND "School/Club Team" = 'stephen f. austin'
wikisql
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
Return a bar chart on what are the names and average prices of products for manufacturers whose products cost on average 150 or more?, display in descending by the Name.
SELECT T2.Name, AVG(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC
nvbench
CREATE TABLE table_48263 ( "State" text, "Type" text, "Name" text, "Title" text, "Royal house" text, "From" text )
What is State, when From is '830 BC'?
SELECT "State" FROM table_48263 WHERE "From" = '830 bc'
wikisql
CREATE TABLE table_29647 ( "Member" text, "Electorate" text, "Province" text, "MPs term" text, "Election date" text )
What was the province if the electorate was Collingwood?
SELECT "Province" FROM table_29647 WHERE "Electorate" = 'Collingwood'
wikisql
CREATE TABLE company ( Company_ID int, Rank int, Company text, Headquarters text, Main_Industry text, Sales_billion real, Profits_billion real, Assets_billion real, Market_Value real ) CREATE TABLE station_company ( Station_ID int, Company_ID int, Rank_of_the_Year int ) ...
How many companies in each headquarter? Plot a bar chart, and I want to sort from low to high by the x-axis.
SELECT Headquarters, COUNT(Headquarters) FROM company GROUP BY Headquarters ORDER BY Headquarters
nvbench
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...
在2010年6月16日至2015年4月16日之中奚秀英病患常去的哪家医院治疗?
SELECT gwyjzb.MED_SER_ORG_NO FROM gwyjzb WHERE gwyjzb.PERSON_NM = '奚秀英' AND gwyjzb.IN_HOSP_DATE BETWEEN '2010-06-16' AND '2015-04-16' GROUP BY gwyjzb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT fgwyjzb.MED_SER_ORG_NO FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '奚秀英' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2010-06-1...
css
CREATE TABLE table_41823 ( "Week" real, "Date" text, "Time (CST)" text, "Opponent" text, "Result" text, "Game site" text, "Record" text, "NFL Recap" text )
What time (cst) has and NFL recap of recap with october 19, 2008 as the date?
SELECT "Time (CST)" FROM table_41823 WHERE "NFL Recap" = 'recap' AND "Date" = 'october 19, 2008'
wikisql
CREATE TABLE table_74411 ( "Rd." text, "Race" text, "Pole position" text, "Fastest lap" text, "Most laps led" text, "Winning driver" text, "Winning team" text )
Who had the fastest lap(s) when stefan wilson had the pole?
SELECT "Fastest lap" FROM table_74411 WHERE "Pole position" = 'Stefan Wilson'
wikisql
CREATE TABLE table_20351295_2 ( high_checkout VARCHAR, player VARCHAR )
What's Trina Gulliver's high checkout?
SELECT high_checkout FROM table_20351295_2 WHERE player = "Trina Gulliver"
sql_create_context