context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_20936 (
"Ethnicity" text,
"Islam" text,
"Christianity" text,
"Judaism" text,
"Buddhism" text,
"Other" text,
"Atheism" text,
"n/a" text
) | When tajik is the ethnicity what is islam? | SELECT "Islam" FROM table_20936 WHERE "Ethnicity" = 'Tajik' | wikisql |
CREATE TABLE table_203_54 (
id number,
"selected\nlatin american\ncountries" text,
"internl.\ntourism\narrivals\n2010\n(x 1000)" number,
"internl.\ntourism\nreceipts.\n2010\n(usd\n(x1000)" number,
"average\nreceipt\nper visitor\n2009\n(usd/turista)" number,
"tourist\narrivals\nper\n1000 inhab\n(... | tourism income in latin american countries in 2003 was at most what percentage of gdp ? | SELECT "tourism\nincome\n%\ngdp\n2003" FROM table_203_54 ORDER BY "tourism\nincome\n%\ngdp\n2003" DESC LIMIT 1 | squall |
CREATE TABLE product_characteristics (
product_id number,
characteristic_id number,
product_characteristic_value text
)
CREATE TABLE ref_product_categories (
product_category_code text,
product_category_description text,
unit_of_measure text
)
CREATE TABLE ref_characteristic_types (
charac... | What are the names and data types of the characteristics of the 'cumin' product? | SELECT t3.characteristic_name, t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN characteristics AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "cumin" | spider |
CREATE TABLE table_1570003_2 (
playoffs VARCHAR,
year VARCHAR
) | What was the playoff advancement during the year 1998? | SELECT playoffs FROM table_1570003_2 WHERE year = 1998 | sql_create_context |
CREATE TABLE table_41680 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | What CFL team did Kelly Bates play for? | SELECT "CFL Team" FROM table_41680 WHERE "Player" = 'kelly bates' | wikisql |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | Give me the comparison about the sum of Team_ID over the ACC_Road , and group by attribute ACC_Road, and could you order by the bar in asc? | SELECT ACC_Road, SUM(Team_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road | nvbench |
CREATE TABLE table_name_96 (
gold VARCHAR,
total VARCHAR,
rank VARCHAR
) | What's the total number of gold where the total is less than 23 and the rank is over 10? | SELECT COUNT(gold) FROM table_name_96 WHERE total < 23 AND rank > 10 | 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... | 74199194476这次门诊的就诊科室是哪个?编码是什么 | SELECT wdmzjzjlb.JZKSBM, wdmzjzjlb.JZKSMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '74199194476' UNION SELECT bdmzjzjlb.JZKSBM, bdmzjzjlb.JZKSMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '74199194476' | css |
CREATE TABLE table_65189 (
"Class" text,
"Railway number(s)" text,
"DRG number(s)" text,
"Quantity" real,
"Year(s) of manufacture" text,
"Axle arrangement" text
) | Which Year(s) of manufacture has an Axle arrangement of 2 b n2? | SELECT "Year(s) of manufacture" FROM table_65189 WHERE "Axle arrangement" = '2′b n2' | wikisql |
CREATE TABLE table_30638 (
"Rank" real,
"Country" text,
"Miss Universe" text,
"1st Runner-up" real,
"2nd Runner-up" real,
"3rd Runner-up" real,
"4th Runner-up" real,
"Semifinalists" real,
"Total" real
) | Which country has had 6 miss universe's? | SELECT "Country" FROM table_30638 WHERE "Miss Universe" = '6' | wikisql |
CREATE TABLE table_63491 (
"Rank" real,
"Peak" text,
"Country" text,
"Island" text,
"Elevation (m)" real,
"Col (m)" real
) | What is the elevation of Vanuatu, when the rank is smaller than 3? | SELECT AVG("Elevation (m)") FROM table_63491 WHERE "Country" = 'vanuatu' AND "Rank" < '3' | wikisql |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_... | show me the cheapest flights round trip from NEW YORK to SAN JOSE | 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 = 'NEW YORK' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_... | atis |
CREATE TABLE table_31213 (
"Episode" text,
"Theme / Date" text,
"Song title" text,
"Original performer" text,
"Result (Placement)" text
) | Who is the original performer when the episode is casting? | SELECT "Original performer" FROM table_31213 WHERE "Episode" = 'Casting' | wikisql |
CREATE TABLE table_name_75 (
date VARCHAR,
score VARCHAR
) | What is the Date of the game with a Score of L 115 118 (OT)? | SELECT date FROM table_name_75 WHERE score = "l 115–118 (ot)" | sql_create_context |
CREATE TABLE table_71663 (
"Year" text,
"Title" text,
"Production Company" text,
"Role" text,
"Notes" text
) | What is the name of the role that has a Title of Olvidarte Jamas? | SELECT "Role" FROM table_71663 WHERE "Title" = 'olvidarte jamas' | wikisql |
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... | 患者卫夏岚以前出现过哪些异常的反应 | SELECT * FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy... | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | what is days of hospital stay of subject name stephanie suchan? | SELECT demographic.days_stay FROM demographic WHERE demographic.name = "Stephanie Suchan" | mimicsql_data |
CREATE TABLE table_41439 (
"Season" text,
"Conference" text,
"Division" text,
"Finish" text,
"Wins" real,
"Losses" real,
"Win%" real
) | What is the highest win percentage when there were 23 losses? | SELECT MAX("Win%") FROM table_41439 WHERE "Losses" = '23' | wikisql |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | what is maximum days of hospital stay of patients whose insurance is private? | SELECT MAX(demographic.days_stay) FROM demographic WHERE demographic.insurance = "Private" | mimicsql_data |
CREATE TABLE table_47181 (
"Player" text,
"Club" text,
"Games" real,
"Goals" real,
"Assists" real,
"Points" real
) | What's the highest amount of Games recorded that have more than 10 assists? | SELECT MAX("Games") FROM table_47181 WHERE "Assists" > '10' | wikisql |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE equipment_... | how much is a US BOSTON to PITTSBURGH DAILY nonstop flight | 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.ci... | atis |
CREATE TABLE table_77384 (
"Tournament" text,
"1988" text,
"1989" 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,
"2002" text,
"2003" text... | What shows for 1992 when 2001 is 1r, 1994 is 1r, and the 2002 is qf? | SELECT "1992" FROM table_77384 WHERE "2001" = '1r' AND "1994" = '1r' AND "2002" = 'qf' | wikisql |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CRE... | select * from Posts where Tags like '%git%' order by score desc. | SELECT * FROM Posts WHERE Tags LIKE '%git%' ORDER BY Score DESC | sede |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CRE... | Instant success: Users with highest-scored first answer. Rank users by the score of their first answer ever posted on the site. | SELECT RANK() OVER (ORDER BY Answers.Score DESC) AS "rank", Answers.Score, Users.Id AS "user_link", Users.Reputation, Answers.Id AS "post_link", Answers.CreationDate AS "date", Question.Tags FROM Posts AS Answers INNER JOIN Posts AS Question ON Question.Id = Answers.ParentId INNER JOIN Users ON Users.Id = Answers.Owner... | sede |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugsto... | since 2103, what are the three most frequent drugs prescribed within 2 months to the patients aged 60 or above after change in mental status has been diagnosed? | SELECT t3.drugname FROM (SELECT t2.drugname, 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 = 'change in mental status' AND STRFTIME('%y', diagno... | eicu |
CREATE TABLE table_20467 (
"Cartridge" text,
"Bullet weight" text,
"Muzzle velocity" text,
"Muzzle energy" text,
"Source" text
) | What type of cartridge is used by a Weatherby? | SELECT "Cartridge" FROM table_20467 WHERE "Source" = 'Weatherby' | wikisql |
CREATE TABLE table_5634 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Series" text
) | What date has 1 for the game? | SELECT "Date" FROM table_5634 WHERE "Game" = '1' | wikisql |
CREATE TABLE table_47914 (
"Game" real,
"Date" text,
"Opponent" text,
"Score/Time" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Arena/Attendance" text,
"Record" text
) | What was the date of game 21? | SELECT "Date" FROM table_47914 WHERE "Game" = '21' | wikisql |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents... | how many patients had a insert endotracheal tube during the same month after the first percu abdominal drainage since 1 year ago? | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'percu abdom... | mimic_iii |
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE month (
... | show me which flights from SAN FRANCISCO to PITTSBURGH on a MONDAY are FIRST class | 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 AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE ((DAYS_0.day_name = 'MONDAY' AND DAYS_1.day_name = 'MO... | atis |
CREATE TABLE table_14070062_4 (
losing_bonus VARCHAR,
tries_for VARCHAR
) | what was the extra score when the overall score was 52 | SELECT losing_bonus FROM table_14070062_4 WHERE tries_for = "52" | sql_create_context |
CREATE TABLE table_27529608_21 (
semi_final__week_ VARCHAR,
hometown VARCHAR
) | How many semi-final weeks are there for acts from Pittsburgh, Pennsylvania? | SELECT COUNT(semi_final__week_) FROM table_27529608_21 WHERE hometown = "Pittsburgh, Pennsylvania" | sql_create_context |
CREATE TABLE table_54610 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Wins" real
) | What class is after 1973 with 41 points? | SELECT "Class" FROM table_54610 WHERE "Year" > '1973' AND "Points" = '41' | wikisql |
CREATE TABLE table_203_139 (
id number,
"name" text,
"abbr." text,
"leader" text,
"ideology" text,
"political position" text,
"mps" text
) | what party has the highest number of mps ? | SELECT "name" FROM table_203_139 ORDER BY "mps" DESC LIMIT 1 | squall |
CREATE TABLE table_38327 (
"Event" text,
"Round" text,
"Result" text,
"Opponent" text,
"Score" text
) | Result of win, and a Score of 33-22 involved what event? | SELECT "Event" FROM table_38327 WHERE "Result" = 'win' AND "Score" = '33-22' | wikisql |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
... | Total Number of Users with Small Rep. | SELECT COUNT(*) AS N, Reputation FROM Users WHERE Reputation < 2100 GROUP BY Reputation ORDER BY Reputation | sede |
CREATE TABLE table_name_90 (
dam_type VARCHAR,
year_completed VARCHAR
) | Which dam type was completed in 1961? | SELECT dam_type FROM table_name_90 WHERE year_completed = 1961 | sql_create_context |
CREATE TABLE table_12894 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location/Attendance" text,
"Record" text,
"Streak" text
) | Which Game has an Opponent of @ washington wizards? | SELECT "Game" FROM table_12894 WHERE "Opponent" = '@ washington wizards' | wikisql |
CREATE TABLE table_name_49 (
region VARCHAR,
format VARCHAR,
label VARCHAR
) | What is the region of the Catalog that is in cd format and has a label a&m/canyon? | SELECT region FROM table_name_49 WHERE format = "cd" AND label = "a&m/canyon" | sql_create_context |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number... | what are the three most commonly prescribed microbiology tests for patients who had previously received insulin - sliding scale administration in the same hospital visit until 2 years ago? | SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'insulin -... | eicu |
CREATE TABLE table_42993 (
"Pos." text,
"Player" text,
"Team" text,
"Height" text,
"Weight" real
) | What position does Brian Butch play? | SELECT "Pos." FROM table_42993 WHERE "Player" = 'brian butch' | wikisql |
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE equipment_sequence (
aircr... | show me the flights before 1100 on 8 2 from BOSTON to DENVER on DL | 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 (((date_day.day_number = 2 AND date_day.month_number = 8 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time... | atis |
CREATE TABLE table_17340355_7 (
high_assists VARCHAR,
date VARCHAR
) | Who had the high assist total on january 2? | SELECT high_assists FROM table_17340355_7 WHERE date = "January 2" | sql_create_context |
CREATE TABLE table_name_4 (
score VARCHAR,
visitor VARCHAR
) | What was the score for the game in which the Edmonton Oilers were visitors? | SELECT score FROM table_name_4 WHERE visitor = "edmonton oilers" | sql_create_context |
CREATE TABLE table_59690 (
"Tie no" real,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" real
) | What is the away team of the game with an attendance of 117? | SELECT "Away team" FROM table_59690 WHERE "Attendance" = '117' | wikisql |
CREATE TABLE table_34123 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Bulls score" real,
"Opponent score" real,
"Record" text,
"Streak" text
) | Which Opponent has a Streak of lost 1, and a Date of april 30? | SELECT "Opponent" FROM table_34123 WHERE "Streak" = 'lost 1' AND "Date" = 'april 30' | wikisql |
CREATE TABLE table_76877 (
"Date" text,
"Round" text,
"Opponents" text,
"H / A" text,
"Result F \u2013 A" text,
"Scorers" text,
"Attendance" real
) | What is the attendance number in the final round? | SELECT SUM("Attendance") FROM table_76877 WHERE "Round" = 'final' | wikisql |
CREATE TABLE table_name_98 (
date VARCHAR,
opponent VARCHAR,
surface VARCHAR
) | Name the date for chris evert opponent and carpet surface | SELECT date FROM table_name_98 WHERE opponent = "chris evert" AND surface = "carpet" | sql_create_context |
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | 患者任新霁在00年5月30日到12年7月25日内所有检验结果指标记录中的仪器编号以及名称分别是啥 | (SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jyb... | css |
CREATE TABLE table_78312 (
"Team" text,
"Outgoing manager" text,
"Date of departure" text,
"Replaced by" text,
"Date of Appointment" text
) | When was the appointment date for VFL Wolfsburg? | SELECT "Date of Appointment" FROM table_78312 WHERE "Team" = 'vfl wolfsburg' | wikisql |
CREATE TABLE table_14118 (
"Title" text,
"Series" text,
"Director" text,
"Production Number" text,
"Release date" text,
"reissue?" text
) | What is the production number that has no reissue with a series of lt, a director of robert mckimson and the title of the up-standing sitter? | SELECT "Production Number" FROM table_14118 WHERE "reissue?" = 'no' AND "Series" = 'lt' AND "Director" = 'robert mckimson' AND "Title" = 'the up-standing sitter' | wikisql |
CREATE TABLE table_68412 (
"Club" text,
"League" text,
"Sport" text,
"Venue" text,
"Established" real,
"Championships" real
) | Name the average established for championships less than 1 and club of erie seawolves | SELECT AVG("Established") FROM table_68412 WHERE "Championships" < '1' AND "Club" = 'erie seawolves' | wikisql |
CREATE TABLE table_51256 (
"Mountain West" text,
"Lost" real,
"Tied" real,
"Pct." real,
"Years" real,
"Total Games" real
) | How many games tied for the air force with over 57 years participating? | SELECT COUNT("Tied") FROM table_51256 WHERE "Mountain West" = 'air force' AND "Years" > '57' | wikisql |
CREATE TABLE table_name_82 (
week INTEGER,
result VARCHAR
) | How many Weeks have a Result of w 17 13? | SELECT AVG(week) FROM table_name_82 WHERE result = "w 17–13" | sql_create_context |
CREATE TABLE table_name_69 (
home_team VARCHAR
) | What was the score of Collingwood? | SELECT home_team AS score FROM table_name_69 WHERE home_team = "collingwood" | sql_create_context |
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,
test_id varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
... | Next Winter , what are the Other classes being offered ? | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id WHERE program_cour... | advising |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
... | what change was in patient 009-5001's sao2 second measured on the current icu visit compared to the first value measured on the current icu visit? | SELECT (SELECT vitalperiodic.sao2 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-5001') AND patient.unitdischargetime IS NULL) AND ... | eicu |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number... | tell me the top three most common diagnoses in patients in the age of 50s until 3 years ago? | SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 50 AND 59) AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-3 yea... | eicu |
CREATE TABLE table_15917 (
"School" text,
"Location" text,
"Founded" real,
"Affiliation" text,
"Enrollment" real,
"Team Nickname" text,
"Primary conference" text
) | How many of the schools listed are in Ames, IA? | SELECT COUNT("Primary conference") FROM table_15917 WHERE "Location" = 'Ames, IA' | wikisql |
CREATE TABLE table_15243 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What is the country that placed 4? | SELECT "Country" FROM table_15243 WHERE "Place" = '4' | wikisql |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | 在医疗就诊03902994477期间民政补助了多少钱? | SELECT CIVIL_SUBSIDY FROM t_kc24 WHERE MED_CLINIC_ID = '03902994477' | css |
CREATE TABLE prescribes (
physician number,
patient number,
medication number,
date time,
appointment number,
dose text
)
CREATE TABLE department (
departmentid number,
name text,
head number
)
CREATE TABLE medication (
code number,
name text,
brand text,
descriptio... | How many different types of rooms are there? | SELECT COUNT(DISTINCT roomtype) FROM room | spider |
CREATE TABLE table_204_504 (
id number,
"year" number,
"award" text,
"category" text,
"work" text,
"result" text
) | how many awards has victoria rowell won ? | SELECT COUNT("award") FROM table_204_504 WHERE "result" = 'won' | squall |
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
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 T... | what airline stands for HP | SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'HP' | atis |
CREATE TABLE table_30814 (
"Series #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | How many episode titles have series number 4? | SELECT COUNT("Title") FROM table_30814 WHERE "Series #" = '4' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TA... | what was the first insertion of venous catheter for hemodialysis procedure time of patient 006-105495 in the current hospital visit? | SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-105495' AND patient.hospitaldischargetime IS NULL)) AND treat... | eicu |
CREATE TABLE table_30620 (
"No" real,
"Driver" text,
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine" text
) | Name the entrant for bruno sterzi | SELECT "Entrant" FROM table_30620 WHERE "Driver" = 'Bruno Sterzi' | wikisql |
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 real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | Visualize a bar chart about the distribution of Date_of_Birth and Height , order y-axis in desc order please. | SELECT Date_of_Birth, Height FROM people ORDER BY Height DESC | nvbench |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | 门诊就诊15752379757的患者体征在几号记录的? | SELECT txmzjzjlb.JLSJ FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '15752379757' UNION SELECT ftxmzjzjlb.JLSJ FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZLSH = '15752379757' | css |
CREATE TABLE table_name_12 (
laps INTEGER,
grid VARCHAR
) | What is the low lap total for a grid of 14? | SELECT MIN(laps) FROM table_name_12 WHERE grid = 14 | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | how many patients whose gender is f and year of birth is less than 2080? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.dob_year < "2080" | mimicsql_data |
CREATE TABLE table_name_96 (
attendance VARCHAR,
date VARCHAR
) | What is the Attendance with a Date that is november 25, 1965? | SELECT attendance FROM table_name_96 WHERE date = "november 25, 1965" | sql_create_context |
CREATE TABLE table_1569625_1 (
tournament VARCHAR,
margin_of_victory VARCHAR,
winning_score VARCHAR
) | Name the tournament when margin of victory is 3 strokes and winning score is 71-66-70-67=274 | SELECT tournament FROM table_1569625_1 WHERE margin_of_victory = "3 strokes" AND winning_score = 71 - 66 - 70 - 67 = 274 | sql_create_context |
CREATE TABLE table_name_96 (
type VARCHAR,
date VARCHAR,
president VARCHAR,
year VARCHAR,
location VARCHAR
) | What is the Type with a Year larger than 2010, and a Location with justus lipsius building, brussels, and a President of herman van rompuy (2nd term), and a Date with 28 29 june? | SELECT type FROM table_name_96 WHERE year > 2010 AND location = "justus lipsius building, brussels" AND president = "herman van rompuy (2nd term)" AND date = "28–29 june" | sql_create_context |
CREATE TABLE table_68422 (
"INEGI code" real,
"Municipality" text,
"Municipal seat" text,
"Population (2010)" real,
"Area (Km2)" real
) | What is the inegi code for mexicali with 13,700 km area? | SELECT AVG("INEGI code") FROM table_68422 WHERE "Municipal seat" = 'mexicali' AND "Area (Km2)" > '13,700' | wikisql |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | 由门诊诊断为矽肺Ⅲ期的病号的检测指标586304数值的平均值以及最值各自是多少? | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM txmzjzjlb JOIN jybgb JOIN jyjgzbb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE txmzjzjlb.JZZDSM = '矽肺(硅肺)Ⅲ期' AND jyjgzbb.JCZBDM = ... | css |
CREATE TABLE table_name_93 (
date VARCHAR,
away_team VARCHAR
) | What is the date when the away team is essendon? | SELECT date FROM table_name_93 WHERE away_team = "essendon" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | what are the five most commonly prescribed drugs that were prescribed to the patients 40s in the same hospital encounter after having been diagnosed with sepsis - sepsis with multi-organ dysfunction until 1 year ago? | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'sepsis - sepsis... | eicu |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | what is drug name and drug code of subject name frank gregory? | SELECT prescriptions.drug, prescriptions.formulary_drug_cd FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Frank Gregory" | mimicsql_data |
CREATE TABLE table_1805191_6 (
results VARCHAR,
incumbent VARCHAR
) | What were the result(s) of the election featuring grace napolitano as the incumbent? | SELECT results FROM table_1805191_6 WHERE incumbent = "Grace Napolitano" | sql_create_context |
CREATE TABLE table_204_293 (
id number,
"district" number,
"name" text,
"party" text,
"district office" text,
"first elected" number
) | who was elected earlier , amedee or cortez ? | SELECT "name" FROM table_204_293 WHERE "name" IN ('jody amedee', 'page cortez') ORDER BY "first elected" LIMIT 1 | squall |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeou... | how many cases of multivitamins prescriptions have occurred until 2 years ago? | SELECT COUNT(*) FROM medication WHERE medication.drugname = 'multivitamins' AND DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-2 year') | eicu |
CREATE TABLE table_63484 (
"Round" text,
"Main date" text,
"Number of fixtures" real,
"Clubs" text,
"New entries this round" text
) | when there were 48 32 clubs? | SELECT "New entries this round" FROM table_63484 WHERE "Clubs" = '48 → 32' | wikisql |
CREATE TABLE table_49626 (
"Year" text,
"Gold" text,
"Silver" text,
"Bronze" text,
"Host city / cities" text,
"Host country / countries" text
) | Who won the gold in 1958? | SELECT "Gold" FROM table_49626 WHERE "Year" = '1958' | wikisql |
CREATE TABLE table_name_40 (
attendance VARCHAR,
week VARCHAR,
opponent VARCHAR
) | What is the attendance in the bye week after week 5? | SELECT attendance FROM table_name_40 WHERE week > 5 AND opponent = "bye" | sql_create_context |
CREATE TABLE tourist_attraction_features (
tourist_attraction_id number,
feature_id number
)
CREATE TABLE shops (
shop_id number,
shop_details text
)
CREATE TABLE royal_family (
royal_family_id number,
royal_family_details text
)
CREATE TABLE hotels (
hotel_id number,
star_rating_code... | Find the id and star rating of each hotel and sort them in increasing order of price. | SELECT hotel_id, star_rating_code FROM hotels ORDER BY price_range | spider |
CREATE TABLE table_name_61 (
country VARCHAR,
catalogue_no VARCHAR,
format VARCHAR,
label VARCHAR
) | What is the country that has the format of cd, the label of sony music and the catalogue no sicp-2055? | SELECT country FROM table_name_61 WHERE format = "cd" AND label = "sony music" AND catalogue_no = "sicp-2055" | sql_create_context |
CREATE TABLE table_name_94 (
high_assists VARCHAR,
game VARCHAR
) | What was the number of high assists for game 1? | SELECT high_assists FROM table_name_94 WHERE game = 1 | sql_create_context |
CREATE TABLE party (
Party_ID int,
Party_Theme text,
Location text,
First_year text,
Last_year text,
Number_of_hosts int
)
CREATE TABLE party_host (
Party_ID int,
Host_ID int,
Is_Main_in_Charge bool
)
CREATE TABLE host (
Host_ID int,
Name text,
Nationality text,
Age... | Give me the proportion about the location of each party with a pie chart. | SELECT Location, COUNT(Location) FROM party GROUP BY Location | nvbench |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | 检验报告单92482714366对应的患者姓名在门诊就诊中叫什么? | SELECT person_info.XM FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE jybgb.BGDH = '9... | css |
CREATE TABLE table_name_33 (
event VARCHAR,
method VARCHAR,
opponent VARCHAR
) | Which event has a Method of submission (triangle choke), and an Opponent of thiago tavares? | SELECT event FROM table_name_33 WHERE method = "submission (triangle choke)" AND opponent = "thiago tavares" | sql_create_context |
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_req... | show flights from NEW YORK to LAS VEGAS | 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 = 'NEW YORK' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'LAS V... | atis |
CREATE TABLE table_34375 (
"Place" real,
"Nation" text,
"6 Ropes" real,
"4 Hoops, 2 Clubs" real,
"Total" real
) | What is the palce number of Russia, which has 6 ropes of 19.425 and a total less than 38.925? | SELECT SUM("Place") FROM table_34375 WHERE "6 Ropes" = '19.425' AND "Nation" = 'russia' AND "Total" < '38.925' | wikisql |
CREATE TABLE table_name_53 (
result VARCHAR,
date VARCHAR
) | What is the result on November 1, 1992? | SELECT result FROM table_name_53 WHERE date = "november 1, 1992" | sql_create_context |
CREATE TABLE table_name_73 (
ties INTEGER,
team VARCHAR,
games_played VARCHAR
) | What is the average ties when the team is montreal victorias and the games played is more than 8? | SELECT AVG(ties) FROM table_name_73 WHERE team = "montreal victorias" AND games_played > 8 | sql_create_context |
CREATE TABLE table_28720 (
"Monarch" text,
"Heir" text,
"Status" text,
"Relationship to Monarch" text,
"Became heir; reason" text,
"Ceased to be heir; reason" text,
"Next in succession" text
) | Who is the monarch when became heir; reason is 13 july 1783 father succeeded? | SELECT "Monarch" FROM table_28720 WHERE "Became heir; reason" = '13 July 1783 father succeeded' | wikisql |
CREATE TABLE table_78608 (
"Letter" text,
"Pronunciation spelled free" text,
"Pronunciation spelled checked" text,
"Example spelled free" text,
"Example spelled checked" text
) | What is Example Spelled Free, when Example Spelled Checked is 'op / p/ ('on')'? | SELECT "Example spelled free" FROM table_78608 WHERE "Example spelled checked" = 'op /ɔp/ ("on")' | wikisql |
CREATE TABLE table_21348 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real,
"Competition" text,
"Man of the Match" text
) | Name the result for lukas smital and home | SELECT "Result" FROM table_21348 WHERE "Man of the Match" = 'Lukas Smital' AND "Venue" = 'Home' | wikisql |
CREATE TABLE table_name_78 (
year INTEGER,
floors INTEGER
) | When was the average year that the number of floors was greater than 75? | SELECT AVG(year) FROM table_name_78 WHERE floors > 75 | sql_create_context |
CREATE TABLE table_17229 (
"State" text,
"Norwegian Americans (1980)" real,
"Percent (1980)" text,
"Norwegian Americans (1990)" real,
"Percent (1990)" text,
"Norwegian Americans (2000)" real,
"Percent (2000)" text,
"Norwegian Americans (2009)" real,
"Percent (2009)" text
) | what is the maximum norwegian americans (2000) where norwegian americans (1990) is 9170 | SELECT MAX("Norwegian Americans (2000)") FROM table_17229 WHERE "Norwegian Americans (1990)" = '9170' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.