context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_6741 ( "Buechel & Manhart spelling (pronunciation)" text, "Ullrich" text, "Brandon University" text, "Deloria & Boas" text, "Dakota Mission" text, "Rood & Taylor" text, "Riggs" text, "Williamson" text, "University of Minnesota" text, "White Hat" text )
Rood & Taylor of o, and a Buechel & Manhart spelling (pronunciation) of o had what university of Minnesota?
SELECT "University of Minnesota" FROM table_6741 WHERE "Rood & Taylor" = 'o' AND "Buechel & Manhart spelling (pronunciation)" = 'o'
wikisql
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 text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
患者10580420所做的检验报告中有哪些报告对应的检验结果指标均正常?列出检验报告单号即可
SELECT jyjgzbb.BGDH 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 = '10580420' AND NOT jyjgzbb.BGDH IN (SELECT jyjgzb...
css
CREATE TABLE table_74489 ( "Conference" text, "# of Bids" real, "Record" text, "Win %" real, "Regional Finals" real )
For the Hockey East conference, what is the total number of win percentages when there are less than 4 bids?
SELECT COUNT("Win %") FROM table_74489 WHERE "Conference" = 'hockey east' AND "# of Bids" < '4'
wikisql
CREATE TABLE table_31374 ( "Country with flag" text, "Area (km\u00b2)" real, "Population (1 July 2005 est.)" real, "Population density (per km\u00b2)" text, "Capital" text )
What is every entry for area if capital is Port-au-Prince?
SELECT "Area (km\u00b2)" FROM table_31374 WHERE "Capital" = 'Port-au-Prince'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
what is primary disease of subject name kelly gallardo?
SELECT demographic.diagnosis FROM demographic WHERE demographic.name = "Kelly Gallardo"
mimicsql_data
CREATE TABLE table_26268 ( "Local Government Area" text, "Type" text, "Major Town" text, "Land Area (km\u00b2)" text, "Pop. 2006" real, "Density km \u22122" real, "Towns" real, "Est." real )
What type of local government area is Yalata?
SELECT "Type" FROM table_26268 WHERE "Local Government Area" = 'Yalata'
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...
民政补助金额在医疗就诊05137841004里面能给多少元钱?
SELECT CIVIL_SUBSIDY FROM t_kc24 WHERE MED_CLINIC_ID = '05137841004'
css
CREATE TABLE table_name_41 ( game_4 VARCHAR, game_3 VARCHAR )
For which Game 4, did David Boyle play in Game 3?
SELECT game_4 FROM table_name_41 WHERE game_3 = "david boyle"
sql_create_context
CREATE TABLE tracks ( id INTEGER, name VARCHAR(200), album_id INTEGER, media_type_id INTEGER, genre_id INTEGER, composer VARCHAR(220), milliseconds INTEGER, bytes INTEGER, unit_price NUMERIC(10,2) ) CREATE TABLE artists ( id INTEGER, name VARCHAR(120) ) CREATE TABLE genres ...
List the number of the name of all playlist, display by the x-axis from high to low please.
SELECT name, COUNT(name) FROM playlists GROUP BY name ORDER BY name DESC
nvbench
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId n...
Count of questions, comments, answers with tag over time.
SELECT DATEADD(week, DATEDIFF(day, '20000109', CreationDate) / 7, '20000109') AS "week", Tags.TagName, COUNT(DISTINCT Posts.Id) AS Posts, SUM(Posts.AnswerCount) AS Answers, SUM(Posts.CommentCount) AS Comments FROM Posts INNER JOIN PostTags ON PostTags.PostId = Posts.Id INNER JOIN Tags ON PostTags.TagId = Tags.Id WHERE ...
sede
CREATE TABLE musical ( musical_id number, name text, year number, award text, category text, nominee text, result text ) CREATE TABLE actor ( actor_id number, name text, musical_id number, character text, duration text, age number )
Return the duration of the actor with the greatest age.
SELECT duration FROM actor ORDER BY age DESC LIMIT 1
spider
CREATE TABLE table_name_62 ( commander VARCHAR, ship VARCHAR, complement VARCHAR, guns VARCHAR )
Which commander received complement larger than 240 , guns of 66 and ship of revolutie?
SELECT commander FROM table_name_62 WHERE complement > 240 AND guns = "66" AND ship = "revolutie"
sql_create_context
CREATE TABLE table_204_277 ( id number, "region" text, "country" text, "location" text, "size (m)" text, "payload (metric tonnes)" text, "degrees of freedom" number, "x horiz disp (mm)" number, "y horiz disp (mm)" number, "z vert disp (mm)" number, "x horiz vel (mm/s)" number...
which is the least region charted on this chart
SELECT "region" FROM table_204_277 GROUP BY "region" ORDER BY COUNT(*) LIMIT 1
squall
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellv...
how many hours has passed since patient 022-199074 had a glucose laboratory test for the first time on this hospital visit?
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-199074' AND patient.hos...
eicu
CREATE TABLE table_name_39 ( constructor VARCHAR, time_retired VARCHAR, grid VARCHAR )
I want the constructor for brakes and grid less than 14
SELECT constructor FROM table_name_39 WHERE time_retired = "brakes" AND grid < 14
sql_create_context
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
零一年六月六日至二一年四月九日,甜梦口服液在泌尿这个科室有多少开药量
SELECT COUNT(*) FROM t_kc22 WHERE MED_ORG_DEPT_NM = '泌尿外科' AND STA_DATE BETWEEN '2001-06-06' AND '2021-04-09' AND SOC_SRT_DIRE_NM = '甜梦口服液'
css
CREATE TABLE station ( id INTEGER, name TEXT, lat NUMERIC, long NUMERIC, dock_count INTEGER, city TEXT, installation_date TEXT ) CREATE TABLE weather ( date TEXT, max_temperature_f INTEGER, mean_temperature_f INTEGER, min_temperature_f INTEGER, max_dew_point_f INTEGER, ...
Give the proportion of what is the name of every city that has at least 15 stations and how many stations does it have?
SELECT city, COUNT(*) FROM station GROUP BY city
nvbench
CREATE TABLE location ( restaurant_id int, house_number int, street_name varchar, city_name varchar ) CREATE TABLE restaurant ( id int, name varchar, food_type varchar, city_name varchar, rating "decimal ) CREATE TABLE geographic ( city_name varchar, county varchar, reg...
What is the best restaurant in san francisco for french food ?
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'san francisco' AND restaurant.food_type = 'french' AND restaurant.id = location.restaurant_id AND restaurant.rating = (SELECT MAX(RESTAURANTalias1.rating) FROM location AS LOCATIONalias1, restaurant AS RESTAURANTalias1 W...
restaurants
CREATE TABLE table_29604 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "First Star" text, "Decision" text, "Location" text, "Attendance" real, "Record" text, "Points" real )
Who made the decisions in the game whose first star was V. Lecavalier?
SELECT "Decision" FROM table_29604 WHERE "First Star" = 'V. Lecavalier'
wikisql
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE patients ( ...
count the number of current patients whose age is in their 50s.
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.dischtime IS NULL AND admissions.age BETWEEN 50 AND 59
mimic_iii
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time )...
was respiration from patient 013-38992 greater than 19.0 on 12/31/last year?
SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-38992')) AND vitalperiodic.respiration > 19.0 AND NOT vitalperio...
eicu
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...
韩嘉容这个患者在之前有过哪些门诊诊断记录
SELECT mzjzjlb.JZZDBM, mzjzjlb.JZZDSM FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.person_info_XM = '韩嘉容'
css
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 Subjects ( subject_id INTEGER, subje...
What are the number of the completion dates of all the tests that have result 'Fail'?, show from high to low by the Y.
SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" ORDER BY COUNT(date_of_completion) DESC
nvbench
CREATE TABLE Dorm_amenity ( amenid INTEGER, amenity_name VARCHAR(25) ) 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 Lives_in ( stuid INTEGER, ...
Visualize a bar chart for how many students are older than average for each gender?, list by the the total number from high to low.
SELECT Sex, COUNT(*) FROM Student WHERE Age > (SELECT AVG(Age) FROM Student) GROUP BY Sex ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_name_72 ( venue VARCHAR, home_team VARCHAR )
Where did South Melbourne play as the home team?
SELECT venue FROM table_name_72 WHERE home_team = "south melbourne"
sql_create_context
CREATE TABLE table_58136 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the smallest crowd when the away team scored 10.18 (78)?
SELECT MIN("Crowd") FROM table_58136 WHERE "Away team score" = '10.18 (78)'
wikisql
CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), ...
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, return a bar chart about the distribution of job_id and the average of employee_id , and group by attribute job_id, and I want to rank y-axis in desc order please.
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY AVG(EMPLOYEE_ID) DESC
nvbench
CREATE TABLE table_32624 ( "Stage" text, "Date" text, "Route" text, "Terrain" text, "Length" text, "Winner" text )
Who was the winner of stage 12?
SELECT "Winner" FROM table_32624 WHERE "Stage" = '12'
wikisql
CREATE TABLE table_26565917_2 ( title VARCHAR, no_in_season VARCHAR )
what was the name of episode 5?
SELECT title FROM table_26565917_2 WHERE no_in_season = 5
sql_create_context
CREATE TABLE table_7948 ( "Date" text, "Tournament" text, "Surface" text, "Partnering" text, "Opponents in the final" text, "Score" text )
What is Score, when Date is May 7, 2006?
SELECT "Score" FROM table_7948 WHERE "Date" = 'may 7, 2006'
wikisql
CREATE TABLE table_1140080_2 ( report VARCHAR, location VARCHAR )
what's the report with location sterreichring
SELECT report FROM table_1140080_2 WHERE location = "Österreichring"
sql_create_context
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABL...
what are the percentile of 83.0 in a glucose lab test given the same age of patient 42473 during their current hospital visit?
SELECT DISTINCT t1.c1 FROM (SELECT labevents.valuenum, PERCENT_RANK() OVER (ORDER BY labevents.valuenum) AS c1 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'glucose') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age =...
mimic_iii
CREATE TABLE table_204_604 ( id number, "year" number, "date" text, "driver" text, "team" text, "manufacturer" text, "race distance\nlaps" number, "race distance\nmiles (km)" text, "race time" text, "average speed\n(mph)" number, "report" text )
how many laps did tony stewart race in 2012 ?
SELECT "race distance\nlaps" FROM table_204_604 WHERE "driver" = 'tony stewart'
squall
CREATE TABLE table_77058 ( "Name" text, "Gain" real, "Loss" real, "Long" real, "Avg/G" real )
Which Avg/G has a Name of david allen, and a Gain larger than 371?
SELECT AVG("Avg/G") FROM table_77058 WHERE "Name" = 'david allen' AND "Gain" > '371'
wikisql
CREATE TABLE table_2234 ( "Pos" text, "No" text, "Driver" text, "Constructor" text, "Part 1" text, "Part 2" text, "Part 3" text, "Grid" text )
What was the time in part 3 when Nick Heidfeld was the driver?
SELECT "Part 3" FROM table_2234 WHERE "Driver" = 'Nick Heidfeld'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, val...
when was first time patient 5142 was measured with a arterial bp [systolic] greater than 144.0 on last month/03?
SELECT chartevents.charttime 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 = 5142)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ...
mimic_iii
CREATE TABLE table_name_24 ( opponent VARCHAR, round VARCHAR, venue VARCHAR )
What is the Opponent with a Round with 3, and a Venue of home?
SELECT opponent FROM table_name_24 WHERE round = "3" AND venue = "home"
sql_create_context
CREATE TABLE table_26745426_2 ( Ends VARCHAR, stolen_ends VARCHAR )
Name the number of ends lost for 6 stolen ends
SELECT COUNT(Ends) AS lost FROM table_26745426_2 WHERE stolen_ends = 6
sql_create_context
CREATE TABLE table_44397 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
What date was Bury the home team?
SELECT "Date" FROM table_44397 WHERE "Away team" = 'bury'
wikisql
CREATE TABLE table_name_75 ( flattening_ratio VARCHAR, equatorial_diameter VARCHAR )
What is the Flattening ratio associated with the Equatorial diameter of 120,536km?
SELECT flattening_ratio FROM table_name_75 WHERE equatorial_diameter = "120,536km"
sql_create_context
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
在医院4429415入院诊断的时候患者83841154的疾病名称不含有鼻炎的医疗就诊记录是啥编号?
SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '83841154' AND MED_SER_ORG_NO = '4429415' AND NOT IN_DIAG_DIS_NM LIKE '%鼻炎%'
css
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 Researc...
List the number of the description of the outcomes for all projects, and show by the X-axis in ascending.
SELECT outcome_description, COUNT(outcome_description) FROM Research_Outcomes AS T1 JOIN Project_Outcomes AS T2 ON T1.outcome_code = T2.outcome_code GROUP BY outcome_description ORDER BY outcome_description
nvbench
CREATE TABLE table_name_65 ( season INTEGER, wins VARCHAR, podiums VARCHAR, races VARCHAR )
What is the newest Season in which had 0 Podiums, and having 1 total of Races, as well as total wins larger than 0?
SELECT MAX(season) FROM table_name_65 WHERE podiums = 0 AND races = 1 AND wins > 0
sql_create_context
CREATE TABLE table_203_854 ( id number, "position" number, "driver" text, "no." text, "car" text, "entrant" text, "rd 1" number, "rd 2" number, "rd 3" number, "rd 4" number, "rd 5" number, "rd 6" number, "rd 7" number, "rd 8" number, "total" number )
who was the next highest scorer after max twigg ?
SELECT "driver" FROM table_203_854 WHERE "total" < (SELECT "total" FROM table_203_854 WHERE "driver" = 'max twigg') ORDER BY "total" DESC LIMIT 1
squall
CREATE TABLE table_name_40 ( elevation__ft_ INTEGER, elevation__m_ VARCHAR, type VARCHAR, name VARCHAR )
Type of stratovolcano, and a Name of goat rocks, and a Elevation (m) larger than 2,494 has what highest elevation in feet?
SELECT MAX(elevation__ft_) FROM table_name_40 WHERE type = "stratovolcano" AND name = "goat rocks" AND elevation__m_ > 2 OFFSET 494
sql_create_context
CREATE TABLE table_12298 ( "Main contestant" text, "Co-contestant (Yaar vs. Pyaar)" text, "Date performed" text, "Scores by each individual judge" text, "Total score/week" text, "Position" text, "Status" text )
What Scores by each individual judge has a Status of current, and a Co-contestant (Yaar vs. Pyaar) of krushna abhishek?
SELECT "Scores by each individual judge" FROM table_12298 WHERE "Status" = 'current' AND "Co-contestant (Yaar vs. Pyaar)" = 'krushna abhishek'
wikisql
CREATE TABLE table_18015 ( "Name" text, "GP" real, "Solo" real, "Ast" real, "Total" real, "TFL-Yds" text, "No-Yds" text, "BrUp" real, "QBH" real, "No.-Yds" text, "Avg" text, "TD" real, "Long" real, "Rcv-Yds" text, "FF" real, "Blkd Kick" real )
List all number of yards with an AST of 8.
SELECT "No-Yds" FROM table_18015 WHERE "Ast" = '8'
wikisql
CREATE TABLE festival_detail ( Festival_ID int, Festival_Name text, Chair_Name text, Location text, Year int, Num_of_Audience int ) CREATE TABLE artwork ( Artwork_ID int, Type text, Name text ) CREATE TABLE nomination ( Artwork_ID int, Festival_ID int, Result text )
Show the total number from each type, and order y axis in ascending order.
SELECT Type, COUNT(*) FROM artwork GROUP BY Type ORDER BY COUNT(*)
nvbench
CREATE TABLE table_1918 ( "Township" text, "County" text, "Pop. (2010)" real, "Land ( sqmi )" text, "Water (sqmi)" text, "Latitude" text, "Longitude" text, "GEO ID" real, "ANSI code" real )
Name the land where geo id is 3807717980
SELECT "Land ( sqmi )" FROM table_1918 WHERE "GEO ID" = '3807717980'
wikisql
CREATE TABLE table_35342 ( "Designation" text, "Bore" text, "Weight" text, "Service Charge" text, "Range (yards)" text, "Number Made" real )
What is the service chage of the boat howitzers with a 12-pdr light destination?
SELECT "Service Charge" FROM table_35342 WHERE "Designation" = '12-pdr light'
wikisql
CREATE TABLE table_name_17 ( assists INTEGER, name VARCHAR, points VARCHAR )
What is the smallest number of assists for Ben Duggan with less than 7 points?
SELECT MIN(assists) FROM table_name_17 WHERE name = "ben duggan" AND points < 7
sql_create_context
CREATE TABLE table_28719193_19 ( city VARCHAR, stadium VARCHAR )
What was the city whose stadium is Gerald J. Ford Stadium?
SELECT city FROM table_28719193_19 WHERE stadium = "Gerald J. Ford stadium"
sql_create_context
CREATE TABLE table_26702204_1 ( production_code VARCHAR, us_viewers__million_ VARCHAR )
What is the production code when the u.s. viewers (million) is 11.76?
SELECT production_code FROM table_26702204_1 WHERE us_viewers__million_ = "11.76"
sql_create_context
CREATE TABLE table_39233 ( "Nation" text, "T Score" real, "A Score" real, "E Score" real, "Total" real )
What is the total of the team with a T score greater than 8 and an E score less than 8.4?
SELECT SUM("Total") FROM table_39233 WHERE "T Score" > '8' AND "E Score" < '8.4'
wikisql
CREATE TABLE route ( train_id int, station_id int ) CREATE TABLE train ( id int, train_number int, name text, origin text, destination text, time text, interval text ) CREATE TABLE station ( id int, network_name text, services text, local_authority text ) CREATE TA...
Compare all train names' total numbers.
SELECT name, COUNT(name) FROM train GROUP BY name
nvbench
CREATE TABLE table_train_142 ( "id" int, "allergy_to_monoclonal_antibodies" bool, "allergic_reactions" bool, "allergy_to_methylprednisolone" bool, "mini_mental_state_examination_mmse" int, "depressed_mood" bool, "urea_cycle_disorder" bool, "clinical_contraindication_use_valproate" bool, ...
a diagnosis of alzheimer's's disease ( nincds _ adrda criterion ) , and mini _ mental status examination ( mmse ) score between > / = 18 and < / = 26
SELECT * FROM table_train_142 WHERE alzheimer_disease_ad = 1 AND (mini_mental_state_examination_mmse >= 18 AND mini_mental_state_examination_mmse <= 26)
criteria2sql
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ...
since 2102, has patient 19352 been diagnosed with any illness?
SELECT COUNT(*) > 0 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19352) AND STRFTIME('%y', diagnoses_icd.charttime) >= '2102'
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...
卫星纬这位患者的204895指标在零一年四月三十日至零六年一月三十一日期间的情况
SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZ...
css
CREATE TABLE table_13998897_1 ( height_m___ft__ VARCHAR, notes VARCHAR )
how many height m ( ft ) with notes being via wccv; formerly w236aj
SELECT COUNT(height_m___ft__) FROM table_13998897_1 WHERE notes = "via WCCV; formerly W236AJ"
sql_create_context
CREATE TABLE table_19977 ( "No." real, "English name" text, "Bulgarian name" text, "Bulgarian name ( Transliteration )" text, "Old Bulgarian Names" text, "Old Bulgarian name (Transliteration)" text, "Old Bulgarian name - Meaning" text )
Name the old bulgarian names for yanuari
SELECT "Old Bulgarian Names" FROM table_19977 WHERE "Bulgarian name ( Transliteration )" = 'Yanuari'
wikisql
CREATE TABLE table_35995 ( "Code" text, "Vehicle" text, "Year" text, "Displacement" text, "Bore" text, "Stroke" text, "C.R." text, "Max. Power" text )
What stroke has a max power of 109 ps(80kw)@4000 rpm?
SELECT "Stroke" FROM table_35995 WHERE "Max. Power" = '109 ps(80kw)@4000 rpm'
wikisql
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE TagSynonyms ( Id number...
How many upvotes do I have for each tag? (Wiki & Non-Wiki). how long before I get tag badges?
SELECT TagName, SUM(CASE WHEN Posts.CommunityOwnedDate IS NULL OR Votes.CreationDate < Posts.CommunityOwnedDate THEN 1 ELSE 0 END) AS NonWikiUpvotes, COUNT(*) AS UpVotes FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Votes ON Votes.PostId = Post...
sede
CREATE TABLE table_53293 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
How big was the crowd when Richmond was the away team?
SELECT "Crowd" FROM table_53293 WHERE "Away team" = 'richmond'
wikisql
CREATE TABLE table_29295 ( "Episode No. Episode No. refers to the episodes number in the overall series, whereas Series No. refers to the episodes number in this particular series." real, "Series No." real, "Episode" text, "Director" text, "Writer(s)" text, "Original airdate" text )
How many writers for the episode 'peace, brother'?
SELECT COUNT("Writer(s)") FROM table_29295 WHERE "Episode" = 'Peace, Brother'
wikisql
CREATE TABLE table_201_36 ( id number, "year" number, "title" text, "role" text, "notes" text )
which year had the most credits ?
SELECT "year" FROM table_201_36 GROUP BY "year" ORDER BY COUNT(*) DESC LIMIT 1
squall
CREATE TABLE table_4684 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Where did Hawthorn play as the away team?
SELECT "Venue" FROM table_4684 WHERE "Away team" = 'hawthorn'
wikisql
CREATE TABLE table_21315 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location/Attendance" text, "Record" text )
Name the record for june 7
SELECT "Record" FROM table_21315 WHERE "Date" = 'June 7'
wikisql
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, ...
2004-04-06到2016-04-25,6607183医院内有多少科室在门诊就诊中开出的检验报告单不多于13张
SELECT COUNT(*) FROM (SELECT zyjybgb.KSBM FROM mzjzjlb JOIN zyjybgb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '6607183' AND zyjybgb.BGRQ BETWEEN '2004-04-06' AND '2016-04-25' GROUP BY zyjybgb.KSBM HAVING COUNT(*) <= 13 UNION SELECT mzjybgb.KSBM FROM mzjz...
css
CREATE TABLE table_14620 ( "Celebrity" text, "Background" text, "Original Team" text, "Hometown" text, "Result" text, "Raised" text )
How much did the Hydra team from Bronx, New York raise?
SELECT "Raised" FROM table_14620 WHERE "Original Team" = 'hydra' AND "Hometown" = 'bronx, new york'
wikisql
CREATE TABLE table_name_75 ( away_team VARCHAR, score VARCHAR )
Who was the away team for the game with a score of 139-119?
SELECT away_team FROM table_name_75 WHERE score = "139-119"
sql_create_context
CREATE TABLE table_6743 ( "Buechel & Manhart spelling (pronunciation)" text, "Ullrich" text, "Brandon University" text, "Deloria & Boas" text, "Dakota Mission" text, "Rood & Taylor" text, "Riggs" text, "Williamson" text, "University of Minnesota" text, "White Hat" text )
Deloria & Boas of n included what university of Minnesota?
SELECT "University of Minnesota" FROM table_6743 WHERE "Deloria & Boas" = 'n'
wikisql
CREATE TABLE table_11900773_4 ( denomination VARCHAR, theme VARCHAR )
What denominations are the stamps with themes opera, l opold simoneau and pierrette alarie?
SELECT denomination FROM table_11900773_4 WHERE theme = "Opera, Léopold Simoneau and Pierrette Alarie"
sql_create_context
CREATE TABLE Photos ( Photo_ID INTEGER, Tourist_Attraction_ID INTEGER, Name VARCHAR(255), Description VARCHAR(255), Filename VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Hotels ( hotel_id INTEGER, star_rating_code CHAR(15), pets_allowed_yn CHAR(1), price_range real, ...
A line chart for what are the number of the distinct visit dates?, rank by the X in ascending please.
SELECT Visit_Date, COUNT(Visit_Date) FROM Visits ORDER BY Visit_Date
nvbench
CREATE TABLE table_name_9 ( bronze VARCHAR, nation VARCHAR )
How many bronzes did netherlands win?
SELECT bronze FROM table_name_9 WHERE nation = "netherlands"
sql_create_context
CREATE TABLE table_23259 ( "Institution" text, "Location" text, "Nickname" text, "Founded" real, "Type" text, "Enrollment" real, "Primary Conference" text, "LEC Sport" text )
When was the school in Salem, Massachusetts located?
SELECT "Founded" FROM table_23259 WHERE "Location" = 'Salem, Massachusetts'
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...
医疗机构9923455使用次数前12名的项目有哪些
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.t_kc21_MED_SER_ORG_NO = '9923455' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 12
css
CREATE TABLE table_41281 ( "Season" text, "Skip" text, "Third" text, "Second" text, "Lead" text )
What is the Lead for the 1999 00 season?
SELECT "Lead" FROM table_41281 WHERE "Season" = '1999–00'
wikisql
CREATE TABLE table_28019988_2 ( series__number VARCHAR, production_code VARCHAR )
What is the series number for the episode with production code bdf109?
SELECT series__number FROM table_28019988_2 WHERE production_code = "BDF109"
sql_create_context
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, ic...
when was the last time patient 030-58018 has been diagnosed with malignancy - cancer with metastases to the lung until 1 year ago?
SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-58018')) AND diagnosis.diagnosisname = 'malignancy - cancer w...
eicu
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 flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, ...
show me the flights available from ATLANTA to BALTIMORE leaving ATLANTA in the morning
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTI...
atis
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost numbe...
did patient 027-136480 in 07/this year receive a peak airway/pressure lab test?
SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-136480')) AND lab.labname = 'peak airway/pressure' AND DATETIME(lab.labresulttime, '...
eicu
CREATE TABLE table_name_17 ( lane INTEGER, country VARCHAR, react VARCHAR )
What is the lowest lane for Nigeria, with a react less than 0.133?
SELECT MIN(lane) FROM table_name_17 WHERE country = "nigeria" AND react < 0.133
sql_create_context
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time )...
how much does it cost to take a drug called furosemide 20 mg po tabs?
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'furosemide 20 mg po tabs')
eicu
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( uniquepid text, ...
what was the first time that the sao2 of patient 017-9785 was, , greater than 88.0?
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 = '017-9785')) AND vitalperiodic.sao2 > 88.0 AND NOT v...
eicu
CREATE TABLE table_18228 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
Which incumbent was first elected in 1958?
SELECT "Incumbent" FROM table_18228 WHERE "First elected" = '1958'
wikisql
CREATE TABLE table_name_15 ( name VARCHAR, bodyweight VARCHAR )
Which person has a bodyweight of 73.6?
SELECT name FROM table_name_15 WHERE bodyweight = 73.6
sql_create_context
CREATE TABLE table_33842 ( "Kanji" text, "Name (Translation)" text, "Builder" text, "Laid down" text, "Launched" text, "Completed" text )
What is the date that the item was laid down if it was launched on 1899-04-25?
SELECT "Laid down" FROM table_33842 WHERE "Launched" = '1899-04-25'
wikisql
CREATE TABLE table_68856 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text )
Name the ICAO for IATA of ccu
SELECT "ICAO" FROM table_68856 WHERE "IATA" = 'ccu'
wikisql
CREATE TABLE roles ( role_code text, role_name text, role_description text ) CREATE TABLE employees ( employee_id number, role_code text, employee_name text, gender_mfu text, date_of_birth time, other_details text ) CREATE TABLE ref_document_types ( document_type_code text, ...
Find the number of employees we have.
SELECT COUNT(*) FROM employees
spider
CREATE TABLE table_1341690_35 ( candidates VARCHAR, incumbent VARCHAR )
Who were the candidates in the district won by the incumbent Del Latta?
SELECT candidates FROM table_1341690_35 WHERE incumbent = "Del Latta"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
列出韩安和这位病患在11年3月21日到19年12月12日内接受检查时开出的所有检验报告单中的标本采集部位
SELECT jybgb.BBCJBW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJL...
css
CREATE TABLE table_11214772_2 ( location VARCHAR, year VARCHAR )
Where was the final game played in 2007
SELECT location FROM table_11214772_2 WHERE year = 2007
sql_create_context
CREATE TABLE home_game ( year INTEGER, league_id TEXT, team_id TEXT, park_id TEXT, span_first TEXT, span_last TEXT, games INTEGER, openings INTEGER, attendance INTEGER ) CREATE TABLE college ( college_id TEXT, name_full TEXT, city TEXT, state TEXT, country TEXT )...
For each year, bin the year into day of the week interval, and return the total number of times the team Boston Red Stockings won in the postseasons using a line chart, sort by the x axis in desc.
SELECT year, SUM(COUNT(*)) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' ORDER BY year DESC
nvbench
CREATE TABLE table_49015 ( "Name" text, "Nationality" text, "Position" text, "S\u00e3o Paulo career" text, "Appearances" real, "Goals" real )
WHAT SAN PAULO CAREER HAD SMALLER THAN 201 APPEARANCES, SMALLER THAN 2 GOALS, AND FOR RICARDO ROCHA?
SELECT "S\u00e3o Paulo career" FROM table_49015 WHERE "Appearances" < '201' AND "Goals" < '2' AND "Name" = 'ricardo rocha'
wikisql
CREATE TABLE table_58183 ( "Nationality" text, "Position" text, "Tottenham Hotspur career" text, "Club Apps" text, "Goals" text )
How many goals did the player with 229 club apps have?
SELECT "Goals" FROM table_58183 WHERE "Club Apps" = '229'
wikisql
CREATE TABLE table_64103 ( "Draw" real, "Language" text, "Artist" text, "Song" text, "English translation" text, "Place" real, "Points" real )
Which points has place smaller than 2?
SELECT "Points" FROM table_64103 WHERE "Place" < '2'
wikisql
CREATE TABLE table_name_80 ( points INTEGER, entrant VARCHAR, year VARCHAR )
How many points after 1960 for fred tuck cars?
SELECT MAX(points) FROM table_name_80 WHERE entrant = "fred tuck cars" AND year > 1960
sql_create_context
CREATE TABLE table_2263 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text )
Who were the writers of episode 20?
SELECT "Written by" FROM table_2263 WHERE "No. in season" = '20'
wikisql
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE microlab ( microlabid number, ...
the last time patient 013-29301 was prescribed protonix and zofran at the same time in 08/this year?
SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'zofran' AND patient.uniquepid = '013-29301' AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TI...
eicu
CREATE TABLE table_203_759 ( id number, "year" number, "company" text, "number of members affected" number, "duration of strike" text, "notes" text )
how long were employees of nynex on strike ?
SELECT "duration of strike" FROM table_203_759 WHERE "company" = 'nynex'
squall