instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_train_246 (
"id" int,
"allergy_to_dapagliflozin" bool,
"allergy_to_exenatide" bool,
"estimated_glomerular_filtration_rate_egfr" int,
"fasting_c_peptide" float,
"urine_albumin_to_creatinine_ratio_uacr" int,
"fasting_triglyceride" int,
"NOUSE" float
)
-- Using valid SQ... | SELECT * FROM table_train_246 WHERE fasting_c_peptide < 0.8 | criteria2sql |
CREATE TABLE wrestler (
Wrestler_ID int,
Name text,
Reign text,
Days_held text,
Location text,
Event text
)
CREATE TABLE Elimination (
Elimination_ID text,
Wrestler_ID text,
Team text,
Eliminated_By text,
Elimination_Move text,
Time text
)
-- Using valid SQLite, answer... | SELECT Team, COUNT(*) FROM Elimination GROUP BY Team ORDER BY Team | nvbench |
CREATE TABLE table_name_39 (
overall INTEGER,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Overall has a Name of markus koch?
| SELECT SUM(overall) FROM table_name_39 WHERE name = "markus koch" | sql_create_context |
CREATE TABLE table_name_31 (
competition VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which competition has a Date of 16/4/01?
| SELECT competition FROM table_name_31 WHERE date = "16/4/01" | 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,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "FEMORAL ARTERY THROMBOSIS" AND demographic.age < "54" | mimicsql_data |
CREATE TABLE files (
f_id number(10),
artist_name varchar2(50),
file_size varchar2(20),
duration varchar2(20),
formats varchar2(20)
)
CREATE TABLE artist (
artist_name varchar2(50),
country varchar2(20),
gender varchar2(20),
preferred_genre varchar2(50)
)
CREATE TABLE song (
so... | SELECT formats, COUNT(*) FROM files GROUP BY formats ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_27833 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who wrote episode number 8... | SELECT "Written by" FROM table_27833 WHERE "No. in series" = '81' | wikisql |
CREATE TABLE table_1460 (
"Institution" text,
"Location" text,
"Nickname" text,
"Enrollment" real,
"Established" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest number of enrolled students?
| SELECT MIN("Enrollment") FROM table_1460 | wikisql |
CREATE TABLE table_24481478_1 (
team_record VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the game record during week 7?
| SELECT team_record FROM table_24481478_1 WHERE week = 7 | sql_create_context |
CREATE TABLE table_name_16 (
release_date VARCHAR,
production_number VARCHAR,
director VARCHAR,
series VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Release date of the Filmography directed by Robert McKimson in MM Series with Production... | SELECT release_date FROM table_name_16 WHERE director = "robert mckimson" AND series = "mm" AND production_number = "1665" | sql_create_context |
CREATE TABLE table_12130 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the tournament with a clay surface and sofia shapatava as the opponent?
| SELECT "Tournament" FROM table_12130 WHERE "Surface" = 'clay' AND "Opponent" = 'sofia shapatava' | wikisql |
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
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,
... | 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 = 'SAN FRANCISCO' AND date_day.day_number = 21 AND date_day.month_number = 2... | atis |
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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "SINGLE" AND lab."CATEGORY" = "Hematology" | mimicsql_data |
CREATE TABLE table_11926 (
"Number & name" text,
"Description" text,
"Current status" text,
"Livery" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Current status of Callander Coal company grey?
| SELECT "Current status" FROM table_11926 WHERE "Livery" = 'callander coal company grey' | wikisql |
CREATE TABLE table_45700 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Laps have a Grid larger than 8, and a Rider of anthony west?
| SELECT MAX("Laps") FROM table_45700 WHERE "Grid" > '8' AND "Rider" = 'anthony west' | wikisql |
CREATE TABLE table_name_4 (
manner_of_departure VARCHAR,
date_of_appointment VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the manner of departyre for 26 january date of appointment
| SELECT manner_of_departure FROM table_name_4 WHERE date_of_appointment = "26 january" | 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... | SELECT ACC_Road, School_ID FROM basketball_match GROUP BY All_Home, ACC_Road ORDER BY School_ID | nvbench |
CREATE TABLE table_10361625_1 (
college VARCHAR,
player_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is the college where Keith Hartwig plays?
| SELECT college FROM table_10361625_1 WHERE player_name = "Keith Hartwig" | sql_create_context |
CREATE TABLE table_name_4 (
pre_season INTEGER,
a_league VARCHAR,
finals VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Pre-Season has a A-League of 0 1, and a Finals larger than 0?
| SELECT MIN(pre_season) FROM table_name_4 WHERE a_league = "0 1" AND finals > 0 | sql_create_context |
CREATE TABLE table_name_29 (
year INTEGER,
finish VARCHAR,
start VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest Year, when Finish is '51', and when Start is less than 64?
| SELECT MAX(year) FROM table_name_29 WHERE finish = 51 AND start < 64 | sql_create_context |
CREATE TABLE table_name_50 (
region VARCHAR,
catalogue VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What region is the catalogue number 9362486152 that was from September 3, 2004 from?
| SELECT region FROM table_name_50 WHERE catalogue = "9362486152" AND date = "september 3, 2004" | sql_create_context |
CREATE TABLE table_name_66 (
week INTEGER,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of Week when there were 67,968 people in attendance?
| SELECT SUM(week) FROM table_name_66 WHERE attendance = "67,968" | sql_create_context |
CREATE TABLE table_78099 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average silver medals a team that has 1 gold and more than 5 bronze has?
| SELECT AVG("Silver") FROM table_78099 WHERE "Gold" = '1' AND "Bronze" > '5' | wikisql |
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,
ZYLBDM text,
ZYMC text
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM ... | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'E91.673' AND jyjgzbb.JCZBMC = '苯妥因' | css |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT OUT_DIAG_DOC_CD, OUT_DIAG_DOC_NM FROM t_kc21 WHERE PERSON_ID = '68080036' AND IN_HOSP_DATE BETWEEN '2007-06-03' AND '2016-05-26' GROUP BY OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE table_13325 (
"Rank" real,
"Team" text,
"Men's" real,
"Women's" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the average women's when men's is less than 113, the team is ue red warriors and the rank is higher tha... | SELECT AVG("Women's") FROM table_13325 WHERE "Men's" < '113' AND "Team" = 'ue red warriors' AND "Rank" > '6' | wikisql |
CREATE TABLE table_name_69 (
video_coding VARCHAR,
format_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What type of video coding has a format name of dvcam?
| SELECT video_coding FROM table_name_69 WHERE format_name = "dvcam" | sql_create_context |
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... | SELECT COUNT(*) FROM Posts AS p INNER JOIN Users AS u ON p.OwnerUserId = u.Id WHERE p.PostTypeId = 1 AND u.Reputation <= 50 AND p.CreationDate < @threshold | sede |
CREATE TABLE table_204_948 (
id number,
"year" number,
"award" text,
"category" text,
"film" text,
"result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many awards has dev won after 2012 ?
| SELECT COUNT("award") FROM table_204_948 WHERE "result" = 'won' AND "year" > 2012 | squall |
CREATE TABLE table_11614 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What did the home team score when the away team ... | SELECT "Home team score" FROM table_11614 WHERE "Away team score" = '12.8 (80)' | wikisql |
CREATE TABLE table_6149 (
"Year" real,
"Finish position" text,
"1st day" text,
"2nd day" text,
"3rd day" text,
"4th Day" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which 2nd day has a year prior to 2009?
| SELECT "2nd day" FROM table_6149 WHERE "Year" < '2009' | wikisql |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(... | SELECT JOB_ID, COUNT(JOB_ID) FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID WHERE T2.DEPARTMENT_NAME = 'Finance' GROUP BY JOB_ID ORDER BY JOB_ID | nvbench |
CREATE TABLE table_69077 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the average silver with total less than 1
| SELECT AVG("Silver") FROM table_69077 WHERE "Total" < '1' | wikisql |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jybgb.JYJSGH, jybgb.JYJSQM FROM jybgb WHERE jybgb.BGDH = '54790820335' | css |
CREATE TABLE table_203_252 (
id number,
"draw" number,
"country" text,
"language" text,
"artist" text,
"song" text,
"english translation" text,
"place" number,
"points" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who took first ... | SELECT "artist" FROM table_203_252 WHERE "place" = 1 | squall |
CREATE TABLE table_name_55 (
pitcher VARCHAR,
inn VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the pitcher with the record recorded in the 7th inning?
| SELECT pitcher FROM table_name_55 WHERE inn = "7th" | sql_create_context |
CREATE TABLE table_14948647_1 (
total_points VARCHAR,
oberstdorf__rk_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points in total were scored by the player whose Oberstdork score and rank were 252.6 (11)?
| SELECT total_points FROM table_14948647_1 WHERE oberstdorf__rk_ = "252.6 (11)" | sql_create_context |
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... | (SELECT jyjgzbb.JYZBLSH 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 jybgb.YLJGDM =... | css |
CREATE TABLE medicine_enzyme_interaction (
medicine_id VARCHAR
)
CREATE TABLE medicine (
id VARCHAR,
Name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the ids and names of the medicine that can interact with two or more enzymes?
| SELECT T1.id, T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2 | sql_create_context |
CREATE TABLE repair (
repair_ID int,
name text,
Launch_Date text,
Notes text
)
CREATE TABLE repair_assignment (
technician_id int,
repair_ID int,
Machine_ID int
)
CREATE TABLE technician (
technician_id real,
Name text,
Team text,
Starting_Year real,
Age int
)
CREATE T... | SELECT Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_id = T2.technician_id GROUP BY T2.Name | nvbench |
CREATE TABLE table_9959 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" text,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the record from the 2,500 in attendance?... | SELECT "Record" FROM table_9959 WHERE "Attendance" = '2,500' | wikisql |
CREATE TABLE table_25450 (
"Date" text,
"Location" text,
"Opponent" text,
"Terps Points" real,
"Opp. Points" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who were the opponents when the record was 11-2?
| SELECT "Opponent" FROM table_25450 WHERE "Record" = '11-2' | wikisql |
CREATE TABLE table_72848 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What w... | SELECT "Location Attendance" FROM table_72848 WHERE "Game" = '60' | wikisql |
CREATE TABLE table_name_73 (
manufacturer VARCHAR,
time_retired VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Manufacturer has a Time/Retired of accident?
| SELECT manufacturer FROM table_name_73 WHERE time_retired = "accident" | sql_create_context |
CREATE TABLE table_255602_1 (
city__municipality VARCHAR,
area__km²_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What city/municipality has area of 176.40?
| SELECT city__municipality FROM table_255602_1 WHERE area__km²_ = "176.40" | 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 demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "LIVER TRANSPLANT" | mimicsql_data |
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 diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND procedures.short_title = "Insert 2 vascular stents" | mimicsql_data |
CREATE TABLE table_22676 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location/Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Ho... | SELECT COUNT("Opponent") FROM table_22676 WHERE "Record" = '17-6' | wikisql |
CREATE TABLE table_name_16 (
transfers VARCHAR,
distance__km_ VARCHAR,
station_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the transfer distance (km) larger than 36.5, at the station of guangximen?
| SELECT transfers FROM table_name_16 WHERE distance__km_ > 36.5 AND station_name = "guangximen" | sql_create_context |
CREATE TABLE table_67525 (
"Name" text,
"Street address" text,
"Years as tallest" text,
"Height feet / m" text,
"Floors" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the Years as tallest with a Street address of 324 E. 11th Street?
| SELECT "Years as tallest" FROM table_67525 WHERE "Street address" = '324 e. 11th street' | wikisql |
CREATE TABLE table_36291 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Tournament has an Opponent of susan sloane?
| SELECT "Tournament" FROM table_36291 WHERE "Opponent" = 'susan sloane' | wikisql |
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... | SELECT demographic.dischtime FROM demographic WHERE demographic.name = "Dawn Cooper" | mimicsql_data |
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,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Hyperpotassemia" AND lab.fluid = "Ascites" | mimicsql_data |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
... | SELECT DisplayName FROM Users WHERE Id = '##UserId##' | sede |
CREATE TABLE table_203_824 (
id number,
"pick #" number,
"player" text,
"position" text,
"nationality" text,
"nhl team" text,
"college/junior/club team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which player was the only one drafted fro... | SELECT "player" FROM table_203_824 WHERE "nationality" = 'finland' | squall |
CREATE TABLE table_9870 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Country is Gene Littler from?
| SELECT "Country" FROM table_9870 WHERE "Player" = 'gene littler' | wikisql |
CREATE TABLE table_name_39 (
platelet_count VARCHAR,
condition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Platelet count has a Condition of factor v deficiency?
| SELECT platelet_count FROM table_name_39 WHERE condition = "factor v deficiency" | sql_create_context |
CREATE TABLE table_79364 (
"Name" text,
"Pos." text,
"Height" text,
"Weight" text,
"Born" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the weight of the player with a height of 2.00m?
| SELECT "Weight" FROM table_79364 WHERE "Height" = '2.00' | wikisql |
CREATE TABLE table_2248784_3 (
rank_world VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of rank world for bhutan
| SELECT COUNT(rank_world) FROM table_2248784_3 WHERE country = "Bhutan" | sql_create_context |
CREATE TABLE table_54805 (
"Frequency" text,
"Call sign" text,
"Name" text,
"Format" text,
"Owner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the call sign of the Classic Country Music station?
| SELECT "Call sign" FROM table_54805 WHERE "Format" = 'classic country' | wikisql |
CREATE TABLE table_79904 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year engine does a ferrari v6 have?
| SELECT "Year" FROM table_79904 WHERE "Engine" = 'ferrari v6' | wikisql |
CREATE TABLE table_name_64 (
venue VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the venue when the score is 20 11 ?
| SELECT venue FROM table_name_64 WHERE score = "20½–11½" | sql_create_context |
CREATE TABLE table_name_34 (
rank VARCHAR,
nation VARCHAR,
gold VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total rank with a Nation of gotland, and a Gold larger than 23?
| SELECT COUNT(rank) FROM table_name_34 WHERE nation = "gotland" AND gold > 23 | sql_create_context |
CREATE TABLE table_59104 (
"Child" text,
"Date of birth" text,
"Mother" text,
"Father" text,
"DNA testing status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of birth of Oliver Buell's child?
| SELECT "Date of birth" FROM table_59104 WHERE "Child" = 'oliver buell' | wikisql |
CREATE TABLE table_name_28 (
name VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of a location in Nigeria?
| SELECT name FROM table_name_28 WHERE location = "nigeria" | sql_create_context |
CREATE TABLE table_77467 (
"Team" text,
"Athletes" text,
"Run 1" text,
"Run 2" text,
"Run 3" text,
"Run 4" text,
"Final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Run 4 has Athletes of alexandru frimu & costel r dulescu?
| SELECT "Run 4" FROM table_77467 WHERE "Athletes" = 'alexandru frimu & costel rădulescu' | wikisql |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name | nvbench |
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... | SELECT demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.name = "Michael Witt" | mimicsql_data |
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 code_description (
code varchar,
description text
)
CREATE TABLE month (
... | 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, fare_basis, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND... | atis |
CREATE TABLE table_name_87 (
reserved_for___sc___st__none_ VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Kaimganj has what reserved for (SC / ST /None)?
| SELECT reserved_for___sc___st__none_ FROM table_name_87 WHERE name = "kaimganj" | sql_create_context |
CREATE TABLE table_22485 (
"Township" text,
"County" text,
"Pop. (2010)" real,
"Land ( sqmi )" text,
"Water (sqmi)" text,
"Latitude" text,
"Longitude" text,
"GEO ID" real,
"ANSI code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Ho... | SELECT COUNT("ANSI code") FROM table_22485 WHERE "Latitude" = '46.415037' | wikisql |
CREATE TABLE table_9787 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which To par has a Finish of t3, and a Player of julius boros?
| SELECT "To par" FROM table_9787 WHERE "Finish" = 't3' AND "Player" = 'julius boros' | wikisql |
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Tit... | SELECT p.Id AS "post_link", p.CreationDate, ph.CreationDate AS ClosureDate, p.Score, p.ViewCount FROM Posts AS p LEFT JOIN PostHistory AS ph ON ph.PostId = p.Id LEFT JOIN PostHistoryTypes AS pht ON ph.PostHistoryTypeId = pht.Id WHERE ph.PostHistoryTypeId = 10 AND ph.Comment = (SELECT Id FROM CloseReasonTypes WHERE Name... | sede |
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,
... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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 = '007-16517'... | eicu |
CREATE TABLE table_21133193_1 (
gdp_per_capita__us INTEGER,
languages VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most gdp per capita latvian
| SELECT MAX(gdp_per_capita__us) AS $_ FROM table_21133193_1 WHERE languages = "Latvian" | sql_create_context |
CREATE TABLE table_name_69 (
year INTEGER,
record_label VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Year is the highest one that has a Record label of supertone melodies?
| SELECT MAX(year) FROM table_name_69 WHERE record_label = "supertone melodies" | sql_create_context |
CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE TABLE course (
course_id varchar(8),
title varchar(50),
dept_name varchar(20),
credits numeric(2,0)
)
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABL... | SELECT title, SUM(credits) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY title ORDER BY SUM(credits) | nvbench |
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 prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.icd9_code = "5789" | mimicsql_data |
CREATE TABLE table_40504 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What points average has a played greater than 2... | SELECT AVG("Points") FROM table_40504 WHERE "Played" > '20' | 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_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT t_kc24.t_kc21_IN_DIAG_DIS_CD, t_kc24.t_kc21_IN_DIAG_DIS_NM FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_ID = '28022050' AND t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 7272.12) | css |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON 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 jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BG... | css |
CREATE TABLE table_58105 (
"Number" text,
"Builder" text,
"Type" text,
"Date" text,
"Works number" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Works Number that has a Number of 153 in 1916?
| SELECT "Works number" FROM table_58105 WHERE "Date" = '1916' AND "Number" = '153' | wikisql |
CREATE TABLE table_name_57 (
segment_a VARCHAR,
segment_d VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which segment A also has a segment D of kitchen shears?
| SELECT segment_a FROM table_name_57 WHERE segment_d = "kitchen shears" | sql_create_context |
CREATE TABLE table_17936 (
"Year" text,
"Championship" text,
"54 holes" text,
"Winning score" text,
"Margin" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What championship had a margin of playoff 2?
| SELECT "Championship" FROM table_17936 WHERE "Margin" = 'Playoff 2' | wikisql |
CREATE TABLE table_51706 (
"Gymnast" text,
"Start Value" real,
"Penalty" text,
"Average" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the penalty for the gymnast with average above 9.662 and total is more than 9.706?
| SELECT "Penalty" FROM table_51706 WHERE "Average" > '9.662' AND "Total" > '9.706' | wikisql |
CREATE TABLE table_7974 (
"Party" text,
"Seats" text,
"% of seats" text,
"First Pref votes" real,
"% FPv" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many First Pref votes have Seats of 1?
| SELECT COUNT("First Pref votes") FROM table_7974 WHERE "Seats" = '1' | 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 (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.label = "Lactate" | mimicsql_data |
CREATE TABLE table_63180 (
"Township" text,
"County" text,
"Pop. (2010)" real,
"Land ( sqmi )" real,
"Water (sqmi)" real,
"Latitude" real,
"Longitude" real,
"GEO ID" real,
"ANSI code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT AVG("Latitude") FROM table_63180 WHERE "Water (sqmi)" < '2.106' AND "County" = 'dickey' AND "Pop. (2010)" < '95' | wikisql |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
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,
... | SELECT * FROM t_kc21 WHERE t_kc21.PERSON_ID = '42289604' AND t_kc21.MED_SER_ORG_NO = '9183421' AND NOT t_kc21.MED_ORG_DEPT_NM LIKE '%内%' | css |
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,
... | SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'PATH' AND course.number = 699 AND instructor.name LIKE '%Wayne High%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_inst... | advising |
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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2156" AND procedures.icd9_code = "9744" | mimicsql_data |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT (SELECT PER_ACC_PAY FROM t_kc24 WHERE MED_CLINIC_ID = '78665747040') / (SELECT MED_AMOUT FROM t_kc24 WHERE MED_CLINIC_ID = '78665747040') | css |
CREATE TABLE table_72310 (
"Strongs #" real,
"Hebrew word" text,
"Strongs Transliteration" text,
"Strongs Words Compounded" text,
"English Spelling" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many strongs transliteration of the english spell... | SELECT COUNT("Strongs Transliteration") FROM table_72310 WHERE "English Spelling" = 'Jehojakin' | wikisql |
CREATE TABLE table_2562572_56 (
cyrillic_name_other_names VARCHAR,
settlement VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Cyrillic name for Novi Vladimirovac?
| SELECT cyrillic_name_other_names FROM table_2562572_56 WHERE settlement = "Novi Vladimirovac" | sql_create_context |
CREATE TABLE table_21799 (
"Scientific name" text,
"Common name" text,
"Length (male)" text,
"Length (female)" text,
"Color" text,
"Lifespan (years)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the common name for furcifer pardalis
| SELECT "Common name" FROM table_21799 WHERE "Scientific name" = 'Furcifer pardalis' | wikisql |
CREATE TABLE table_42865 (
"Television service" text,
"Country" text,
"Language" text,
"Content" text,
"HDTV" text,
"Package/Option" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country has a Fox television service?
| SELECT "Country" FROM table_42865 WHERE "Television service" = 'fox' | wikisql |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar... | SELECT DISTINCT course.department, course.name, course.number, instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.name LIKE '%Anthropology and History Workshop/Reading Group%' AND NOT instructor.name LIKE '%Abbas%' AND offering_ins... | advising |
CREATE TABLE mountain (
mountain_id number,
name text,
height number,
prominence number,
range text,
country text
)
CREATE TABLE climber (
climber_id number,
name text,
country text,
time text,
points number,
mountain_id number
)
-- Using valid SQLite, answer the follo... | SELECT T1.name, T2.height FROM climber AS T1 JOIN mountain AS T2 ON T1.mountain_id = T2.mountain_id | spider |
CREATE TABLE table_204_969 (
id number,
"composer" text,
"title" text,
"genre" text,
"date" number,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many are symphonic poems ?
| SELECT COUNT(*) FROM table_204_969 WHERE "genre" = 'symphonic poem' | squall |
CREATE TABLE table_65781 (
"Mother Tongue" text,
"Population (2006)" real,
"Percentage (2006)" text,
"Population (2011)" real,
"Percentage (2011)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of people in 2011 speaking the... | SELECT COUNT("Population (2011)") FROM table_65781 WHERE "Population (2006)" = '120' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.