context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... | tell me the daily maximum amount of esmolol in patient 016-3041's body in 03/last year? | SELECT MAX(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-3041')) AND intakeoutput.celllabel = 'esmolo... | eicu |
CREATE TABLE table_train_118 (
"id" int,
"hypocalcemia" bool,
"heart_disease" bool,
"renal_disease" bool,
"fibrinogen" float,
"diastolic_blood_pressure_dbp" int,
"symptomatic_hypotension" bool,
"serum_creatinine" float,
"ca" float,
"hypertension" bool,
"NOUSE" float
) | congestive heart failure | SELECT * FROM table_train_118 WHERE heart_disease = 1 | criteria2sql |
CREATE TABLE table_204_172 (
id number,
"year" number,
"representative" text,
"hometown" text,
"placement in miss nepal" text,
"special awards at miss nepal" text,
"placement in miss pokhara" text
) | what is the total number of years ? | SELECT COUNT("year") FROM table_204_172 | squall |
CREATE TABLE table_name_86 (
builder VARCHAR,
works_number VARCHAR
) | Which Builder has a Works Number of 16272? | SELECT builder FROM table_name_86 WHERE works_number = "16272" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
... | had patient 004-34650 had any allergies since 2104? | SELECT COUNT(*) > 0 FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-34650')) AND STRFTIME('%y', allergy.allergytime) >= '2104' | eicu |
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 flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_... | show me flights from NEW YORK to MIAMI on a TUESDAY with a round trip fare less than 466 dollars | 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, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE ((DAYS_0.day_name = 'TUESDAY' AND DAYS_1.day_name = 'TUESDAY' AND fare_basis.basis_days = DAYS_1.d... | atis |
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 demographic ... | how many patients of black/cape verdean ethnicity were diagnosed with pseudomonas infection in conditions classified elsewhere and of unspecified site? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND diagnoses.long_title = "Pseudomonas infection in conditions classified elsewhere and of unspecified site" | mimicsql_data |
CREATE TABLE table_name_93 (
home_team VARCHAR,
away_team VARCHAR
) | What is the home team score when the away team was fitzroy? | SELECT home_team AS score FROM table_name_93 WHERE away_team = "fitzroy" | sql_create_context |
CREATE TABLE table_20622 (
"Missouri vs." text,
"Overall Record" text,
"at Columbia" text,
"at Opponents Venue" text,
"at Neutral Site" text,
"Last 5 Meetings" text,
"Last 10 Meetings" text,
"Current Streak" text,
"Since Joining SEC" text
) | Who are the opponents of Missouri that have an overall record of MU, 3-1? | SELECT "Missouri vs." FROM table_20622 WHERE "Overall Record" = 'MU, 3-1' | wikisql |
CREATE TABLE table_name_69 (
year VARCHAR,
start VARCHAR,
qual VARCHAR
) | In what year did a Qual of 141.105 with a Start of 25 happen? | SELECT year FROM table_name_69 WHERE start = "25" AND qual = "141.105" | sql_create_context |
CREATE TABLE table_19972 (
"Region" real,
"Group A" text,
"Group B" text,
"Group C" text,
"Group D" text,
"Group E" text,
"Group F" text
) | Who is in group a when indiana is in group d? | SELECT "Group A" FROM table_19972 WHERE "Group D" = 'Indiana' | wikisql |
CREATE TABLE table_name_33 (
date VARCHAR,
score VARCHAR
) | Whic Date has a Score of 4 2? | SELECT date FROM table_name_33 WHERE score = "4–2" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | how many patients whose age is less than 62 and days of hospital stay is greater than 27? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "62" AND demographic.days_stay > "27" | mimicsql_data |
CREATE TABLE table_204_161 (
id number,
"name" text,
"1968 cf\ndesignator" text,
"place of\nmanufacture" text,
"primary\nrole(s)" text,
"service\nperiod" text,
"#\nused" number
) | how many avro ansons were used from 1940-1947 ? | SELECT "#\nused" FROM table_204_161 WHERE "name" = 'avro anson' | squall |
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)... | could you please find me the cheapest one way fare from BOSTON to PHILADELPHIA | SELECT DISTINCT fare.fare_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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_... | atis |
CREATE TABLE table_18216 (
"District" text,
"Incumbent" text,
"Party" text,
"Elected" real,
"Status" text,
"Opponent" text
) | What party did incumbent Howard Coble belong to? | SELECT "Party" FROM table_18216 WHERE "Incumbent" = 'Howard Coble' | wikisql |
CREATE TABLE table_18931 (
"Position" real,
"Club (City/Town)" text,
"Games Played" real,
"W-L-D" text,
"Goals For/Against" text,
"Points" real
) | How many games has the club with 29-24 goals for/against score played? | SELECT "Games Played" FROM table_18931 WHERE "Goals For/Against" = '29-24' | wikisql |
CREATE TABLE table_25213146_2 (
pole_position VARCHAR,
date VARCHAR
) | How many Pole Positions were there on 30 March? | SELECT COUNT(pole_position) FROM table_25213146_2 WHERE date = "30 March" | sql_create_context |
CREATE TABLE table_52040 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | What p;layer attended Concordia College? | SELECT "Player" FROM table_52040 WHERE "College" = 'concordia' | 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 lab (
subject_id text,
hadm_id text,
... | give me the number of patients whose admission year is less than 2162 and diagnoses short title is blood in stool? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2162" AND diagnoses.short_title = "Blood in stool" | mimicsql_data |
CREATE TABLE table_9658 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"Record" text,
"Streak" text
) | What is the highest Game, when Streak is 'Win 1', and when Date is 'February 18'? | SELECT MAX("Game") FROM table_9658 WHERE "Streak" = 'win 1' AND "Date" = 'february 18' | wikisql |
CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE journal (
homepage varchar,
jid int,
name varchar
)
CREATE TABLE author (
aid int,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE domain_journal (
did int,
jid int
)
CREATE TABLE conference (
cid int,
... | return me the number of citations of ' Making database systems usable ' before 2010 . | SELECT COUNT(DISTINCT (PUBLICATION_1.title)) FROM cite, publication AS PUBLICATION_0, publication AS PUBLICATION_1 WHERE PUBLICATION_0.pid = cite.cited AND PUBLICATION_0.title = 'Making database systems usable' AND PUBLICATION_1.pid = cite.citing AND PUBLICATION_1.year < 2010 | academic |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPo... | Most Viewed With Less Than 3 Answers - Java. | SELECT Score, Title, CreationDate, ViewCount, AnswerCount, Tags, AcceptedAnswerId FROM Posts WHERE AnswerCount < 3 AND ViewCount > 10000 AND Tags LIKE '%java%' AND NOT Tags LIKE '%javascript%' | sede |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | tell me the total of patient 8116's input on the current intensive care unit visit? | SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8116) AND icustays.outtime IS NULL) | mimic_iii |
CREATE TABLE table_29806 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What was the score for game 3? | SELECT "Score" FROM table_29806 WHERE "Game" = '3' | wikisql |
CREATE TABLE table_16768245_2 (
namesake VARCHAR,
longitude VARCHAR
) | What is the namesake of the feature found at 189.5w longitude? | SELECT namesake FROM table_16768245_2 WHERE longitude = "189.5W" | sql_create_context |
CREATE TABLE table_name_73 (
round VARCHAR,
draft VARCHAR,
pick VARCHAR,
nationality VARCHAR,
position VARCHAR
) | In which round was Position G from the United States drafted as Pick 13 in 1971-1 1971? | SELECT round FROM table_name_73 WHERE nationality = "united states" AND position = "g" AND pick = "13" AND draft = "1971-1 1971" | sql_create_context |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
had... | how many times have patient 76275 been to the icu on their last hospital encounter? | SELECT COUNT(DISTINCT icustays.icustay_id) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 76275 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) | mimic_iii |
CREATE TABLE table_71346 (
"Molecule" text,
"Percent of Mass" text,
"Mol.Weight (daltons)" text,
"Molecules" text,
"Percent of Molecules" text
) | what is the mol.weight (daltons) when the percent of mass is 1.5? | SELECT "Mol.Weight (daltons)" FROM table_71346 WHERE "Percent of Mass" = '1.5' | wikisql |
CREATE TABLE table_78277 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What is the home team at the venue mcg? | SELECT "Home team" FROM table_78277 WHERE "Venue" = 'mcg' | wikisql |
CREATE TABLE table_11948857_1 (
county_s__represented VARCHAR,
member_senator VARCHAR
) | What is the county for senator C. Anthony Muse? | SELECT county_s__represented FROM table_11948857_1 WHERE member_senator = "C. Anthony Muse" | sql_create_context |
CREATE TABLE table_56002 (
"Round" real,
"Overall" text,
"Player" text,
"Position" text,
"Nationality" text,
"Club team" text
) | What round was Corey Cowick picked? | SELECT AVG("Round") FROM table_56002 WHERE "Player" = 'corey cowick' | wikisql |
CREATE TABLE table_65321 (
"Year" real,
"Record" text,
"Finish" text,
"Manager" text,
"Playoffs" text
) | Which Year has a Manager of bobby dews, and Playoffs of lost in 1st round? | SELECT MIN("Year") FROM table_65321 WHERE "Manager" = 'bobby dews' AND "Playoffs" = 'lost in 1st round' | wikisql |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TAB... | Win8 thread volume, page views, unique OPs by month. | SELECT COUNT(*) AS Volume, SUM(ViewCount) AS PageViews, COUNT(DISTINCT OwnerUserId) AS UniqueOPs, TIME_TO_STR(P.CreationDate, '%Y') AS "year", TIME_TO_STR(P.CreationDate, '%m') AS Month FROM Posts AS P WHERE (Tags LIKE '%<windows-8>%' OR Tags LIKE '%<metro-ui>%' OR Tags LIKE '%<metro-style-app>%' OR Tags LIKE '%<winrt>... | sede |
CREATE TABLE table_name_48 (
built VARCHAR,
withdrawal VARCHAR,
notes VARCHAR,
sr_number VARCHAR,
lb VARCHAR,
sc_number VARCHAR
) | what is the built when s.r. number is less than 2033, lb&sc number is less than 18, notes is i2 and withdrawal is cannot handle non-empty timestamp argument! 1935? | SELECT built FROM table_name_48 WHERE sr_number < 2033 AND lb & sc_number < 18 AND notes = "i2" AND withdrawal = "cannot handle non-empty timestamp argument! 1935" | sql_create_context |
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Docume... | Give me a bar chart for the total number of each budget type code | SELECT Budget_Type_Code, COUNT(*) FROM Documents_with_Expenses GROUP BY Budget_Type_Code | nvbench |
CREATE TABLE table_26094 (
"Week" real,
"Date" text,
"Opponent" text,
"Location" text,
"Final Score" text,
"Attendance" real,
"Record" text
) | What is the attendance? | SELECT MAX("Attendance") FROM table_26094 | 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,... | 77488325858在医疗就诊中所用的药品859155991所属的哪三大目录类别? | SELECT t_kc22.DIRE_TYPE FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '77488325858' AND t_kc22.SOC_SRT_DIRE_CD = '859155991' | css |
CREATE TABLE table_28638 (
"Rank" real,
"Couple" text,
"Judges" real,
"Public" real,
"Total" real,
"Vote percentage" text,
"Result" text
) | What is the public when the vote percentage is 16.0% | SELECT "Public" FROM table_28638 WHERE "Vote percentage" = '16.0%' | wikisql |
CREATE TABLE table_272865_20 (
matches_as_captain VARCHAR,
asian_cup_played_as_a_captain VARCHAR
) | How many matches as captain were played where Asian Cup played as a captain is Qatar 1988 | SELECT matches_as_captain FROM table_272865_20 WHERE asian_cup_played_as_a_captain = "Qatar 1988" | sql_create_context |
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text... | Show total number of id from each meter 200, I want to sort in ascending by the Y. | SELECT meter_200, SUM(ID) FROM swimmer GROUP BY meter_200 ORDER BY SUM(ID) | nvbench |
CREATE TABLE table_61286 (
"Round" real,
"Date" text,
"Grand Prix" text,
"Circuit" text,
"Pole Position" text,
"Fastest Lap" text,
"Race Winner" text
) | Who won the race circuit of sachsenring? | SELECT "Race Winner" FROM table_61286 WHERE "Circuit" = 'sachsenring' | wikisql |
CREATE TABLE table_name_65 (
away_team VARCHAR,
date VARCHAR
) | What was the away team score at the game held on 17 August 1935? | SELECT away_team AS score FROM table_name_65 WHERE date = "17 august 1935" | sql_create_context |
CREATE TABLE table_37305 (
"7:00" text,
"7:30" text,
"8:00" text,
"8:30" text,
"9:00" text,
"9:30" text,
"10:00" text,
"10:30" text
) | What is on the at 8:00 on the same channel that has Costello on at 8:30? | SELECT "8:00" FROM table_37305 WHERE "8:30" = 'costello' | wikisql |
CREATE TABLE table_name_85 (
laid_down VARCHAR,
hull_number VARCHAR
) | What is Laid Down, when Hull Number is 'CVN-69'? | SELECT laid_down FROM table_name_85 WHERE hull_number = "cvn-69" | sql_create_context |
CREATE TABLE table_name_23 (
location_attendance VARCHAR,
record VARCHAR
) | what is the location/attendance when the record is 9-2? | SELECT location_attendance FROM table_name_23 WHERE record = "9-2" | sql_create_context |
CREATE TABLE table_59525 (
"Result" text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Location" text
) | What is the result when the round is less than 3, the location is in Auckland, New Zealand, and tko is the method? | SELECT "Result" FROM table_59525 WHERE "Round" < '3' AND "Location" = 'auckland, new zealand' AND "Method" = 'tko' | wikisql |
CREATE TABLE table_name_97 (
player VARCHAR,
debut VARCHAR,
born VARCHAR
) | Who was the player with a debut of age 18 v plymouth , 14 august 2012, and born in Portsmouth? | SELECT player FROM table_name_97 WHERE debut = "age 18 v plymouth , 14 august 2012" AND born = "portsmouth" | sql_create_context |
CREATE TABLE table_name_44 (
to_par INTEGER,
player VARCHAR,
total VARCHAR
) | What was Tom Watson's lowest To par when the total was larger than 144? | SELECT MIN(to_par) FROM table_name_44 WHERE player = "tom watson" AND total > 144 | sql_create_context |
CREATE TABLE Customers (
customer_id INTEGER,
payment_method_code VARCHAR(10),
customer_code VARCHAR(20),
customer_name VARCHAR(80),
customer_address VARCHAR(255),
customer_phone VARCHAR(80),
customer_email VARCHAR(80)
)
CREATE TABLE Supplier_Addresses (
supplier_id INTEGER,
address... | What is the highest price of product, grouped by product type? Show a bar chart. | SELECT product_type_code, MAX(product_price) FROM Products GROUP BY product_type_code | nvbench |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | 审核24240723184号检验结果指标记录的审核人工号以及姓名叫什么? | SELECT SHRGH, SHRXM FROM jyjgzbb WHERE JYZBLSH = '24240723184' | css |
CREATE TABLE table_25357 (
"Order" real,
"Episode" text,
"Airdate" text,
"Rating" text,
"Share" real,
"Rating/Share (18\u201349)" text,
"Viewers (millions)" text,
"Rank (night)" real
) | Name the viewers for 2.1 rating | SELECT "Viewers (millions)" FROM table_25357 WHERE "Rating" = '2.1' | wikisql |
CREATE TABLE table_name_21 (
engine VARCHAR,
team VARCHAR
) | What engine did Dick Simon Racing use? | SELECT engine FROM table_name_21 WHERE team = "dick simon racing" | sql_create_context |
CREATE TABLE table_22737 (
"Submitting country" text,
"Film title used in nomination" text,
"Original title" text,
"Language(s)" text,
"Director(s)" text,
"Result" text
) | What is the original title of the film submitted by Greece? | SELECT "Original title" FROM table_22737 WHERE "Submitting country" = 'Greece' | wikisql |
CREATE TABLE table_1425948_1 (
number_in_fleet INTEGER,
chassis_manufacturer VARCHAR,
fleet_numbers VARCHAR
) | what is smallest number in fleet for chassis manufacturer Scania and fleet numbers is 3230? | SELECT MIN(number_in_fleet) FROM table_1425948_1 WHERE chassis_manufacturer = "Scania" AND fleet_numbers = "3230" | sql_create_context |
CREATE TABLE table_54890 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Which crowd has an Away team score of 16.9 (105)? | SELECT "Crowd" FROM table_54890 WHERE "Away team score" = '16.9 (105)' | wikisql |
CREATE TABLE table_name_99 (
position VARCHAR,
player VARCHAR
) | What position is todd hammel? | SELECT position FROM table_name_99 WHERE player = "todd hammel" | sql_create_context |
CREATE TABLE table_name_8 (
icao VARCHAR,
airline VARCHAR
) | What is the ICAO for Asiana Airlines? | SELECT icao FROM table_name_8 WHERE airline = "asiana airlines" | sql_create_context |
CREATE TABLE table_16181 (
"Institution" text,
"Location" text,
"Men\u2019s Nickname" text,
"Women\u2019s Nickname" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" text,
"Left" text,
"Current Conference" text,
"Classification" text
) | Name the women's nickname when the enrollment is 1500 in mobile, Alabama. | SELECT "Women\u2019s Nickname" FROM table_16181 WHERE "Enrollment" = '1500' AND "Location" = 'Mobile, Alabama' | wikisql |
CREATE TABLE torrents (
groupname text,
totalsnatched number,
artist text,
groupyear number,
releasetype text,
groupid number,
id number
)
CREATE TABLE tags (
index number,
id number,
tag text
) | Find me the most popular topics since 2010. | SELECT T1.tag FROM torrents AS T2 JOIN tags AS T1 ON T1.id = T2.id WHERE T2.groupyear >= 2010 GROUP BY T1.tag ORDER BY T2.totalsnatched DESC LIMIT 10 | whatcdhiphop |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE medication (
medi... | when was the last time that in 07/this year patient 028-25829 was prescribed a medicine via an nebulizer route? | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-25829')) AND medication.routeadmin = 'nebulizer' AND DATET... | eicu |
CREATE TABLE table_name_59 (
weight VARCHAR,
name VARCHAR
) | What is Alexandr Elke's Weight? | SELECT weight FROM table_name_59 WHERE name = "alexandr elke" | sql_create_context |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | 对于自己的病情医疗就诊88548403439是如何描述的? | SELECT MAIN_COND_DES FROM t_kc21 WHERE MED_CLINIC_ID = '88548403439' | css |
CREATE TABLE table_name_6 (
weight INTEGER,
height VARCHAR
) | Of those with a height of 7-0, who weighs the most? | SELECT MAX(weight) FROM table_name_6 WHERE height = "7-0" | sql_create_context |
CREATE TABLE table_56696 (
"PRR Class" text,
"Builder\u2019s Model" text,
"Build date" text,
"Total produced" real,
"Wheel arrangement" text,
"Service" text,
"Power output" text
) | What is the power of b-b wheel arrangement, built in 1952? | SELECT "Power output" FROM table_56696 WHERE "Wheel arrangement" = 'b-b' AND "Build date" = '1952' | 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... | what is the number of patients on iv bolus route of drug administration who are diagnosed with pressure ulcer of hip? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Pressure ulcer, hip" AND prescriptions.route = "IV BOLUS" | mimicsql_data |
CREATE TABLE table_21063 (
"Team" text,
"P" real,
"W" real,
"D" real,
"L" real,
"Tries for" real,
"Tries against" real,
"Try diff" text,
"Points for" real,
"Points against" real,
"Points diff" text,
"Pts" real
) | What is the maximum points against when team's points are 10? | SELECT MAX("Points against") FROM table_21063 WHERE "Pts" = '10' | wikisql |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE R... | Number of different Post Types. | SELECT pt.Name, COUNT(p.PostTypeId) FROM Posts AS p LEFT JOIN PostTypes AS pt ON p.PostTypeId = pt.Id GROUP BY pt.Name | sede |
CREATE TABLE customer (
cust_ID varchar(3),
cust_name varchar(20),
acc_type char(1),
acc_bal int,
no_of_loans int,
credit_score int,
branch_ID int,
state varchar(20)
)
CREATE TABLE bank (
branch_ID int,
bname varchar(20),
no_of_customers int,
city varchar(10),
state ... | Find the name and account balance of the customer whose name includes the letter a . Visualize them using a bar chart. | SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%' | nvbench |
CREATE TABLE medicine (
id int,
name text,
Trade_Name text,
FDA_approved text
)
CREATE TABLE enzyme (
id int,
name text,
Location text,
Product text,
Chromosome text,
OMIM int,
Porphyria text
)
CREATE TABLE medicine_enzyme_interaction (
enzyme_id int,
medicine_id in... | Visualize a bar chart for what are the ids and trade names of the medicine that can interact with at least 3 enzymes? | SELECT Trade_Name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id | nvbench |
CREATE TABLE table_203_687 (
id number,
"#" number,
"title" text,
"time" text,
"performer(s)" text,
"songwriters" text,
"producer(s)" text,
"samples and notes" text
) | what song was previous to hot thing ? | SELECT "title" FROM table_203_687 WHERE "#" = (SELECT "#" FROM table_203_687 WHERE "title" = '"hot thing"') - 1 | squall |
CREATE TABLE table_60189 (
"Election" text,
"First member" text,
"1st Party" text,
"Second member" text,
"2nd Party" text
) | What is Election, when 2nd Party is 'Constituency Abolished'? | SELECT "Election" FROM table_60189 WHERE "2nd Party" = 'constituency abolished' | wikisql |
CREATE TABLE table_26476336_2 (
new_conference VARCHAR,
new_classification VARCHAR
) | How many new conferences are in the NCLL deep south conference? | SELECT COUNT(new_conference) FROM table_26476336_2 WHERE new_classification = "NCLL Deep South Conference" | sql_create_context |
CREATE TABLE table_name_32 (
team_2 VARCHAR,
team_1 VARCHAR,
ground VARCHAR
) | What team was 2 when Tatung was team 1 at National Pei Men Senior High School? | SELECT team_2 FROM table_name_32 WHERE team_1 = "tatung" AND ground = "national pei men senior high school" | sql_create_context |
CREATE TABLE table_30478 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (millions)" text
) | How many episodes were directed by Jeff Melman and 1.21million viewers? | SELECT MIN("No. in season") FROM table_30478 WHERE "Directed by" = 'Jeff Melman' AND "U.S. viewers (millions)" = '1.21' | wikisql |
CREATE TABLE table_32052 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
) | Tell me the surface for 16 april 2007 | SELECT "Surface" FROM table_32052 WHERE "Date" = '16 april 2007' | wikisql |
CREATE TABLE table_name_77 (
score VARCHAR,
game VARCHAR,
series VARCHAR
) | What is the score for the game larger than 4 in series 3-2? | SELECT score FROM table_name_77 WHERE game > 4 AND series = "3-2" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | give me the number of patients whose admission year is less than 2105 and diagnoses short title is iron defic anemia nos? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2105" AND diagnoses.short_title = "Iron defic anemia NOS" | mimicsql_data |
CREATE TABLE Track (
TrackId integer,
Name varchar(200),
AlbumId integer,
MediaTypeId integer,
GenreId integer,
Composer varchar(220),
Milliseconds integer,
Bytes integer,
UnitPrice decimal(10,2)
)
CREATE TABLE Customer (
CustomerId integer,
FirstName varchar(40),
LastNa... | A bar chart for listing the number of the phone numbers of all employees, sort names from high to low order. | SELECT Phone, COUNT(Phone) FROM Employee GROUP BY Phone ORDER BY Phone DESC | nvbench |
CREATE TABLE table_204_658 (
id number,
"week" number,
"date" text,
"kickoff" text,
"opponent" text,
"results\nfinal score" text,
"results\nteam record" text,
"game site" text,
"attendance" number
) | where did this team play their first game of the season ? | SELECT "game site" FROM table_204_658 ORDER BY "date" LIMIT 1 | squall |
CREATE TABLE table_train_55 (
"id" int,
"ejection_fraction_ef" int,
"systolic_dysfunction" bool,
"language" string,
"valvular_dysfunction" bool,
"consent" bool,
"heart_disease" bool,
"left_bundle_branch_block" bool,
"trauma" bool,
"pericardial_disease" bool,
"complete_fluid_c... | pericardial disease or heart transplant. patients with left bundle branch block, pulmonary hypertension, known systolic dysfunction ( ejection fraction < 40 % ) , receiving vasopressors, known moderate or severe valvular dysfunction, and irregular heart rhythms will be enrolled but analyzed separately | SELECT * FROM table_train_55 WHERE pericardial_disease = 1 OR heart_transplant = 1 OR (left_bundle_branch_block = 1 OR pulmonary_hypertension = 1 OR (systolic_dysfunction = 1 OR ejection_fraction_ef < 40) OR receiving_vasopressor = 1 OR valvular_dysfunction = 1 OR heart_disease = 1) | criteria2sql |
CREATE TABLE table_14149 (
"Title" text,
"Series" text,
"Director" text,
"Release date" text,
"reissue?" text
) | What was the release date of the episode titled Drip-Along Daffy? | SELECT "Release date" FROM table_14149 WHERE "Title" = 'drip-along daffy' | wikisql |
CREATE TABLE table_66204 (
"Name" text,
"Height" text,
"Weight" text,
"Spike" text,
"2008 club" text
) | What is the height for the Tianjin members in 2008? | SELECT "Height" FROM table_66204 WHERE "2008 club" = 'tianjin' | wikisql |
CREATE TABLE table_1341586_39 (
first_elected INTEGER,
incumbent VARCHAR
) | what is the maximum first elected with incumbent being gus yatron | SELECT MAX(first_elected) FROM table_1341586_39 WHERE incumbent = "Gus Yatron" | sql_create_context |
CREATE TABLE table_name_57 (
venue VARCHAR,
attendance VARCHAR
) | Which venue has 13,634 people in attendance? | SELECT venue FROM table_name_57 WHERE attendance = "13,634" | sql_create_context |
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 flight (
aircraft_code_sequence text,
airline_code varchar,
airline_fli... | what is the least expensive flight from PITTSBURGH to ATLANTA leaving on 10 5 | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, da... | atis |
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15),
Workshop_Group_ID INTEGER,
Product_Description VARCHAR(255),
Product_Name VARCHAR(255),
Product_Price DECIMAL(20,4),
Other_Product_Service_Details VARCHAR(255)
)
CREATE TABLE Ref_Service_Types (
Service_Type_Code CH... | For each distinct product name, show its average product price, and sort in desc by the y-axis. | SELECT Product_Name, AVG(Product_Price) FROM Products GROUP BY Product_Name ORDER BY AVG(Product_Price) DESC | nvbench |
CREATE TABLE table_name_97 (
f_laps VARCHAR,
wins VARCHAR,
position VARCHAR
) | What was the F/Laps when the Wins were 0 and the Position was 4th? | SELECT f_laps FROM table_name_97 WHERE wins = "0" AND position = "4th" | sql_create_context |
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 (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | Count the number of white-russian patients who administer drugs via oral route. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND prescriptions.route = "ORAL" | mimicsql_data |
CREATE TABLE table_54357 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Round" real,
"Time" text
) | What was the highest number of rounds that had Hikaru Shinohara as an opponent and a record of 11-7? | SELECT MAX("Round") FROM table_54357 WHERE "Opponent" = 'hikaru shinohara' AND "Record" = '11-7' | wikisql |
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Dat... | Return a bar chart to show how many documents for different budget type code, rank Y-axis from high to low order. | SELECT T1.Budget_Type_Code, COUNT(T1.Budget_Type_Code) FROM Documents_with_Expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_Code = T2.Budget_Type_Code GROUP BY T1.Budget_Type_Code ORDER BY COUNT(T1.Budget_Type_Code) DESC | nvbench |
CREATE TABLE table_48741 (
"Year (Ceremony)" text,
"Film title used in nomination" text,
"Language(s)" text,
"Director" text,
"Result" text
) | Who was the director that had a film titled 'Floating Life'? | SELECT "Director" FROM table_48741 WHERE "Film title used in nomination" = 'floating life' | wikisql |
CREATE TABLE table_name_46 (
lyrics__l____music__m_ VARCHAR,
artist VARCHAR
) | Who provided lyrics or music to the artist Cube? | SELECT lyrics__l____music__m_ FROM table_name_46 WHERE artist = "cube" | sql_create_context |
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,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | What are the prerequisite courses for MUSED 377 ? | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... | advising |
CREATE TABLE table_65447 (
"Rank" real,
"Athletes" text,
"Country" text,
"Time" text,
"Notes" text
) | What is the lowest Rank for a Guam Player? | SELECT MIN("Rank") FROM table_65447 WHERE "Country" = 'guam' | wikisql |
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 (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | what is the number of patients whose discharge location is snf and procedure icd9 code is 17? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "SNF" AND procedures.icd9_code = "17" | mimicsql_data |
CREATE TABLE table_name_47 (
to_par VARCHAR,
player VARCHAR
) | What is To par, when Player is 'Jesper Parnevik'? | SELECT to_par FROM table_name_47 WHERE player = "jesper parnevik" | sql_create_context |
CREATE TABLE table_name_77 (
average VARCHAR,
stadium VARCHAR,
lowest VARCHAR
) | At Balmoor Stadium, what's the total average having a greater than 400 lowest? | SELECT COUNT(average) FROM table_name_77 WHERE stadium = "balmoor" AND lowest > 400 | sql_create_context |
CREATE TABLE Suppliers (
supplier_id INTEGER,
supplier_name VARCHAR(80),
supplier_phone VARCHAR(80)
)
CREATE TABLE Customers (
customer_id INTEGER,
payment_method_code VARCHAR(10),
customer_code VARCHAR(20),
customer_name VARCHAR(80),
customer_address VARCHAR(255),
customer_phone VA... | Return the staff ids and genders for any staff with the title Department Manager. Visualize by scatter chart. | SELECT T1.staff_id, T1.staff_gender FROM Staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Department Manager" | nvbench |
CREATE TABLE table_39048 (
"Unit" text,
"Russian" text,
"Translation" text,
"Ratio" text,
"Cubic inches (exact)" text,
"Metric value" text,
"Imperial" text,
"US Customary" text
) | What are the imperial size for the unit that has a ratio of 1/20? | SELECT "Imperial" FROM table_39048 WHERE "Ratio" = '1/20' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.