instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_37 (
surface VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the surface of the tournament with Sascha Kloer as the opponent?
| SELECT surface FROM table_name_37 WHERE opponent = "sascha kloer" | sql_create_context |
CREATE TABLE neighborhood (
id int,
business_id varchar,
neighborhood_name varchar
)
CREATE TABLE review (
rid int,
business_id varchar,
user_id varchar,
rating float,
text longtext,
year int,
month varchar
)
CREATE TABLE business (
bid int,
business_id varchar,
nam... | SELECT SUM(count) FROM checkin WHERE day = 'Sunday' | yelp |
CREATE TABLE table_name_61 (
drawn INTEGER,
games INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Drawn is which has a Games smaller than 6?
| SELECT SUM(drawn) FROM table_name_61 WHERE games < 6 | sql_create_context |
CREATE TABLE table_name_61 (
catalog VARCHAR,
region VARCHAR,
format VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Catalog has a Region of Canada and a Format of cd/dvd?
| SELECT catalog FROM table_name_61 WHERE region = "canada" AND format = "cd/dvd" | sql_create_context |
CREATE TABLE table_name_19 (
location VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which location held the bout that led to a 4-3 record?
| SELECT location FROM table_name_19 WHERE record = "4-3" | sql_create_context |
CREATE TABLE table_21132404_1 (
_percentage_2006 VARCHAR,
political_parties VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many time was the political party the social democratic party of germany?
| SELECT COUNT(_percentage_2006) FROM table_21132404_1 WHERE political_parties = "Social Democratic Party of Germany" | sql_create_context |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE offering_instructor (
offering_ins... | SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 525 AND instructor.name LIKE '%Yves Atchade%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_in... | advising |
CREATE TABLE table_train_40 (
"id" int,
"bone_marrow_transplant" bool,
"organ_transplantation" bool,
"systolic_blood_pressure_sbp" int,
"do_not_resuscitate_dnr" bool,
"autoimmune_disease" bool,
"steroid_therapy" bool,
"intention_to_central_venous_catheter" bool,
"hematologic_disease"... | SELECT * FROM table_train_40 WHERE do_not_resuscitate_dnr = 1 | criteria2sql |
CREATE TABLE table_name_80 (
points VARCHAR,
rank VARCHAR,
games VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points are there for rank 5 with more than 34 games?
| SELECT COUNT(points) FROM table_name_80 WHERE rank = 5 AND games > 34 | sql_create_context |
CREATE TABLE table_60015 (
"Name" text,
"Region" text,
"Programming" text,
"Type" text,
"Encryption" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the region for tv uskana?
| SELECT "Region" FROM table_60015 WHERE "Name" = 'tv uskana' | wikisql |
CREATE TABLE table_16976 (
"Total No." real,
"Celebrity" text,
"Director" text,
"Original air date" text,
"Viewers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the Original Air Date is 10January2008, what directors released on that date?
| SELECT "Director" FROM table_16976 WHERE "Original air date" = '10January2008' | wikisql |
CREATE TABLE table_name_73 (
home_team VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the home team that played Collingwood?
| SELECT home_team FROM table_name_73 WHERE away_team = "collingwood" | sql_create_context |
CREATE TABLE publication (
Publication_ID int,
Book_ID int,
Publisher text,
Publication_Date text,
Price real
)
CREATE TABLE book (
Book_ID int,
Title text,
Issues real,
Writer text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show dif... | SELECT Publisher, COUNT(*) FROM publication GROUP BY Publisher ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_63789 (
"Rank" real,
"Athlete" text,
"Country" text,
"Time" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest rank for a 6:52.70 time and notes of sa/b?
| SELECT MAX("Rank") FROM table_63789 WHERE "Notes" = 'sa/b' AND "Time" = '6:52.70' | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" | mimicsql_data |
CREATE TABLE table_53048 (
"Raion (district) or City" text,
"Total" text,
"Ukrainians" text,
"Moldovans" text,
"Bessarabian Bulgarians" text,
"Russians" text,
"Gagauzians" text,
"Other ethnic groups\u00b2" text
)
-- Using valid SQLite, answer the following questions for the tables prov... | SELECT "Raion (district) or City" FROM table_53048 WHERE "Bessarabian Bulgarians" = '8,600' | wikisql |
CREATE TABLE table_4823 (
"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 is the away team's score when south melbourn... | SELECT "Away team score" FROM table_4823 WHERE "Away team" = 'south melbourne' | wikisql |
CREATE TABLE table_name_64 (
date INTEGER,
cores_per_die___dies_per_module VARCHAR,
clock VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the latest date with Cores per die / Dies per module of 2 / 1, and a Clock of 1.4-1.6ghz?
| SELECT MAX(date) FROM table_name_64 WHERE cores_per_die___dies_per_module = "2 / 1" AND clock = "1.4-1.6ghz" | sql_create_context |
CREATE TABLE table_20500097_1 (
points VARCHAR,
poles INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points did he win in the race with more than 1.0 poles?
| SELECT points FROM table_20500097_1 WHERE poles > 1.0 | sql_create_context |
CREATE TABLE table_64207 (
"Frequency" text,
"Station" text,
"Operator" text,
"Country of origin" text,
"Transmitter location" text,
"Format" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which station has a frequency of 873khz?
| SELECT "Station" FROM table_64207 WHERE "Frequency" = '873khz' | wikisql |
CREATE TABLE table_60853 (
"Position" real,
"Club" text,
"Played" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Points" real,
"Goal Difference" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT AVG("Wins") FROM table_60853 WHERE "Goal Difference" > '-24' AND "Draws" > '7' | wikisql |
CREATE TABLE table_name_1 (
song VARCHAR,
year VARCHAR,
us_hot_100 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Song has a Year smaller than 1979, and a US Hot 100 of 8?
| SELECT song FROM table_name_1 WHERE year < 1979 AND us_hot_100 = "8" | sql_create_context |
CREATE TABLE table_33865 (
"Frequency" real,
"Callsign" text,
"Brand" text,
"City of License" text,
"Website" text,
"Webcast" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Frequency has a Website of , and a Webcast of in san antonio?
| SELECT AVG("Frequency") FROM table_33865 WHERE "Website" = '•' AND "Webcast" = '•' AND "City of License" = 'san antonio' | wikisql |
CREATE TABLE competition_result (
competition_id number,
club_id_1 number,
club_id_2 number,
score text
)
CREATE TABLE club (
club_id number,
name text,
region text,
start_year text
)
CREATE TABLE competition (
competition_id number,
year number,
competition_type text,
... | SELECT name FROM club WHERE NOT club_id IN (SELECT club_id FROM player) | spider |
CREATE TABLE table_70048 (
"Rank" real,
"Mountain Peak" text,
"Province" text,
"Mountain Range" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the mountain peak with location of 46.7000 n 60.5992 w
| SELECT "Mountain Peak" FROM table_70048 WHERE "Location" = '46.7000°n 60.5992°w' | wikisql |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostHistoryTypes (
Id number,
Name te... | SELECT Score, ViewCount, CreationDate, DATEDIFF(DAY, CreationDate, GETDATE()) AS "DaysOpen", (ViewCount / DATEDIFF(DAY, CreationDate, GETDATE())) AS "NewScore", LastActivityDate, Title, Id, Tags FROM Posts WHERE Title LIKE '%mongodb%' OR Tags LIKE '%mongodb%' ORDER BY NewScore DESC | sede |
CREATE TABLE table_8168 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Ground" text,
"Date" text,
"Crowd" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the away team from Adelaide?
| SELECT "Date" FROM table_8168 WHERE "Away team" = 'adelaide' | wikisql |
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... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'chest pain' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104') AS t1 JOIN (SELECT patient.uniquepid, med... | eicu |
CREATE TABLE table_name_28 (
title VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which title had rank 9?
| SELECT title FROM table_name_28 WHERE rank = 9 | sql_create_context |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2043" AND lab.fluid = "Urine" | mimicsql_data |
CREATE TABLE table_2006661_1 (
date VARCHAR,
value VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date for value 55c
| SELECT date FROM table_2006661_1 WHERE value = "55c" | sql_create_context |
CREATE TABLE vocals (
TYPE VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find all the vocal types.
| SELECT DISTINCT TYPE FROM vocals | sql_create_context |
CREATE TABLE festival_detail (
Festival_Name VARCHAR,
YEAR VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show the names of the three most recent festivals.
| SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3 | sql_create_context |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Comments (
Id number,... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%Iran%' ORDER BY Reputation DESC LIMIT 300 | sede |
CREATE TABLE table_name_90 (
power VARCHAR,
class VARCHAR,
identifier VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the power that belongs to Class A with an Identifier of CBOC-FM?
| SELECT power FROM table_name_90 WHERE class = "a" AND identifier = "cboc-fm" | sql_create_context |
CREATE TABLE table_14805 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date with margin of victory of 1 stroke and tournament of legend financ... | SELECT "Date" FROM table_14805 WHERE "Margin of victory" = '1 stroke' AND "Tournament" = 'legend financial group classic' | wikisql |
CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Birth_Date text,
Birth_Place text
)
CREATE TABLE body_builder (
Body_Builder_ID int,
People_ID int,
Snatch real,
Clean_Jerk real,
Total real
)
-- Using valid SQLite, answer the following questions fo... | SELECT People_ID, Total FROM body_builder | nvbench |
CREATE TABLE table_name_84 (
outcome VARCHAR,
score_in_final VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the outcome for the match that ended in a score of 5 7, 6 4, [10 7]?
| SELECT outcome FROM table_name_84 WHERE score_in_final = "5–7, 6–4, [10–7]" | sql_create_context |
CREATE TABLE table_name_36 (
slalom VARCHAR,
downhill VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Slalom has a Downhill of 4?
| SELECT slalom FROM table_name_36 WHERE downhill = "4" | sql_create_context |
CREATE TABLE table_58142 (
"Player" text,
"Nationality" text,
"Position" text,
"Years for Jazz" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the nationality of the guard who plays at Utah?
| SELECT "Nationality" FROM table_58142 WHERE "Position" = 'guard' AND "School/Club Team" = 'utah' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hepatorenal syndrome') AS t1 JOIN (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN p... | eicu |
CREATE TABLE table_50139 (
"Name" text,
"Latitude" text,
"Longitude" text,
"Diameter (km)" real,
"Year named" real,
"Name origin" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- COunt the sum of Diameter (km) which has a Latitude of 62.7n?
| SELECT SUM("Diameter (km)") FROM table_50139 WHERE "Latitude" = '62.7n' | wikisql |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost numbe... | SELECT COUNT(*) FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-23605')) AND microlab.culturesite = 'blood, venipuncture' AND DATETIME(microla... | eicu |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND prescriptions.drug = "Sulfameth/Trimethoprim DS" | mimicsql_data |
CREATE TABLE Elimination (
Elimination_ID text,
Wrestler_ID text,
Team text,
Eliminated_By text,
Elimination_Move text,
Time text
)
CREATE TABLE wrestler (
Wrestler_ID int,
Name text,
Reign text,
Days_held text,
Location text,
Event text
)
-- Using valid SQLite, answer... | SELECT Team, COUNT(Team) FROM Elimination GROUP BY Team | nvbench |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
... | SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE | nvbench |
CREATE TABLE table_name_86 (
network VARCHAR,
title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Network, when Title is 'Epik High's Love And Delusion'?
| SELECT network FROM table_name_86 WHERE title = "epik high's love and delusion" | sql_create_context |
CREATE TABLE table_71814 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the Blue Jays game when their record was 75-68 and the attendanc... | SELECT "Score" FROM table_71814 WHERE "Attendance" > '33,736' AND "Record" = '75-68' | wikisql |
CREATE TABLE operate_company (
id number,
name text,
type text,
principal_activities text,
incorporated_in text,
group_equity_shareholding number
)
CREATE TABLE flight (
id number,
vehicle_flight_number text,
date text,
pilot text,
velocity number,
altitude number,
a... | SELECT AVG(velocity) FROM flight WHERE pilot = 'Thompson' | spider |
CREATE TABLE table_29218221_2 (
rider VARCHAR,
fri_3_june VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the rider with a Fri 3 June time of 18' 19.68 123.516mph?
| SELECT rider FROM table_29218221_2 WHERE fri_3_june = "18' 19.68 123.516mph" | sql_create_context |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDis... | SELECT COUNT(*) AS score, p.Id, p.OwnerUserId FROM Votes AS v, Posts AS p, Posts AS p2 WHERE v.VoteTypeId = 2 AND v.PostId = p.Id AND p.ParentId = p2.Id AND v.CreationDate - p2.CreationDate < 14 GROUP BY p.Id, p.OwnerUserId HAVING COUNT(*) > 10 | sede |
CREATE TABLE table_name_50 (
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was South Melbourne's score as the away team?
| SELECT away_team AS score FROM table_name_50 WHERE away_team = "south melbourne" | sql_create_context |
CREATE TABLE table_name_64 (
entrant VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the entrant in 1999?
| SELECT entrant FROM table_name_64 WHERE year = 1999 | sql_create_context |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT t_kc21.MED_ORG_DEPT_NM, AVG(t_kc24.OVE_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '8731863' GROUP BY t_kc21.MED_ORG_DEPT_NM | css |
CREATE TABLE table_6328 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Tournament on October 24, 1982 had Alycia Moulton as the ... | SELECT "Tournament" FROM table_6328 WHERE "Date" = 'october 24, 1982' AND "Partner" = 'alycia moulton' | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit 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.icd9_code = "42831" AND lab.fluid = "Other Body Fluid" | mimicsql_data |
CREATE TABLE table_17683 (
"Series Ep #" real,
"Season 3 Ep #" real,
"Title" text,
"Director" text,
"Writer(s)" text,
"Original Airdate" text,
"Production Code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title of season 3 ep#... | SELECT "Title" FROM table_17683 WHERE "Season 3 Ep #" = '12' | wikisql |
CREATE TABLE table_42202 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Country had a Score of 71-67=138?
| SELECT "Country" FROM table_42202 WHERE "Score" = '71-67=138' | wikisql |
CREATE TABLE table_name_45 (
surface VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which has a Score of 6 1, 3 0 ret.?
| SELECT surface FROM table_name_45 WHERE score = "6–1, 3–0 ret." | sql_create_context |
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
mean_dew_point_f INTEGER,
min_... | SELECT start_station_name, start_station_id FROM trip ORDER BY start_station_name | nvbench |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TAB... | SELECT COUNT(*) > 0 FROM course, program_course WHERE course.department = 'LHC' AND course.number = 750 AND program_course.category LIKE '%Core%' AND program_course.course_id = course.course_id | advising |
CREATE TABLE table_57613 (
"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 was the score of the home team when the opp... | SELECT "Home team score" FROM table_57613 WHERE "Away team score" = '9.11 (65)' | wikisql |
CREATE TABLE table_17879 (
"Week" real,
"Date" text,
"Kickoff ( ET )" text,
"TV" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the opponent of the veterans stadium... | SELECT "Opponent" FROM table_17879 WHERE "Game Site" = 'Veterans Stadium' | wikisql |
CREATE TABLE table_65026 (
"Rank" real,
"Athletes" text,
"Country" text,
"Time" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rank of Israel?
| SELECT MAX("Rank") FROM table_65026 WHERE "Country" = 'israel' | wikisql |
CREATE TABLE table_name_53 (
opponent VARCHAR,
location_attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent when they played at the Skydome?
| SELECT opponent FROM table_name_53 WHERE location_attendance = "skydome" | sql_create_context |
CREATE TABLE table_name_27 (
player VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- With a score of 70, this player's name is listed as what?
| SELECT player FROM table_name_27 WHERE score = 70 | sql_create_context |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id num... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'micu' AND DATETIME(transfers.intime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) | mimic_iii |
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.dob_year < "2156" AND procedures.short_title = "Endosc retro cholangiopa" | mimicsql_data |
CREATE TABLE table_67579 (
"Status" text,
"Name" text,
"First Performance" text,
"Last Performance" text,
"Style" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what last performance has past status, ballet as style and tommy batchelor?
| SELECT "Last Performance" FROM table_67579 WHERE "Status" = 'past' AND "Style" = 'ballet' AND "Name" = 'tommy batchelor' | wikisql |
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 vitalperiodi... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-9636' AND patient.hospit... | eicu |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Na... | SELECT Id, PostTypeId, Tags, ClosedDate, CreationDate FROM Posts WHERE CreationDate LIKE '%2018%' | sede |
CREATE TABLE table_58693 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the... | SELECT MIN("Lost") FROM table_58693 WHERE "Goals Against" = '111' | wikisql |
CREATE TABLE table_11545282_19 (
no INTEGER,
school_club_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of school/club teams held by BYU?
| SELECT MIN(no) FROM table_11545282_19 WHERE school_club_team = "BYU" | sql_create_context |
CREATE TABLE table_2468961_2 (
title VARCHAR,
written_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the episode written by Ross Brown?
| SELECT title FROM table_2468961_2 WHERE written_by = "Ross Brown" | sql_create_context |
CREATE TABLE table_name_25 (
label VARCHAR,
media VARCHAR,
release_date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the label for a CD released in 2004?
| SELECT label FROM table_name_25 WHERE media = "cd" AND release_date = 2004 | sql_create_context |
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
dire... | 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRA... | atis |
CREATE TABLE table_53254 (
"Player" text,
"Nationality" text,
"Position" text,
"Years for Jazz" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What school does John Crotty play for?
| SELECT "School/Club Team" FROM table_53254 WHERE "Player" = 'john crotty' | wikisql |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate ti... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31854 AND admissions.dischtime IS NULL) AND transfers.careunit = 'ccu' ORDER BY transfers.intime DESC LIMIT 1 | mimic_iii |
CREATE TABLE table_204_867 (
id number,
"number" number,
"date" text,
"name" text,
"age\n(at execution)" number,
"age\n(at offense)" number,
"race" text,
"state" text,
"method" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who was t... | SELECT "name" FROM table_204_867 WHERE "number" = (SELECT "number" FROM table_204_867 WHERE "name" = 'lynda lyon block') + 1 | squall |
CREATE TABLE table_10968 (
"Race" text,
"Circuit" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Constructor" text,
"Tyre" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me th... | SELECT "Fastest lap" FROM table_10968 WHERE "Winning driver" = 'jim clark' AND "Circuit" = 'prince george' | wikisql |
CREATE TABLE table_7114 (
"Year" real,
"Conventional plans" text,
"HMOs" text,
"PPOs" text,
"POS plans" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which HMO has a conventional plan of 3% in 2005?
| SELECT "HMOs" FROM table_7114 WHERE "Conventional plans" = '3%' AND "Year" = '2005' | wikisql |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospit... | SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-26884')) AND medication.drugname = 'insulin aspart 100 unit/ml sc soln' AN... | eicu |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JO... | SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE DESC | nvbench |
CREATE TABLE protein (
common_name text,
protein_name text,
divergence_from_human_lineage real,
accession_number text,
sequence_length real,
sequence_identity_to_human_protein text,
Institution_id text
)
CREATE TABLE building (
building_id text,
Name text,
Street_address text,
... | SELECT Type, SUM(Enrollment) FROM Institution GROUP BY Type ORDER BY SUM(Enrollment) | nvbench |
CREATE TABLE table_name_22 (
attendance INTEGER,
date VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- before week 12 what was the attendance on 1983-11-21?
| SELECT SUM(attendance) FROM table_name_22 WHERE date = "1983-11-21" AND week < 12 | sql_create_context |
CREATE TABLE table_10062 (
"Railway" text,
"Builder" text,
"Built" text,
"Wheels" text,
"Location" text,
"ObjectNumber" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which railway was built in 1920?
| SELECT "Railway" FROM table_10062 WHERE "Built" = '1920' | wikisql |
CREATE TABLE table_name_42 (
level INTEGER,
example_name VARCHAR,
number_of_hus__approximate_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the mean level number when the example name is lower snake and the approximate number is hus is less than... | SELECT AVG(level) FROM table_name_42 WHERE example_name = "lower snake" AND number_of_hus__approximate_ < 370 | sql_create_context |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined b... | SELECT DISTINCT p.Id AS "post_link", p.OwnerUserId AS "user_link", p.LastActivityDate, p.CreationDate, url = 'site://posts/' + CAST(p.Id AS TEXT) + '/revisions' FROM Posts AS p JOIN PostHistory AS ph ON (ph.PostId = p.Id) WHERE (ph.Text LIKE '%##word?Chebychev##%') AND NOT (p.Body LIKE '%##word##%') ORDER BY p.LastActi... | sede |
CREATE TABLE table_73154 (
"#" real,
"Episode" text,
"UK air date" text,
"Timeslot" text,
"Viewers (millions)" text,
"Audience share in timeslot" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- name the total number of timeslot for number 1
| SELECT COUNT("Timeslot") FROM table_73154 WHERE "#" = '1' | wikisql |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT admissions.marital_status FROM admissions WHERE admissions.subject_id = 40967 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1 | mimic_iii |
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... | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'oxygen therapy (> 60%) - face mask' AND ... | eicu |
CREATE TABLE table_12338595_1 (
swimsuit VARCHAR,
state VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What swimsuit score did the state of Virginia contestant achieve?
| SELECT COUNT(swimsuit) FROM table_12338595_1 WHERE state = "Virginia" | sql_create_context |
CREATE TABLE table_23802 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number for dl
| SELECT "Pick #" FROM table_23802 WHERE "Position" = 'DL' | wikisql |
CREATE TABLE table_17086 (
"Player" text,
"Position" text,
"School" text,
"Hometown" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position is Charone Peake?
| SELECT "Position" FROM table_17086 WHERE "Player" = 'Charone Peake' | wikisql |
CREATE TABLE table_10190 (
"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.
-- If the away teams score was 15.6 (96), what venu... | SELECT "Venue" FROM table_10190 WHERE "Away team score" = '15.6 (96)' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
i... | SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-50368') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-... | eicu |
CREATE TABLE table_44049 (
"Class" text,
"Wheel arrangement" text,
"Manufacturer" text,
"Year made" text,
"Quantity made" text,
"Quantity preserved" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Wheel Arrangement, when Manufacturer is '... | SELECT "Wheel arrangement" FROM table_44049 WHERE "Manufacturer" = 'baldwin' AND "Quantity made" = '12' | wikisql |
CREATE TABLE table_name_5 (
meet VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Meet has a Time of 1:04.84?
| SELECT meet FROM table_name_5 WHERE time = "1:04.84" | sql_create_context |
CREATE TABLE table_71674 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Team 1 Al-Hilal's Agg.?
| SELECT "Agg." FROM table_71674 WHERE "Team 1" = 'al-hilal' | wikisql |
CREATE TABLE table_21321804_1 (
pick__number INTEGER,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the pick # for player wes lysack?
| SELECT MAX(pick__number) FROM table_21321804_1 WHERE player = "Wes Lysack" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.