context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_77585 ( "Rank" real, "Rider" text, "Team" text, "Speed" text, "Time" text )
What is the time of the rider with a 398cc yamaha?
SELECT "Time" FROM table_77585 WHERE "Team" = '398cc yamaha'
wikisql
CREATE TABLE table_23122988_1 ( comedians VARCHAR, location VARCHAR )
Who were the comedians during the episode located in Birmingham Hippodrome?
SELECT comedians FROM table_23122988_1 WHERE location = "Birmingham Hippodrome"
sql_create_context
CREATE TABLE table_67097 ( "Player" text, "Years" text, "Games played" real, "Goals allowed" real, "Goals against average" real )
What is the average goals against average for those playing more than 78 games?
SELECT AVG("Goals against average") FROM table_67097 WHERE "Games played" > '78'
wikisql
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE program ( program_id int, name varchar, college varc...
List the courses that satisfy the Other requirement that are on Intercultural Drama .
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Intercultural Drama%' OR course.description LIKE '%Intercultural Drama%' OR course.name LIKE '%I...
advising
CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE state ( state_code text, state_name text, country_name text ) ...
what type of plane is a D9S
SELECT DISTINCT aircraft_code FROM aircraft WHERE aircraft_code = 'D9S'
atis
CREATE TABLE SUBJECTS ( subject_name VARCHAR )
List all the subject names.
SELECT subject_name FROM SUBJECTS
sql_create_context
CREATE TABLE table_18081 ( "Complete Series" text, "Region 1" text, "Region 2" text, "Region 4" text, "DVD Extras and Bonus Features" text, "Number Of Discs" real )
Name the region 4 for the complete fifth series
SELECT "Region 4" FROM table_18081 WHERE "Complete Series" = 'The Complete Fifth Series'
wikisql
CREATE TABLE table_24084 ( "Medal of Honor" text, "Coast Guard Cross" text, "Navy Cross" text, "Distinguished Service Cross" text, "Air Force Cross" text, "Homeland Security Distinguished Service Medal" text )
What is the coast guard cross when you recieve the navy distinguished service medal?
SELECT "Coast Guard Cross" FROM table_24084 WHERE "Distinguished Service Cross" = 'Navy Distinguished Service Medal'
wikisql
CREATE TABLE player ( id number, player_api_id number, player_name text, player_fifa_api_id number, birthday text, height number, weight number ) CREATE TABLE team_attributes ( id number, team_fifa_api_id number, team_api_id number, date text, buildupplayspeed number, ...
Of all players with an overall rating greater than 80, how many are right-footed and left-footed?
SELECT preferred_foot, COUNT(*) FROM player_attributes WHERE overall_rating > 80 GROUP BY preferred_foot
spider
CREATE TABLE table_name_5 ( Id VARCHAR )
What was 2009, when 2001 was, 'not masters series'?
SELECT 2009 FROM table_name_5 WHERE 2001 = "not masters series"
sql_create_context
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
on the current icu visit patient 5828's arterial bp [systolic] was greater than 88.0?
SELECT COUNT(*) > 0 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 = 5828) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_item...
mimic_iii
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, star...
Do you have any other suggestions for easier theory classes than ES 395 ?
SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE area.area LIKE '%theory%' AND program_course.workload < (SELECT MIN(PROGRAM_COURSEalias1....
advising
CREATE TABLE table_70029 ( "Year" real, "English title" text, "Original title" text, "Country" text, "Director(s)" text )
What country had a film in 1993?
SELECT "Country" FROM table_70029 WHERE "Year" = '1993'
wikisql
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, h...
what were the number of agent specific therapy - beta blockers overdose procedures that were performed in 2105?
SELECT COUNT(*) FROM treatment WHERE treatment.treatmentname = 'agent specific therapy - beta blockers overdose' AND STRFTIME('%y', treatment.treatmenttime) = '2105'
eicu
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
tell me the drug code of phenylephrine medication.
SELECT prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "Phenylephrine"
mimicsql_data
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 price , and group by attribute name, and could you sort in asc by the Y-axis?
SELECT T2.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Price
nvbench
CREATE TABLE table_name_98 ( name VARCHAR, location VARCHAR, entered_service VARCHAR )
Which is located in Angola and entered service in 1988?
SELECT name FROM table_name_98 WHERE location = "angola" AND entered_service = "1988"
sql_create_context
CREATE TABLE table_18305523_2 ( story_title VARCHAR, artist_s VARCHAR )
What is the title of the issue where the art was done by Barry Kitson and Farmer?
SELECT story_title FROM table_18305523_2 WHERE artist_s = "Barry Kitson and Farmer"
sql_create_context
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE...
JPA and Hibernate Questions by Year.
SELECT COUNT(*) AS QuestionCount, CAST(TIME_TO_STR(Posts.CreationDate, '%Y') AS INT) AS Year FROM Posts JOIN PostTags ON Posts.Id = PostTags.PostId JOIN Tags ON Tags.Id = PostTags.TagId WHERE Tags.TagName = 'hibernate' OR Tags.TagName = 'jpa' GROUP BY TIME_TO_STR(Posts.CreationDate, '%Y') ORDER BY Year DESC
sede
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...
在2002年5月16号到2019年10月5号这段时间里,编码为4112809的医院非科室儿科呼吸内科负责的所有医疗就诊记录有哪些呀?
SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4112809' AND t_kc21.IN_HOSP_DATE BETWEEN '2002-05-16' AND '2019-10-05' EXCEPT SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4112809' AND t_kc21.IN_HOSP_DATE BETWEEN '2002-05-16' AND '2019-10-05' AND t_kc21.MED_ORG_DEPT_NM = '小儿呼吸内科'
css
CREATE TABLE table_41027 ( "Tournament" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "Win %" text )
Which 2007 has a 2003 of 1r?
SELECT "2007" FROM table_41027 WHERE "2003" = '1r'
wikisql
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
For all employees who have the letters D or S in their first name, return a scatter chart about the correlation between salary and department_id .
SELECT SALARY, DEPARTMENT_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
nvbench
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, Creati...
trying widthrow the HTML posts.
SELECT * FROM Posts WHERE Id = 1
sede
CREATE TABLE table_15327 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Tyres" text, "Points" real )
Which chassis had 16 points?
SELECT "Chassis" FROM table_15327 WHERE "Points" = '16'
wikisql
CREATE TABLE table_38119 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Record" text )
What home has 136-134 as the score?
SELECT "Home" FROM table_38119 WHERE "Score" = '136-134'
wikisql
CREATE TABLE table_name_47 ( home_team VARCHAR, venue VARCHAR )
What team has Windy Hill as their home venue
SELECT home_team AS score FROM table_name_47 WHERE venue = "windy hill"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number,...
列出患者许元驹就诊科室名称包含性病的所有门诊就诊在医院9825569中记录的流水号?
SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '许元驹' AND hz_info.YLJGDM = '9825569' AND mzjzjlb.JZKSMC LIKE '%性病%'
css
CREATE TABLE table_23939 ( "County" text, "Obama%" text, "Obama#" real, "McCain%" text, "McCain#" real )
What percentage of the votes in Tippah did Obama get?
SELECT "Obama%" FROM table_23939 WHERE "County" = 'Tippah'
wikisql
CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minu...
show me flights from DENVER to ATLANTA on 6 16
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND date_day.day_number = 16 AND date_day.month_number = 6 AND d...
atis
CREATE TABLE table_name_11 ( team_1 VARCHAR )
What is the 1st leg of the Al Fahaheel Team 1?
SELECT 1 AS st_leg FROM table_name_11 WHERE team_1 = "al fahaheel"
sql_create_context
CREATE TABLE table_2562113_1 ( enrollment INTEGER, nickname VARCHAR )
What is the enrollment for the hawks?
SELECT MAX(enrollment) FROM table_2562113_1 WHERE nickname = "Hawks"
sql_create_context
CREATE TABLE table_54292 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What home team played against Footscray as the away team?
SELECT "Home team" FROM table_54292 WHERE "Away team" = 'footscray'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE zyjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, ...
患者03485032的检验报告单中有多少检验结果指标均异常?查询检验报告的单号
SELECT zyjybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN zyjybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '03485032' AND NOT zyjybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM ...
css
CREATE TABLE table_name_67 ( callsign VARCHAR, on_air_id VARCHAR )
What is 4zr's callsign?
SELECT callsign FROM table_name_67 WHERE on_air_id = "4zr"
sql_create_context
CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight real ) CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate re...
Bar chart x axis date of birth y axis height, and list by the bar in ascending.
SELECT Date_of_Birth, Height FROM people ORDER BY Date_of_Birth
nvbench
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, g...
Are there 300 -level courses in Spring or Summer term ?
SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 300 AND 300 + 100 AND semester.semester IN ('SP', 'SU', 'SS') AND semester.semester_i...
advising
CREATE TABLE employees ( id number, last_name text, first_name text, title text, reports_to number, birth_date time, hire_date time, address text, city text, state text, country text, postal_code text, phone text, fax text, email text ) CREATE TABLE artists (...
What are the names of the albums that have more than 10 tracks?
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING COUNT(T1.id) > 10
spider
CREATE TABLE table_204_939 ( id number, "year" number, "chassis" text, "engine" text, "start" text, "finish" text )
in how many years was the finish 7th ?
SELECT COUNT("year") FROM table_204_939 WHERE "finish" = 7
squall
CREATE TABLE table_name_40 ( first_runner_up VARCHAR, miss_maja_pilipinas VARCHAR )
What First runner-up has a Miss Maja Pilipinas of nanette prodigalidad?
SELECT first_runner_up FROM table_name_40 WHERE miss_maja_pilipinas = "nanette prodigalidad"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
specify ethnic origin of patient id 55094
SELECT demographic.ethnicity FROM demographic WHERE demographic.subject_id = "55094"
mimicsql_data
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREAT...
what is the maximum total cost to the hospital that includes a vent rate lab test during the previous year?
SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'vent rate')) AND DATETIME(cost.chargetime, 'start of year') = DATETI...
eicu
CREATE TABLE table_31773 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text )
Tell me the country for san juan
SELECT "Country" FROM table_31773 WHERE "City" = 'san juan'
wikisql
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, ...
show me the cheapest flights from BALTIMORE to DALLAS
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY...
atis
CREATE TABLE restaurant_type ( restypeid number, restypename text, restypedescription text ) CREATE TABLE visits_restaurant ( stuid number, resid number, time time, spent number ) CREATE TABLE restaurant ( resid number, resname text, address text, rating number ) CREATE TA...
What is the description of the restaurant type Sandwich?
SELECT restypedescription FROM restaurant_type WHERE restypename = "Sandwich"
spider
CREATE TABLE table_8595 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Points difference" text, "Points" text )
How many points did Newport RFC get?
SELECT "Points" FROM table_8595 WHERE "Club" = 'newport rfc'
wikisql
CREATE TABLE table_name_90 ( locality VARCHAR, ages VARCHAR, school VARCHAR )
What is the Locality of the Penarth Group School for Ages 8-16?
SELECT locality FROM table_name_90 WHERE ages = "8-16" AND school = "penarth group school"
sql_create_context
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, fligh...
show me flights between NEW YORK and LAS VEGAS on sunday
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'LAS VEGAS' AND date_day.day_number = 27 AND date_day.month_number = 8 AND...
atis
CREATE TABLE table_name_76 ( cores VARCHAR, l3_cache VARCHAR, model_number VARCHAR )
What is listed for the Cores that has the L3 cache of 8 MB and Model number of Core i7-860?
SELECT cores FROM table_name_76 WHERE l3_cache = "8 mb" AND model_number = "core i7-860"
sql_create_context
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtim...
what were the four most commonly diagnosed diagnoses for patients who were previously diagnosed with s/p exploratory laparoscopy within 2 months since 2102?
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 's/p exploratory laparoscopy' AND STRFTIM...
eicu
CREATE TABLE table_204_779 ( id number, "network name" text, "flagship" text, "programming type" text, "owner" text, "affiliates" number )
name a station that shows sports but is not televisa .
SELECT "network name" FROM table_204_779 WHERE "programming type" = 'sports' AND "owner" <> 'televisa'
squall
CREATE TABLE table_name_15 ( system VARCHAR, actual_version VARCHAR )
Which System has an Actual Version 9.0?
SELECT system FROM table_name_15 WHERE actual_version = "9.0"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
Out of the total number of patients admitted before 2168, how many of them had int insert lead in vent?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2168" AND procedures.short_title = "Int insert lead in vent"
mimicsql_data
CREATE TABLE table_1277350_3 ( saturday_shani__saturn_ VARCHAR, sunday_surya__the_sun_ VARCHAR )
In the system where Sunday is ny yitru kizhamai, what is Saturday?
SELECT saturday_shani__saturn_ FROM table_1277350_3 WHERE sunday_surya__the_sun_ = "ஞாயிற்று கிழமை Nyāyitru kizhamai"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
what is gender and discharge time of subject id 55094?
SELECT demographic.gender, demographic.dischtime FROM demographic WHERE demographic.subject_id = "55094"
mimicsql_data
CREATE TABLE table_2701851_2 ( title VARCHAR, no_in_series VARCHAR )
What is the name of episode # 10a?
SELECT title FROM table_2701851_2 WHERE no_in_series = "10a"
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 ) ...
what is the number of patients whose admission year is less than 2154 and diagnoses short title is urinary incontinence nos?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2154" AND diagnoses.short_title = "Urinary incontinence NOS"
mimicsql_data
CREATE TABLE table_name_6 ( score VARCHAR, date VARCHAR )
What is the score on september 20?
SELECT score FROM table_name_6 WHERE date = "september 20"
sql_create_context
CREATE TABLE table_name_10 ( res VARCHAR, method VARCHAR, opponent VARCHAR )
Which Res has a Method of decision (unanimous) and an Opponent of Wataru Sakata?
SELECT res FROM table_name_10 WHERE method = "decision (unanimous)" AND opponent = "wataru sakata"
sql_create_context
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program ( program_id int, name v...
For before noon classes , what upper level electives are offered ?
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course_offering.end_time <= '12:00:00' AND course.course_id = course_offering.course_id AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semest...
advising
CREATE TABLE table_9802 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
What was the winning score on Jan 22, 1995 when the margin of victory was 1 stroke?
SELECT "Winning score" FROM table_9802 WHERE "Margin of victory" = '1 stroke' AND "Date" = 'jan 22, 1995'
wikisql
CREATE TABLE table_18254488_2 ( uefa_champions_league INTEGER )
What is the highest amount of uefa champion leagues?
SELECT MAX(uefa_champions_league) FROM table_18254488_2
sql_create_context
CREATE TABLE table_79469 ( "Event" text, "Class" text, "Gold" text, "Silver" text, "Bronze" text )
what is the event when gold is darren kenny great britain (gbr)?
SELECT "Event" FROM table_79469 WHERE "Gold" = 'darren kenny great britain (gbr)'
wikisql
CREATE TABLE users ( user_id number, role_code text, user_name text, user_login text, password text ) CREATE TABLE images ( image_id number, image_alt_text text, image_name text, image_url text ) CREATE TABLE roles ( role_code text, role_description text ) CREATE TABLE fun...
Find the average access count across all documents?
SELECT AVG(access_count) FROM documents
spider
CREATE TABLE table_61535 ( "Official Name" text, "Status" text, "Area km 2" real, "Population" real, "Census Ranking" text )
What is the population of the parish that has an area of 304.06?
SELECT SUM("Population") FROM table_61535 WHERE "Area km 2" = '304.06'
wikisql
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_nam...
was patient 2536 since 03/2104 prescribed furosemide, vial, or zolpidem tartrate?
SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2536) AND prescriptions.drug IN ('furosemide', 'vial', 'zolpidem tartrate') AND STRFTIME('%y-%m', prescriptions.startdate) >= '2104-03'
mimic_iii
CREATE TABLE table_69087 ( "Game" real, "Date" text, "Score" text, "Location" text, "Time" text, "Attendance" real )
What is the number of people who attended the game later than game 6?
SELECT COUNT("Attendance") FROM table_69087 WHERE "Game" > '6'
wikisql
CREATE TABLE table_54226 ( "Stage" text, "Winner" text, "General classification" text, "Points classification" text, "Trofeo Fast Team" text )
Who was the winner of Stage 12 with a Points Classification of Francesco Moser?
SELECT "Winner" FROM table_54226 WHERE "Points classification" = 'francesco moser' AND "Stage" = '12'
wikisql
CREATE TABLE table_14233 ( "Pick" real, "Player" text, "Team" text, "Position" text, "Hometown/School" text )
What is the Player from Dayton, Oh with a Pick of 15 or larger?
SELECT "Player" FROM table_14233 WHERE "Pick" > '15' AND "Hometown/School" = 'dayton, oh'
wikisql
CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE writes ( paperid int, authorid int ...
most cited EMNLP 2010 papers
SELECT DISTINCT cite.citedpaperid, COUNT(cite.citedpaperid) FROM cite, paper, venue WHERE paper.paperid = cite.citedpaperid AND paper.year = 2010 AND venue.venueid = paper.venueid AND venue.venuename = 'EMNLP' GROUP BY cite.citedpaperid ORDER BY COUNT(cite.citedpaperid) DESC
scholar
CREATE TABLE Ref_Payment_Methods ( payment_method_code CHAR(10), payment_method_description VARCHAR(80) ) CREATE TABLE Bookings_Services ( Order_ID INTEGER, Product_ID INTEGER ) CREATE TABLE Clients ( Client_ID INTEGER, Address_ID INTEGER, Customer_Email_Address VARCHAR(255), Customer_...
Give me a bar chart for the total number of each payment method code, and show in descending by the Y-axis.
SELECT payment_method_code, COUNT(*) FROM Invoices GROUP BY payment_method_code ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number...
what were the three most frequently taken lab tests in 2104 for patients 50s?
SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 50 AND 59) AND STRFTIME('%y', lab.labresulttime) = '2104' GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 3
eicu
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostLinks ( Id...
Questions with specific tag below question/answer score.
SELECT Q.Id FROM Posts AS Q WHERE Q.PostTypeId = 1 AND Q.Tags LIKE @Pattern AND (Q.Score < @QuestionScore OR (@Accepted = 1 AND Q.AcceptedAnswerId IS NULL) OR NOT EXISTS(SELECT * FROM Posts AS A WHERE A.ParentId = Q.Id AND A.Score >= @AnswerScore))
sede
CREATE TABLE table_name_13 ( crowd INTEGER, away_team VARCHAR )
What was the largest crowd at a game where Collingwood was the away team?
SELECT MAX(crowd) FROM table_name_13 WHERE away_team = "collingwood"
sql_create_context
CREATE TABLE table_11808 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Round" text, "Time" text, "Location" text )
What was the method used when the opponent was Tyson Griffin?
SELECT "Method" FROM table_11808 WHERE "Opponent" = 'tyson griffin'
wikisql
CREATE TABLE table_72330 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text )
Name the losing bonus of 96 points
SELECT "Losing bonus" FROM table_72330 WHERE "Points" = '96'
wikisql
CREATE TABLE table_name_89 ( attendance VARCHAR, week VARCHAR )
What was the attendance at the week 2 game?
SELECT attendance FROM table_name_89 WHERE week = 2
sql_create_context
CREATE TABLE ReviewTaskTypes ( 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 TAB...
java developpers in nantes.
SELECT u.Id, u.DisplayName, u.Location FROM Users AS u JOIN (SELECT DISTINCT UserId FROM Badges WHERE LOWER(Name) IN ('java') AND Class IN (2, 3) AND TagBased = 1) AS tag_badges ON tag_badges.UserId = u.Id WHERE LOWER(Location) LIKE '%paris%'
sede
CREATE TABLE table_name_73 ( conference_semifinals VARCHAR, record VARCHAR )
Which Conference Semifinals has a Record of 55 27?
SELECT conference_semifinals FROM table_name_73 WHERE record = "55–27"
sql_create_context
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, give me the comparison about the amount of name over the name , and group by attribute name, and rank bars in asc order please.
SELECT T2.Name, COUNT(T2.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name
nvbench
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 ...
患者编号是52382275之前在哪个医疗机构就诊啊?
SELECT hz_info_mzjzjlb.YLJGDM FROM hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz...
css
CREATE TABLE table_60378 ( "Date" text, "Time" text, "Round" text, "Opponent" text, "Ground" text, "Score" text )
What opponent has 32 as the round?
SELECT "Opponent" FROM table_60378 WHERE "Round" = '32'
wikisql
CREATE TABLE table_name_10 ( round INTEGER, position VARCHAR, overall VARCHAR )
What was the sum of the rounds for the player who had a position of LS and an overall draft pick bigger than 230?
SELECT SUM(round) FROM table_name_10 WHERE position = "ls" AND overall > 230
sql_create_context
CREATE TABLE table_46145 ( "Date" text, "Round" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real )
Which Date has a Result of 2 2, and a Venue of H?
SELECT "Date" FROM table_46145 WHERE "Result" = '2–2' AND "Venue" = 'h'
wikisql
CREATE TABLE table_19387 ( "Region" text, "Capital" text, "Area (km\u00b2)" real, "Area (sq mi)" real, "Population" real )
What is the region where Milan is located?
SELECT "Region" FROM table_19387 WHERE "Capital" = 'Milan'
wikisql
CREATE TABLE table_71205 ( "Outcome" text, "Date" text, "Surface" text, "Opponent in the final" text, "Score in the final" text )
What is the score in the final with runner-up as the outcome and hard (i) as the surface?
SELECT "Score in the final" FROM table_71205 WHERE "Outcome" = 'runner-up' AND "Surface" = 'hard (i)'
wikisql
CREATE TABLE table_75325 ( "NTFA Div 2" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real )
What is the lowest number of draws of the NTFA Div 2 Lilydale?
SELECT MIN("Draws") FROM table_75325 WHERE "NTFA Div 2" = 'lilydale'
wikisql
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREAT...
when did patient 031-16123 during the last hospital encounter last receive the blood, venipuncture microbiology test?
SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-16123' AND NOT patient.hospitaldischargetime IS NULL ORDER BY...
eicu
CREATE TABLE table_2562572_52 ( cyrillic_name VARCHAR, settlement VARCHAR )
What is the cyrillic name when the settlement is a anja?
SELECT cyrillic_name FROM table_2562572_52 WHERE settlement = "Ašanja"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
give me the number of patients whose year of birth is less than 2053 and drug route is ivpca?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2053" AND prescriptions.route = "IVPCA"
mimicsql_data
CREATE TABLE ROLES ( role_code VARCHAR, role_name VARCHAR ) CREATE TABLE Employees ( employee_id VARCHAR, role_code VARCHAR )
Show the employee ids for all employees with role name 'Human Resource' or 'Manager'.
SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Human Resource" OR T2.role_name = "Manager"
sql_create_context
CREATE TABLE table_15475116_1 ( league VARCHAR, school VARCHAR )
What league does Delaware Military Academy belong to
SELECT league FROM table_15475116_1 WHERE school = "Delaware Military Academy"
sql_create_context
CREATE TABLE table_name_19 ( Id VARCHAR )
What shows for 2000 when 2013 shows 3rd?
SELECT 2000 FROM table_name_19 WHERE 2013 = "3rd"
sql_create_context
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...
列出对于患者77164356的医疗记录里医疗费总额高于6696.69元的入院诊断疾病编码和名称都有啥?
SELECT qtb.IN_DIAG_DIS_CD, qtb.IN_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_ID = '77164356' AND qtb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 6696.69) UNION SELECT gyb.IN_DIAG_DIS_CD, gyb.IN_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_ID = '77164356' AND gyb.MED_CLINIC_ID IN (SELECT t_kc2...
css
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
How many patients are diagnosed with a hemorrhage complicating procedure?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Hemorrhage complic proc"
mimicsql_data
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 ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
how many patients had a microbiology fluid received in blood culture bottles test until 2101?
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT microbiologyevents.hadm_id FROM microbiologyevents WHERE microbiologyevents.spec_type_desc = 'fluid received in blood culture bottles' AND STRFTIME('%y', microbiologyevents.charttime) <= '2101')
mimic_iii
CREATE TABLE table_74995 ( "Year" real, "Date" text, "Winner" text, "Result" text, "Loser" text, "Location" text )
What is the name of the Loser when the winner was new england patriots, and a Location of giants stadium, and a Result of 30 28?
SELECT "Loser" FROM table_74995 WHERE "Winner" = 'new england patriots' AND "Location" = 'giants stadium' AND "Result" = '30–28'
wikisql
CREATE TABLE table_name_74 ( score VARCHAR, game VARCHAR )
What's the Score for the Game of 75?
SELECT score FROM table_name_74 WHERE game = 75
sql_create_context
CREATE TABLE table_50616 ( "Game" text, "Day, Date" text, "Anand" text, "Gelfand" text, "Standing" text )
What is the day and date of game 2?
SELECT "Day, Date" FROM table_50616 WHERE "Game" = '2'
wikisql
CREATE TABLE table_682 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text, "Candidates" text )
What was the result of the election in which the incumbent was first elected in 1984?
SELECT "Results" FROM table_682 WHERE "First elected" = '1984'
wikisql
CREATE TABLE table_33227 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the smallest crowd that Melbourne played for at home?
SELECT MIN("Crowd") FROM table_33227 WHERE "Home team" = 'melbourne'
wikisql