instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_13766 (
"Round" real,
"Pick" real,
"Player" text,
"Nationality" text,
"College/junior/club team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which College/junior/club team has a Round of 4?
| SELECT "College/junior/club team" FROM table_13766 WHERE "Round" = '4' | wikisql |
CREATE TABLE table_name_52 (
opponent VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell mem the opponent for result of w 31-21
| SELECT opponent FROM table_name_52 WHERE result = "w 31-21" | sql_create_context |
CREATE TABLE table_24859 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided ab... | SELECT "U.S. viewers (million)" FROM table_24859 WHERE "Production code" = '6ACX16' | wikisql |
CREATE TABLE bdmzjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH number,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZD... | SELECT jybgb.BBCJBW FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '83925055' AND jybgb.BGRQ BETWEEN '2007-12-02' AND '2008-06-25' UNI... | css |
CREATE TABLE table_name_67 (
pick VARCHAR,
round VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the pick number for the tight end who was picked after round 6?
| SELECT COUNT(pick) FROM table_name_67 WHERE round > 6 AND position = "tight end" | sql_create_context |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE patient (
uniquep... | SELECT 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 = '035-6788')) ORDER BY lab.labresulttime DESC LIMIT 1 | eicu |
CREATE TABLE table_30166 (
"Series episode" real,
"Season episode" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (in million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the e... | SELECT "Season episode" FROM table_30166 WHERE "U.S. viewers (in million)" = '5.68' | 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 patient (
... | SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-80884')) AND STRFTIME('%y', diagnosis.diagnosistime) >= '2105... | eicu |
CREATE TABLE table_3283 (
"Player" text,
"Position" text,
"Starter" text,
"Touchdowns" real,
"Extra points" real,
"Field goals" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest number of extra points?
| SELECT MIN("Extra points") FROM table_3283 | wikisql |
CREATE TABLE table_name_68 (
winner VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had the women's win when Norway was the winner overall in season 2001/02?
| SELECT winner AS Women FROM table_name_68 WHERE winner = "norway" AND season = "2001/02" | sql_create_context |
CREATE TABLE driverstandings (
driverstandingsid number,
raceid number,
driverid number,
points number,
position number,
positiontext text,
wins number
)
CREATE TABLE qualifying (
qualifyid number,
raceid number,
driverid number,
constructorid number,
number number,
... | SELECT name FROM races WHERE year = 2017 | spider |
CREATE TABLE table_name_44 (
males VARCHAR,
percentage___percentage_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which language do 87.5% of males speak?
| SELECT males FROM table_name_44 WHERE percentage___percentage_ = "87.5" | sql_create_context |
CREATE TABLE table_77980 (
"Player" text,
"Height" text,
"School" text,
"Hometown" text,
"College" text,
"NBA Draft" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which height is associated with Franklin High School?
| SELECT "Height" FROM table_77980 WHERE "School" = 'franklin high school' | wikisql |
CREATE TABLE table_3260 (
"Date" text,
"Time (ET)" text,
"Event #" real,
"Event" text,
"Winner" text,
"Prize" text,
"Entries" text,
"Prize Pool" text,
"Elapsed Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the prize pool ... | SELECT "Prize Pool" FROM table_3260 WHERE "Entries" = '706 (481 R, 346 A)' | wikisql |
CREATE TABLE table_1969634_1 (
enrollment VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total enrollment for the school in garden city, new york?
| SELECT enrollment FROM table_1969634_1 WHERE location = "Garden City, New York" | sql_create_context |
CREATE TABLE table_20494 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Bills points" real,
"Opponents" real,
"Bills first downs" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points did the bills s... | SELECT "Bills points" FROM table_20494 WHERE "Opponents" = '14' | wikisql |
CREATE TABLE table_26758262_1 (
judges_residence VARCHAR,
municipalities_served VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where does the judge who serves Beacon Falls , Naugatuck , Middlebury , Prospect reside?
| SELECT judges_residence FROM table_26758262_1 WHERE municipalities_served = "Beacon Falls , Naugatuck , Middlebury , Prospect" | sql_create_context |
CREATE TABLE table_14606 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who did the Blue Jays lose to on July 16?
| SELECT "Loss" FROM table_14606 WHERE "Date" = 'july 16' | wikisql |
CREATE TABLE Behavior_Incident (
incident_id INTEGER,
incident_type_code VARCHAR(10),
student_id INTEGER,
date_incident_start DATETIME,
date_incident_end DATETIME,
incident_summary VARCHAR(255),
recommendations VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Ref_Address_Types (
... | SELECT date_address_from, SUM(monthly_rental) FROM Student_Addresses ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE table_79810 (
"Club" text,
"Manager" text,
"Captain" text,
"Manufacturer" text,
"Sponsor" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the captain of Middlesbrough?
| SELECT "Captain" FROM table_79810 WHERE "Club" = 'middlesbrough' | wikisql |
CREATE TABLE zzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT zzmzjzjlb.JZJSSJ FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '34024998197' UNION SELECT fzzmzjzjlb.JZJSSJ FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZLSH = '34024998197' | css |
CREATE TABLE table_75857 (
"Date" text,
"Time" text,
"Home" text,
"Away" text,
"Score" text,
"Ground" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date with a Home that is hamilton wildcats?
| SELECT "Date" FROM table_75857 WHERE "Home" = 'hamilton wildcats' | wikisql |
CREATE TABLE table_name_46 (
venue VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What venue is the home field of Richmond?
| SELECT venue FROM table_name_46 WHERE home_team = "richmond" | sql_create_context |
CREATE TABLE table_57423 (
"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 Venue has an Away Team Score of 9.12 (66)?
| SELECT "Venue" FROM table_57423 WHERE "Away team score" = '9.12 (66)' | wikisql |
CREATE TABLE table_9969 (
"Game" real,
"March" real,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of March, when Score is '2 - 2', and when Game is greater than 67?
| SELECT SUM("March") FROM table_9969 WHERE "Score" = '2 - 2' AND "Game" > '67' | wikisql |
CREATE TABLE table_79861 (
"Game" real,
"Date" text,
"Location" text,
"Time" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- yankee stadium (i), and a Time of 3:00 has what attendance for this location?
| SELECT "Attendance" FROM table_79861 WHERE "Location" = 'yankee stadium (i)' AND "Time" = '3:00' | wikisql |
CREATE TABLE table_67021 (
"Year" real,
"Chassis" text,
"Engine" text,
"Start" text,
"Finish" text,
"Entrant" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Engine had a Finish of 27?
| SELECT "Engine" FROM table_67021 WHERE "Finish" = '27' | wikisql |
CREATE TABLE table_70364 (
"Rank" real,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the average total for gold less than 1 and rank less than 5
| SELECT AVG("Total") FROM table_70364 WHERE "Gold" < '1' AND "Rank" < '5' | 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 DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'lab' AND cost.eventid IN (SELECT lab.labid FROM lab WHERE lab.labname = 'vancomycin - trough') | eicu |
CREATE TABLE table_30049462_4 (
location_attendance VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the location and it's corresponding attendance during the game against Los Angeles?
| SELECT location_attendance FROM table_30049462_4 WHERE team = "Los Angeles" | sql_create_context |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
... | SELECT DisplayName, ProfileImageUrl FROM Users WHERE DisplayName LIKE '%M%' AND ProfileImageUrl != '' | sede |
CREATE TABLE table_204_318 (
id number,
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" number,
"scorers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many people attended the game in november against sunderland... | SELECT "attendance" FROM table_204_318 WHERE "date" = 11 AND "opponent" = 'sunderland' | squall |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Code DESC | nvbench |
CREATE TABLE table_61671 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Player has a To par of 2?
| SELECT "Player" FROM table_61671 WHERE "To par" = '–2' | wikisql |
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 semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE... | SELECT DISTINCT program_course.category FROM course, program_course WHERE course.department = 'POLISH' AND course.number = 432 AND program_course.course_id = course.course_id | advising |
CREATE TABLE table_16966 (
"Date" text,
"Tournament" text,
"Location" text,
"Purse( $ )" real,
"Winner" text,
"Score" text,
"1st Prize( $ )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which located featured the first prize of 33500?
| SELECT "Location" FROM table_16966 WHERE "1st Prize( $ )" = '33500' | 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 hz_info (
KH text,
KLX number... | 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 = 'P55.131' AND jyjgzbb.JCZBDM = '143654' | css |
CREATE TABLE table_16449 (
"1973 Democratic initial primary" text,
"Manhattan" text,
"The Bronx" text,
"Brooklyn" text,
"Queens" text,
"Richmond [Staten Is.]" text,
"Total" real,
"%" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is... | SELECT "Queens" FROM table_16449 WHERE "Richmond [Staten Is.]" = '42%' | wikisql |
CREATE TABLE table_63326 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the tie number of Chelsea when they were home?
| SELECT "Tie no" FROM table_63326 WHERE "Home team" = 'chelsea' | wikisql |
CREATE TABLE table_50038 (
"Year" real,
"Round" text,
"Player" text,
"Nationality" text,
"Position" text,
"College/High School/Club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the round of the pf position player from 1996 and the col... | SELECT "Round" FROM table_50038 WHERE "Position" = 'pf' AND "Year" = '1996' AND "College/High School/Club" = 'mississippi state' | wikisql |
CREATE TABLE table_29285 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many date of appointment entries ar... | SELECT COUNT("Date of appointment") FROM table_29285 WHERE "Team" = 'Khazar Lankaran' | wikisql |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATIO... | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(EMPLOYEE_ID) | nvbench |
CREATE TABLE table_80078 (
"Name" text,
"Years" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is the school with state authority that has a roll of more than 15... | SELECT "Area" FROM table_80078 WHERE "Authority" = 'state' AND "Roll" > '157' | wikisql |
CREATE TABLE table_name_44 (
opponents_in_the_final VARCHAR,
partnering VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who are the finals opponents for the match with partner Ricardo Hocevar?
| SELECT opponents_in_the_final FROM table_name_44 WHERE partnering = "ricardo hocevar" | sql_create_context |
CREATE TABLE table_204_775 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the only nation to receive three gold medals ?
| SELECT "nation" FROM table_204_775 WHERE "gold" = 3 | squall |
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 demographic.diagnosis, diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Betty Campbell" | mimicsql_data |
CREATE TABLE table_name_27 (
republican_ticket VARCHAR,
prohibition_ticket VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What kind of Republican ticket has a Prohibition ticket of stephen mead wing?
| SELECT republican_ticket FROM table_name_27 WHERE prohibition_ticket = "stephen mead wing" | sql_create_context |
CREATE TABLE table_16429 (
"Rnd" real,
"Race Name" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Winning team" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who drove the fastest lap at the Tenneco A... | SELECT "Fastest lap" FROM table_16429 WHERE "Race Name" = 'Tenneco Automotive Grand Prix of Detroit' | 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 PostTypes (
Id number,
Name text
)
C... | SELECT c.TagName, c.CountPosts AS "Number of Posts", e.Body AS "Excerpt", w.Body AS "Wiki" FROM (SELECT t.TagName, t.ExcerptPostId, t.WikiPostId, COUNT(*) AS CountPosts FROM Tags AS t LEFT OUTER JOIN TagSynonyms AS s ON (t.TagName = s.SourceTagName) INNER JOIN PostTags AS p ON (p.TagId = t.Id) WHERE s.ApprovalDate IS N... | sede |
CREATE TABLE table_name_82 (
visitor VARCHAR,
leading_scorer VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team was the visitor when Milt Palacio (15) was the leading scorer?
| SELECT visitor FROM table_name_82 WHERE leading_scorer = "milt palacio (15)" | sql_create_context |
CREATE TABLE table_226619_12 (
points VARCHAR,
respect_toward_opponents VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the points for 212 respect toward opponents
| SELECT points FROM table_226619_12 WHERE respect_toward_opponents = 212 | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Mv collision NOS-driver" AND prescriptions.route = "ID" | mimicsql_data |
CREATE TABLE table_76307 (
"Season" text,
"Series" text,
"Team Name" text,
"Races" real,
"Wins" real,
"Poles" real,
"F.L." real,
"Podiums" real,
"Points" text,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the... | SELECT "Races" FROM table_76307 WHERE "Position" = '8th' | wikisql |
CREATE TABLE table_43314 (
"Pick #" real,
"NFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the pick number for the wide receiver drafted from Michigan State?
| SELECT "Pick #" FROM table_43314 WHERE "Position" = 'wide receiver' AND "College" = 'michigan state' | wikisql |
CREATE TABLE table_1140117_5 (
report VARCHAR,
race_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the report for the race name, XIII Grand Prix de l'Albigeois?
| SELECT report FROM table_1140117_5 WHERE race_name = "XIII Grand Prix de l'Albigeois" | sql_create_context |
CREATE TABLE table_46750 (
"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 is Rocco Mediate from?
| SELECT "Country" FROM table_46750 WHERE "Player" = 'rocco mediate' | wikisql |
CREATE TABLE table_28116528_1 (
original_air_date VARCHAR,
production_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date did the episode with a production code of 3x6316 originally air?
| SELECT original_air_date FROM table_28116528_1 WHERE production_code = "3X6316" | sql_create_context |
CREATE TABLE table_name_68 (
attendance INTEGER,
home VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the lowest attendance at a game when Pittsburgh was the home team?
| SELECT MIN(attendance) FROM table_name_68 WHERE home = "pittsburgh" | sql_create_context |
CREATE TABLE table_31528 (
"Episode no." real,
"US Airdate" text,
"US Total viewers" text,
"UK Airdate" text,
"UK Total viewers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many viewers in the UK did episode 50 have?
| SELECT "UK Total viewers" FROM table_31528 WHERE "Episode no." = '50' | wikisql |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId numb... | SELECT HasLocation, COUNT(*) FROM (SELECT Id AS "user_link", CASE WHEN Location IS NULL THEN 'No' ELSE 'Yes' END AS HasLocation FROM Users) AS t GROUP BY HasLocation | sede |
CREATE TABLE table_1165 (
"Team" text,
"Copa Libertadores 1992" text,
"Supercopa Sudamericana 1992" text,
"Copa CONMEBOL 1992" text,
"Recopa Sudamericana 1992" text,
"Intercontinental Cup 1992" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name... | SELECT "Recopa Sudamericana 1992" FROM table_1165 WHERE "Copa Libertadores 1992" = 'Did not qualify' AND "Copa CONMEBOL 1992" = 'Round of 16' AND "Team" = 'Bragantino' | wikisql |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
Deletio... | SELECT Posts.Id AS "post_link", Posts.FavoriteCount, Posts.Score, Posts.CreationDate, Votes.UserId AS "user_link" FROM Votes JOIN Posts ON (Posts.Id = Votes.PostId) WHERE Posts.FavoriteCount = 1 AND Posts.Score < 0 AND VoteTypeId = 5 AND Posts.PostTypeId = 1 AND Posts.OwnerUserId = Votes.UserId ORDER BY Posts.CreationD... | sede |
CREATE TABLE table_name_37 (
opponent VARCHAR,
home_away VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the opponent when the result is w 16-15 and has home/away of home
| SELECT opponent FROM table_name_37 WHERE home_away = "home" AND result = "w 16-15" | sql_create_context |
CREATE TABLE table_name_79 (
notes VARCHAR,
title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the notes for Happy Camp?
| SELECT notes FROM table_name_79 WHERE title = "happy camp" | sql_create_context |
CREATE TABLE table_36968 (
"Frequency (kHz)" real,
"Call letters" text,
"Licensed location" text,
"Type" text,
"Format" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest frequency (kHz) that is in the location of Longview?
| SELECT MIN("Frequency (kHz)") FROM table_36968 WHERE "Licensed location" = 'longview' | wikisql |
CREATE TABLE table_8818 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was Raymond Floyd's score?
| SELECT "Score" FROM table_8818 WHERE "Player" = 'raymond floyd' | wikisql |
CREATE TABLE table_name_18 (
score VARCHAR,
record VARCHAR,
game VARCHAR,
decision VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the score for a game over 56 with a record of 29-24-7 with a lundqvist decision?
| SELECT score FROM table_name_18 WHERE game > 56 AND decision = "lundqvist" AND record = "29-24-7" | sql_create_context |
CREATE TABLE WINE (
Name VARCHAR,
price VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the names of all distinct wines ordered by price.
| SELECT DISTINCT Name FROM WINE ORDER BY price | sql_create_context |
CREATE TABLE table_name_95 (
tournament VARCHAR,
opponents_in_the_final VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What tournament had an opponent of Els Callens Nancy Feber?
| SELECT tournament FROM table_name_95 WHERE opponents_in_the_final = "els callens nancy feber" | sql_create_context |
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,
... | SELECT jybgb.SQKS, jybgb.SQKSMC FROM jybgb WHERE jybgb.BGDH = '70072856056' | css |
CREATE TABLE table_10015132_9 (
school_club_team VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What school/club team is Trey Johnson on?
| SELECT school_club_team FROM table_10015132_9 WHERE player = "Trey Johnson" | sql_create_context |
CREATE TABLE table_19130829_4 (
team__number2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the 2nd leg result in the round where Panionios is team #2?
| SELECT 2 AS nd_leg FROM table_19130829_4 WHERE team__number2 = "Panionios" | sql_create_context |
CREATE TABLE table_name_61 (
total_seats INTEGER,
share_of_votes VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the share of votes equals 21.8%, what's the sum of the total amount of seats?
| SELECT SUM(total_seats) FROM table_name_61 WHERE share_of_votes = "21.8%" | sql_create_context |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "17" AND diagnoses.icd9_code = "V1006" | mimicsql_data |
CREATE TABLE table_204_938 (
id number,
"year" number,
"edmonton\nhundred" number,
"elthorne\nhundred" number,
"gore\nhundred" number,
"isleworth\nhundred" number,
"ossulstone\nhundred\nholborn\ndivision" number,
"ossulstone\nhundred\nfinsbury\ndivision" number,
"ossulstone\nhundred\... | SELECT "total" FROM table_204_938 WHERE "year" = 1801 | squall |
CREATE TABLE table_name_28 (
number_ VARCHAR,
_name VARCHAR,
date INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the number & name for the date after 1954?
| SELECT number_ & _name FROM table_name_28 WHERE date > 1954 | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time... | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-10007')) AND medication.drugname = 'pantoprazole sodium 40 mg po tbec'... | eicu |
CREATE TABLE table_33181 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance in week 6?
| SELECT "Attendance" FROM table_33181 WHERE "Week" = '6' | 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 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.insurance = "Private" AND lab.label = "Bilirubin, Indirect" | mimicsql_data |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, COUNT(treatment.treatmenttime) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... | eicu |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT COUNT(t_kc21.IN_DIAG_DIS_CD) FROM t_kc21 WHERE t_kc21.PERSON_ID = '66010048' AND t_kc21.IN_HOSP_DATE BETWEEN '2010-10-13' AND '2013-03-16' | css |
CREATE TABLE table_67030 (
"Number" text,
"Player" text,
"Position" text,
"Height" text,
"Weight" text,
"Home Town" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player's home town is Swift Current, AB?
| SELECT "Player" FROM table_67030 WHERE "Home Town" = 'swift current, ab' | wikisql |
CREATE TABLE gyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT COUNT(qtb.MED_SER_ORG_NO) FROM qtb WHERE qtb.PERSON_NM = '苏家欣' AND qtb.IN_HOSP_DATE BETWEEN '2000-02-24' AND '2009-04-29' UNION SELECT COUNT(gyb.MED_SER_ORG_NO) FROM gyb WHERE gyb.PERSON_NM = '苏家欣' AND gyb.IN_HOSP_DATE BETWEEN '2000-02-24' AND '2009-04-29' UNION SELECT COUNT(zyb.MED_SER_ORG_NO) FROM zyb WHERE zy... | css |
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 COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '88686860' AND t_kc22.STA_DATE BETWEEN '2015-07-07' AND '2018-02-18' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_... | css |
CREATE TABLE table_train_83 (
"id" int,
"systolic_blood_pressure_sbp" int,
"renal_disease" bool,
"diabetic" string,
"estimated_glomerular_filtration_rate_egfr" int,
"iq" int,
"geriatric_depression_scale_gds" int,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for... | SELECT * FROM table_train_83 WHERE systolic_blood_pressure_sbp >= 100 | criteria2sql |
CREATE TABLE city (
Status VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Please show the different statuses, ordered by the number of cities that have each.
| SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) | sql_create_context |
CREATE TABLE table_name_58 (
long INTEGER,
avg_g VARCHAR,
loss VARCHAR,
gain VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much Long has a Loss larger than 2, and a Gain of 157, and an Avg/G smaller than 129?
| SELECT SUM(long) FROM table_name_58 WHERE loss > 2 AND gain = 157 AND avg_g < 129 | sql_create_context |
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT Flag, COUNT(*) FROM Ship GROUP BY Flag | nvbench |
CREATE TABLE table_name_79 (
perfect_stem VARCHAR,
future_stem VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the perfect stem for the word that has a future stem of emango?
| SELECT perfect_stem FROM table_name_79 WHERE future_stem = "emango" | sql_create_context |
CREATE TABLE competition_result (
Competition_ID int,
Club_ID_1 int,
Club_ID_2 int,
Score text
)
CREATE TABLE club (
Club_ID int,
name text,
Region text,
Start_year text
)
CREATE TABLE competition (
Competition_ID int,
Year real,
Competition_type text,
Country text
)
C... | SELECT Position, AVG(Points) FROM player GROUP BY Position ORDER BY AVG(Points) | nvbench |
CREATE TABLE table_75591 (
"Tournament" text,
"Wins" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is his low win total when he has over 3 top 25s and under 9 cuts made?
| SELECT MIN("Wins") FROM table_75591 WHERE "Top-25" = '3' AND "Cuts made" < '9' | 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_... | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND... | atis |
CREATE TABLE Addresses (
address_id INTEGER,
address_details VARCHAR(255)
)
CREATE TABLE Customer_Orders (
order_id INTEGER,
customer_id INTEGER,
order_status_code VARCHAR(10),
order_date DATETIME
)
CREATE TABLE Department_Store_Chain (
dept_store_chain_id INTEGER,
dept_store_chain_nam... | SELECT product_type_code, MIN(product_price) FROM Products GROUP BY product_type_code ORDER BY product_type_code | nvbench |
CREATE TABLE table_75388 (
"Game" real,
"December" real,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Game smaller than 34, and a December smaller than 14, and a Score of 10 - 6 has what opponent?
| SELECT "Opponent" FROM table_75388 WHERE "Game" < '34' AND "December" < '14' AND "Score" = '10 - 6' | wikisql |
CREATE TABLE table_31649 (
"Year" real,
"Championship" text,
"Winning score" text,
"Margin" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the margin at the Nabisco Championship?
| SELECT "Margin" FROM table_31649 WHERE "Championship" = 'nabisco championship' | wikisql |
CREATE TABLE table_name_27 (
bronze INTEGER,
gold VARCHAR,
silver VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the average bronze with silver more than 0, total of 6 and gold more than 0
| SELECT AVG(bronze) FROM table_name_27 WHERE silver > 0 AND total = 6 AND gold > 0 | sql_create_context |
CREATE TABLE table_57476 (
"Name" text,
"Block" text,
"Launch date/time (UTC)" text,
"COSPAR ID" text,
"Rocket" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What block has a COSPAR ID of 1995-060a?
| SELECT "Block" FROM table_57476 WHERE "COSPAR ID" = '1995-060a' | wikisql |
CREATE TABLE table_45790 (
"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.
-- On what date is Jerilyn Britz the runner-up?
| SELECT "Date" FROM table_45790 WHERE "Runner(s)-up" = 'jerilyn britz' | wikisql |
CREATE TABLE table_2718 (
"Conference" text,
"Regular Season Winner" text,
"Conference Player of the Year" text,
"Conference Tournament" text,
"Tournament Venue (City)" text,
"Tournament Winner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Nam... | SELECT COUNT("Conference Tournament") FROM table_2718 WHERE "Tournament Winner" = 'James Madison' | wikisql |
CREATE TABLE qtb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT qtb.MED_SER_ORG_NO FROM qtb WHERE qtb.PERSON_ID = '04369427' AND qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '拉莫三嗪片') UNION SELECT gyb.MED_SER_ORG_NO FROM gyb WHERE gyb.PERSON_ID = '04369427' AND gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE ... | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.