context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
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 ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
count the number of patients whose insurance is private and admission year is less than 2173?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Private" AND demographic.admityear < "2173"
mimicsql_data
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 ...
what are the three most common diagnoses in a year before in which patients are diagnosed within 2 months after being diagnosed with obst def ren plv&urt nec?
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, 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...
mimic_iii
CREATE TABLE table_name_86 ( goals__2008_ VARCHAR, age_at_debut VARCHAR, games__2008_ VARCHAR, debut_round VARCHAR )
What is the total number of goals that have games under 11, debut round over 15, and age of 20 years, 71 days?
SELECT COUNT(goals__2008_) FROM table_name_86 WHERE games__2008_ < 11 AND debut_round > 15 AND age_at_debut = "20 years, 71 days"
sql_create_context
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, ...
What 's the size of the 215 course ?
SELECT DISTINCT num_enrolled FROM course WHERE department = 'EECS' AND number = 215
advising
CREATE TABLE table_name_25 ( record VARCHAR, week VARCHAR, opponent VARCHAR )
What is the Record in a week later than 7 against the San Diego Chargers?
SELECT record FROM table_name_25 WHERE week > 7 AND opponent = "san diego chargers"
sql_create_context
CREATE TABLE table_31880 ( "Played in" text, "Matches" text, "Lost" text, "Drawn" text, "Points for" text, "Points against" text )
For the played in, what are the total points?
SELECT "Points for" FROM table_31880 WHERE "Played in" = 'total'
wikisql
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE flight_stop ( flight_id int, stop...
show me all flights from MIAMI to NEW YORK
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 = 'MIAMI' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEW YORK...
atis
CREATE TABLE table_name_66 ( date_of_death VARCHAR, date_of_birth VARCHAR )
When did the person born 24 September 1851 pass away?
SELECT date_of_death FROM table_name_66 WHERE date_of_birth = "24 september 1851"
sql_create_context
CREATE TABLE table_6908 ( "Name" text, "Years" text, "Tests" real, "Drew" real, "Lost" real, "Win percentage" text )
What is the Win percentage where there were 5 lost and 0 is drew?
SELECT "Win percentage" FROM table_6908 WHERE "Lost" = '5' AND "Drew" = '0'
wikisql
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
does patient 12726 have a normal heart rate since 64 months ago?
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 = 12726)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate' AND d...
mimic_iii
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE food_service ( meal_code text, meal_nu...
i would like an afternoon flight from WASHINGTON to BOSTON on 8 20
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 = 'BOSTON' AND date_day.day_number = 20 AND date_day.month_number = 8 AND d...
atis
CREATE TABLE table_name_70 ( method VARCHAR, opponent VARCHAR )
What is the method of the match with chris ade as the opponent?
SELECT method FROM table_name_70 WHERE opponent = "chris ade"
sql_create_context
CREATE TABLE table_name_47 ( year INTEGER, engine VARCHAR, points VARCHAR )
What is the lowest year for an engine of ford zetec-r v8, and points greater than 0?
SELECT MIN(year) FROM table_name_47 WHERE engine = "ford zetec-r v8" AND points > 0
sql_create_context
CREATE TABLE table_29332810_14 ( young_rider_classification VARCHAR, aggressive_rider VARCHAR )
Where Luke Durbridge is the aggressive rider who is listed as the young rider classification?
SELECT young_rider_classification FROM table_29332810_14 WHERE aggressive_rider = "Luke Durbridge"
sql_create_context
CREATE TABLE table_30148 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production" text, "U.S. viewers (in millions)" text )
What is the name of the episode written by karina csolty?
SELECT "Title" FROM table_30148 WHERE "Written by" = 'Karina Csolty'
wikisql
CREATE TABLE table_name_95 ( drawn INTEGER, lost VARCHAR, points VARCHAR )
What is the average number of losses for teams with under 4 losses and under 21 points?
SELECT AVG(drawn) FROM table_name_95 WHERE lost < 4 AND points < 21
sql_create_context
CREATE TABLE table_42843 ( "Sunshine (hrs/year)" text, "Rain (mm/year)" text, "Snow (days/year)" real, "Storms (days/year)" real, "Fog (days/year)" real )
What is the amount of snow where the sunshine is 1 633, and storms are lower than 29?
SELECT AVG("Snow (days/year)") FROM table_42843 WHERE "Sunshine (hrs/year)" = '1 633' AND "Storms (days/year)" < '29'
wikisql
CREATE TABLE table_12471 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text )
What is the country of the player with a score less than 68?
SELECT "Country" FROM table_12471 WHERE "Score" < '68'
wikisql
CREATE TABLE table_14355 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" real )
With a time of 53.33, who ranked the highest?
SELECT MAX("Rank") FROM table_14355 WHERE "Time" = '53.33'
wikisql
CREATE TABLE table_14647 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
What was Yardley-BRM's points high after 1971?
SELECT MAX("Points") FROM table_14647 WHERE "Entrant" = 'yardley-brm' AND "Year" > '1971'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
How many patients under a hematology lab test category have intraoperative cardiac pacemaker?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Intraoperative cardiac pacemaker" AND lab."CATEGORY" = "Hematology"
mimicsql_data
CREATE TABLE table_31331 ( "Manufacturer" text, "Model" text, "Intro Date" text, "Interface" text, "OS" text, "Price (USD)" real, "Price" text, "Throughput" text )
What is the intro date for the throughput of 16 mbit/s?
SELECT "Intro Date" FROM table_31331 WHERE "Throughput" = '16 Mbit/s'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( ...
Look for the number of patients less than 47 years who have angioedema as their primary disease.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ANGIOEDEMA" AND demographic.age < "47"
mimicsql_data
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
was there any medicine prescribed this year for patient 028-55503?
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-55503')) AND DATETIME(medication.drugstarttime, 'start of year') = DAT...
eicu
CREATE TABLE table_name_12 ( score VARCHAR, away_team VARCHAR )
What is the Score when the Away Team is Torquay United?
SELECT score FROM table_name_12 WHERE away_team = "torquay united"
sql_create_context
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
Visualize a bar chart about the distribution of ACC_Road and Team_ID , and group by attribute All_Home, and I want to sort from high to low by the Y.
SELECT ACC_Road, Team_ID FROM basketball_match GROUP BY All_Home, ACC_Road ORDER BY Team_ID DESC
nvbench
CREATE TABLE table_45157 ( "Date" text, "Race" text, "Track" text, "Winner" text, "Reports" text )
What race happened at Iowa Speedway?
SELECT "Race" FROM table_45157 WHERE "Track" = 'iowa speedway'
wikisql
CREATE TABLE table_58711 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What is To par, when Country is 'United States', and when Player is 'Mark Brooks'?
SELECT "To par" FROM table_58711 WHERE "Country" = 'united states' AND "Player" = 'mark brooks'
wikisql
CREATE TABLE table_61846 ( "Tournament" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text )
What is the 2011 with 1r in 2010?
SELECT "2011" FROM table_61846 WHERE "2010" = '1r'
wikisql
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...
SELECT * FROM posts WHERE Tags IS NOT NULL.
SELECT TagName, Count FROM Tags ORDER BY Count DESC
sede
CREATE TABLE submission ( Submission_ID int, Scores real, Author text, College text ) CREATE TABLE Acceptance ( Submission_ID int, Workshop_ID int, Result text ) CREATE TABLE workshop ( Workshop_ID int, Date text, Venue text, Name text )
A pie chart shows the venue for each workshop.
SELECT Venue, COUNT(Venue) FROM workshop GROUP BY Venue
nvbench
CREATE TABLE table_18305 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
What was the result of the election when someone was first elected in 1960?
SELECT "Result" FROM table_18305 WHERE "First elected" = '1960'
wikisql
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
Give me a pie chart to reflect the proportion of All_Road and School_ID.
SELECT All_Road, School_ID FROM basketball_match
nvbench
CREATE TABLE table_22051 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Record" text, "Attendance" real )
Where is riverfront stadium the game site for the week?
SELECT MIN("Week") FROM table_22051 WHERE "Game site" = 'Riverfront Stadium'
wikisql
CREATE TABLE table_name_45 ( draw INTEGER, goal_gain VARCHAR, game VARCHAR )
How many draws did the game after game 14 with goal gain 17 have?
SELECT MAX(draw) FROM table_name_45 WHERE goal_gain = 17 AND game > 14
sql_create_context
CREATE TABLE table_25985 ( "Player" text, "Games Played" real, "Minutes" real, "Field Goals" real, "Three Pointers" real, "Free Throws" real, "Rebounds" real, "Assists" real, "Blocks" real, "Steals" real, "Points" real )
What is the points total number if the assists is 7?
SELECT COUNT("Points") FROM table_25985 WHERE "Assists" = '7'
wikisql
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
检验结果指标记录39909874653的检测项目名称、检测指标代码以及名称、检测方法分别是什么?
SELECT JCXMMC, JCZBDM, JCZBMC, JCFF FROM jyjgzbb WHERE JYZBLSH = '39909874653'
css
CREATE TABLE table_65140 ( "Title" text, "Series" text, "Director" text, "Production Number" real, "Release date" text )
What was the series of the episode directed by Abe Levitow released on 1959-06-27?
SELECT "Series" FROM table_65140 WHERE "Director" = 'abe levitow' AND "Release date" = '1959-06-27'
wikisql
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_DIRE_CD text, MED_DIRE_NM text,...
鲁光亮为团伙成员,他最常去的几个医生排序是什么样的?
SELECT t_kc21.OUT_DIAG_DOC_CD, t_kc21.OUT_DIAG_DOC_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '鲁光亮' GROUP BY t_kc21.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC
css
CREATE TABLE table_6880 ( "Date" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Total" text )
What is Set 4, when Set 1 is 19-25, and when Set 2 is 23-25?
SELECT "Set 4" FROM table_6880 WHERE "Set 1" = '19-25' AND "Set 2" = '23-25'
wikisql
CREATE TABLE table_66180 ( "Title" text, "Series" text, "Director" text, "Release date" text, "reissue?" text )
What was the release date of Three Little Bops?
SELECT "Release date" FROM table_66180 WHERE "Title" = 'three little bops'
wikisql
CREATE TABLE table_name_59 ( december INTEGER, record VARCHAR )
Which December has a Record of 21 6 5?
SELECT AVG(december) FROM table_name_59 WHERE record = "21–6–5"
sql_create_context
CREATE TABLE table_name_11 ( points INTEGER, home VARCHAR, score VARCHAR )
How many Points have a Home of pittsburgh, and a Score of 1 7?
SELECT SUM(points) FROM table_name_11 WHERE home = "pittsburgh" AND score = "1–7"
sql_create_context
CREATE TABLE table_name_36 ( race VARCHAR, circuit VARCHAR, length VARCHAR )
Which race was on the Las Vegas Motor Speedway for 2 hours?
SELECT race FROM table_name_36 WHERE circuit = "las vegas motor speedway" AND length = "2 hours"
sql_create_context
CREATE TABLE Projects ( Code Char(4), Name Char(50), Hours int ) CREATE TABLE AssignedTo ( Scientist int, Project char(4) ) CREATE TABLE Scientists ( SSN int, Name Char(30) )
What are the names of projects that require more than 300 hours, and how many scientists are assigned to each, and list from high to low by the the total number .
SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project WHERE T1.Hours > 300 GROUP BY T1.Name ORDER BY COUNT(*) DESC
nvbench
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 ...
on the current icu visit, when was the last time that patient 51858 had a urine out foley output?
SELECT outputevents.charttime FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51858) AND icustays.outtime IS NULL) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_item...
mimic_iii
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, value...
what was patient 28443 diagnosed with on this hospital visit for the first time?
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT diagnoses_icd.icd9_code FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28443 AND admissions.dischtime IS NULL) ORDER BY diagnoses_icd.charttime L...
mimic_iii
CREATE TABLE table_name_39 ( date VARCHAR, away VARCHAR )
When did the team play an away game against the Toronto Eagles?
SELECT date FROM table_name_39 WHERE away = "toronto eagles"
sql_create_context
CREATE TABLE table_203_112 ( id number, "choke" text, "constriction (inch)" number, "percentage of lead shot in 30-inch circle at 40 yards" text, "identification (notches)" number, "identification (stars)\n(spanish shotguns)" number )
which choke has the least constriction ?
SELECT "choke" FROM table_203_112 ORDER BY "constriction (inch)" LIMIT 1
squall
CREATE TABLE table_203_630 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
who only won 13 silver medals ?
SELECT "nation" FROM table_203_630 WHERE "silver" = 13
squall
CREATE TABLE table_2918 ( "Artist" text, "Song (English translation)" text, "Songwriter(s)" text, "Position" real, "Date Eliminated" text )
What is the position of 'k rleken v nder allt' (the love turns everything)?
SELECT MIN("Position") FROM table_2918 WHERE "Song (English translation)" = 'Kärleken vänder allt" (The love turns everything)'
wikisql
CREATE TABLE table_37348 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
Who did they play when dickey (0-1) recorded the loss?
SELECT "Opponent" FROM table_37348 WHERE "Loss" = 'dickey (0-1)'
wikisql
CREATE TABLE table_47040 ( "Tournament" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "1998" text, "1999" text, "2000" text, "2001" text, "Career SR" text, "Career Win-Loss" text )
Which tournament had a 1994 finish of RR and 1996 and 1998 finishes of A?
SELECT "Tournament" FROM table_47040 WHERE "1996" = 'a' AND "1998" = 'a' AND "1994" = 'rr'
wikisql
CREATE TABLE table_43278 ( "Administrative Panel" real, "Agricultural Panel" real, "Cultural and Educational Panel" real, "Industrial and Commercial Panel" real, "Labour Panel" real, "National University of Ireland" real, "University of Dublin" real, "Nominated by the Taoiseach" real, ...
What is the highest administrative panel with a cultural and educational panel of 2 plus an industrial and commercial panel larger than 4?
SELECT MAX("Administrative Panel") FROM table_43278 WHERE "Cultural and Educational Panel" = '2' AND "Industrial and Commercial Panel" > '4'
wikisql
CREATE TABLE table_33544 ( "Place" real, "Rider" text, "Country" text, "Machine" text, "Speed" text, "Time" text, "Points" real )
Which rider from the 1971 Isle of Man Junior TT 250cc final standings had a speed equal to 86.15mph?
SELECT "Rider" FROM table_33544 WHERE "Speed" = '86.15mph'
wikisql
CREATE TABLE table_53262 ( "Rank" real, "Previous Rank" text, "Name" text, "Nationality" text, "Team" text, "Points" real )
Tell me the sum of rank for australia when points are less than 79
SELECT SUM("Rank") FROM table_53262 WHERE "Nationality" = 'australia' AND "Points" < '79'
wikisql
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, t...
Who 's teaching Sediment Diagenesis next Winter ?
SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN cou...
advising
CREATE TABLE table_21992 ( "Spaceport" text, "Launch complex" text, "Launcher" text, "Spacecraft" text, "Flights" text, "Years" text )
What spacecrafts had 22 orbital flights?
SELECT "Spacecraft" FROM table_21992 WHERE "Flights" = '22 Orbital'
wikisql
CREATE TABLE table_20642 ( "Year (Ceremony)" text, "Film title used in nomination" text, "Language(s)" text, "Director" text, "Result" text )
How many languages for the 2001 (74th) awards?
SELECT COUNT("Language(s)") FROM table_20642 WHERE "Year (Ceremony)" = '2001 (74th)'
wikisql
CREATE TABLE table_79401 ( "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What Nation has a Gold entry that is greater than 0, a Total that is greater than 2, a Silver entry that is larger than 1, and 0 Bronze?
SELECT "Nation" FROM table_79401 WHERE "Gold" > '0' AND "Total" > '2' AND "Bronze" = '0' AND "Silver" > '1'
wikisql
CREATE TABLE table_203_164 ( id number, "#" number, "date" text, "venue" text, "opponent" text, "score" text, "result" text, "competition" text )
when did their world cup games take place ?
SELECT "date" FROM table_203_164 WHERE "competition" = '1998 fifa world cup qualification'
squall
CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufac...
i'd like to fly from BOSTON to OAKLAND through DENVER
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND CITY_2.ci...
atis
CREATE TABLE table_name_89 ( opponent VARCHAR, score VARCHAR )
WHAT IS THE OPPONENT WITH A SCORE OF 72-63?
SELECT opponent FROM table_name_89 WHERE score = "72-63"
sql_create_context
CREATE TABLE table_19672 ( "Year" real, "Mens singles" text, "Womens singles" text, "Mens doubles" text, "Womens doubles" text, "Mixed doubles" text )
Name the womens doubles when mens doubles is charalambos kazilas stepan partemian
SELECT "Womens doubles" FROM table_19672 WHERE "Mens doubles" = 'Charalambos Kazilas Stepan Partemian'
wikisql
CREATE TABLE table_203_244 ( id number, "pos" text, "rider" text, "manufacturer" text, "time/retired" text, "points" number )
who is the manufacturer for loris capirossi and ralf waldmann ?
SELECT "manufacturer" FROM table_203_244 WHERE "rider" IN ('loris capirossi', 'ralf waldmann')
squall
CREATE TABLE table_62244 ( "Date" text, "Opponents" text, "H / A" text, "Result F \u2013 A" text, "Attendance" real, "League position" text )
What is the result F-A of the game on 3 may 1993?
SELECT "Result F \u2013 A" FROM table_62244 WHERE "Date" = '3 may 1993'
wikisql
CREATE TABLE table_50736 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
What is High Rebounds, when High Assists is 'Delonte West (10)'?
SELECT "High rebounds" FROM table_50736 WHERE "High assists" = 'delonte west (10)'
wikisql
CREATE TABLE table_26379 ( "Province (ashkharh)" text, "Armenian name" text, "Area (km\u00b2)" real, "Number of cantons (gavars)" real, "Center" text )
What's the center of the province that spreads out on 23860 km2?
SELECT "Center" FROM table_26379 WHERE "Area (km\u00b2)" = '23860'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost numb...
what is the name of the drug that patient 69761 was prescribed within 2 days after having received since 30 months ago a circumcision procedure?
SELECT t2.drug FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 69761 AND procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = ...
mimic_iii
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, visualize a scatter chart about the correlation between manufacturer and code , and group by attribute headquarter.
SELECT T1.Manufacturer, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter
nvbench
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE swimme...
Find meter_700 and meter_100 , and visualize them by a bar chart.
SELECT meter_700, meter_100 FROM swimmer
nvbench
CREATE TABLE table_name_41 ( floors INTEGER, street_address VARCHAR )
What's the least amount of floors at 921 sw sixth avenue?
SELECT MIN(floors) FROM table_name_41 WHERE street_address = "921 sw sixth avenue"
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 prescription...
what is the number of patients whose marital status is divorced and diagnoses icd9 code is 80624?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "DIVORCED" AND diagnoses.icd9_code = "80624"
mimicsql_data
CREATE TABLE table_18597302_1 ( position VARCHAR, points VARCHAR )
What was the position where the team scored 9 points?
SELECT COUNT(position) FROM table_18597302_1 WHERE points = 9
sql_create_context
CREATE TABLE table_41942 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text )
What is Top Par, when Score is less than 68, and when Country is England?
SELECT "To par" FROM table_41942 WHERE "Score" < '68' AND "Country" = 'england'
wikisql
CREATE TABLE table_16068 ( "Round" real, "Choice" real, "Overall" real, "Player name" text, "Position" text, "College" text )
Who was the top picki n the draft?
SELECT MIN("Choice") FROM table_16068
wikisql
CREATE TABLE table_59429 ( "Classification" text, "% of all" text, "John Kerry" text, "John Edwards" text, "Dennis Kucinich" text )
What is John Kerry, when John Edwards is '20%'?
SELECT "John Kerry" FROM table_59429 WHERE "John Edwards" = '20%'
wikisql
CREATE TABLE table_name_24 ( record VARCHAR, method VARCHAR )
What is the record for the Ko (head kick) method?
SELECT record FROM table_name_24 WHERE method = "ko (head kick)"
sql_create_context
CREATE TABLE table_15306124_1 ( league_of_communists VARCHAR, peoples_party VARCHAR )
How many league of communists have the people's party at 7?
SELECT COUNT(league_of_communists) FROM table_15306124_1 WHERE peoples_party = 7
sql_create_context
CREATE TABLE table_name_45 ( venue VARCHAR, notes VARCHAR )
Tell me the venue for notes of 10.93 secs
SELECT venue FROM table_name_45 WHERE notes = "10.93 secs"
sql_create_context
CREATE TABLE table_name_15 ( number_1971 VARCHAR )
What is the 1961 total of the Macedonian population with a 1971 number of 3325 and a 1991 value greater than 3177?
SELECT COUNT(1961) FROM table_name_15 WHERE number_1971 = 3325 AND 1991 > 3177
sql_create_context
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...
列出在2007-12-26到2017-05-25期间,患者华歌韵所有检验结果指标记录的检测人为尤弘业的检验指标流水号是多少?
SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jyb...
css
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text...
列出患者93496868就诊科室名称不包含产的所有门诊就诊记录的流水号是什么,在医院3314397中?
SELECT wdmzjzjlb.JZLSH FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '93496868' AND hz_info.YLJGDM = '3314397' AND NOT wdmzjzjlb.JZKSMC LIKE '%产%' UNION SELECT bdmzjzjlb.JZLSH FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJ...
css
CREATE TABLE table_64728 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
What date had a game with wycombe wanderers as the away team?
SELECT "Date" FROM table_64728 WHERE "Away team" = 'wycombe wanderers'
wikisql
CREATE TABLE Faculty ( Sex VARCHAR, Rank VARCHAR )
How many female Professors do we have?
SELECT COUNT(*) FROM Faculty WHERE Sex = 'F' AND Rank = "Professor"
sql_create_context
CREATE TABLE table_53845 ( "Team 1" text, "Agg." text, "Team 2" text, "1st leg" text, "2nd leg" text )
who is the team 2 when the 1st leg is 1-1 and the team 1 is verucchio(f15)?
SELECT "Team 2" FROM table_53845 WHERE "1st leg" = '1-1' AND "Team 1" = 'verucchio(f15)'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
give me the number of patients whose admission type is urgent and diagnoses short title is myelodysplastic synd nos?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "URGENT" AND diagnoses.short_title = "Myelodysplastic synd NOS"
mimicsql_data
CREATE TABLE table_48565 ( "Driver" text, "Entrant" text, "Constructor" text, "Time/Retired" text, "Grid" text, "Heat 1/2" text )
Who was Albino Buticchi's constructor?
SELECT "Constructor" FROM table_48565 WHERE "Driver" = 'albino buticchi'
wikisql
CREATE TABLE table_18498743_1 ( mexico VARCHAR, mañana_es_para_siempre VARCHAR )
what is the mexico stat where ma ana es para siempre is love never dies
SELECT mexico FROM table_18498743_1 WHERE mañana_es_para_siempre = "Love Never Dies"
sql_create_context
CREATE TABLE table_23450 ( "Wireless LAN" text, "Chipset" text, "Centrino" text, "Processor" text, "Codename" text, "Release Date" real, "Process Technology" text, "Microarchitecture" text )
What Wireless LAN had a process technology of 90nm and a Carmel centrino?
SELECT "Wireless LAN" FROM table_23450 WHERE "Process Technology" = '90nm' AND "Centrino" = 'Carmel'
wikisql
CREATE TABLE table_name_34 ( country VARCHAR, city VARCHAR )
what is the country for the city of cardiff?
SELECT country FROM table_name_34 WHERE city = "cardiff"
sql_create_context
CREATE TABLE table_10249 ( "Class" text, "Wheel arrangement" text, "Manufacturer" text, "Year made" text, "Quantity made" text, "Year(s) withdrawn" text )
How many CLASS P14 trains were made?
SELECT "Quantity made" FROM table_10249 WHERE "Class" = 'p14'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
what is days of hospital stay and admission time of subject id 52012?
SELECT demographic.days_stay, demographic.admittime FROM demographic WHERE demographic.subject_id = "52012"
mimicsql_data
CREATE TABLE table_57339 ( "Tallangatta DFL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real )
What are the average byes that are greater than 1479, wins greater than 5 and 0 draws?
SELECT AVG("Byes") FROM table_57339 WHERE "Against" > '1479' AND "Wins" > '5' AND "Draws" < '0'
wikisql
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
知不知道42948232740这个检验单的报告日期
SELECT BGRQ FROM jybgb WHERE BGDH = '42948232740'
css
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) 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 cost ( row_id nu...
how many hours has it been since the last time patient 17462 visited ward 14 in this hospital visit?
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 17462 AND admissions.dischtime IS NULL)) AND transfers...
mimic_iii
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...
自二零零四年九月二十日开始,截止到二零二一年三月十八日,患者19598745的病历最主要是哪家医院的
SELECT qtb.MED_SER_ORG_NO FROM qtb WHERE qtb.PERSON_ID = '19598745' AND qtb.IN_HOSP_DATE BETWEEN '2004-09-20' AND '2021-03-18' GROUP BY qtb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT gyb.MED_SER_ORG_NO FROM gyb WHERE gyb.PERSON_ID = '19598745' AND gyb.IN_HOSP_DATE BETWEEN '2004-09-20' AND '2021-03-18' G...
css
CREATE TABLE table_12047 ( "Driver" text, "Car #" real, "Make" text, "Points" real, "Laps" real, "Winnings" text )
Which driver has the highest point total after winning $133,386?
SELECT MAX("Points") FROM table_12047 WHERE "Winnings" = '$133,386'
wikisql
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE m...
have been prescribed glipizide, clonazepam or pantoprazole to patient 88404 in the first hospital encounter?
SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 88404 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND prescriptions.drug IN ('glipizide', 'clonazepam', 'pantoprazole')
mimic_iii
CREATE TABLE table_55867 ( "Name" text, "Original Publisher" text, "First Appearance" text, "Year" real, "Date" text )
What first appeared in 1966 in the comic X-2-Y?
SELECT "First Appearance" FROM table_55867 WHERE "Year" = '1966' AND "Name" = 'x-2-y'
wikisql