instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE txmzjzjlb (
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 jyjgzbb.YQBH, jyjgzbb.YQMC FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH ... | css |
CREATE TABLE table_44370 (
"Class" text,
"Part 1" text,
"Part 2" text,
"Part 3" text,
"Part 4" text,
"Verb meaning" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is part 4 when the class is 5?
| SELECT "Part 4" FROM table_44370 WHERE "Class" = '5' | wikisql |
CREATE TABLE table_73922 (
"Episode" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Order #" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The original artist Joan Osborne has what result?
| SELECT "Result" FROM table_73922 WHERE "Original artist" = 'Joan Osborne' | wikisql |
CREATE TABLE table_74390 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who were the writers of th... | SELECT "Written by" FROM table_74390 WHERE "Title" = 'Tricky Dick' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.long_title = "Combined right and left heart angiocardiography" | mimicsql_data |
CREATE TABLE table_name_46 (
tied VARCHAR,
drawn VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want to know the tie for drawn of 47
| SELECT tied FROM table_name_46 WHERE drawn = "47" | sql_create_context |
CREATE TABLE table_name_5 (
republican_ticket VARCHAR,
american_labor_ticket VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Republican ran against the American Labor candidate Matthew J. Merritt?
| SELECT republican_ticket FROM table_name_5 WHERE american_labor_ticket = "matthew j. merritt" | sql_create_context |
CREATE TABLE table_23379776_5 (
co_artists VARCHAR,
name_of_role VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is every co-artist with name of role as Ah-Zhong ?
| SELECT co_artists FROM table_23379776_5 WHERE name_of_role = "Ah-Zhong 阿忠" | sql_create_context |
CREATE TABLE table_1941 (
"Property" text,
"K-band" text,
"Ka-band" text,
"Q-band" text,
"V-band" text,
"W-band" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 4 is the v-band what is the overall amount of ka-bands?
| SELECT COUNT("Ka-band") FROM table_1941 WHERE "V-band" = '4' | wikisql |
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varch... | SELECT PROF_OFFICE, COUNT(PROF_OFFICE) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE JOIN PROFESSOR AS T4 ON T2.EMP_NUM = T4.EMP_NUM GROUP BY PROF_OFFICE ORDER BY PROF_OFFICE | nvbench |
CREATE TABLE table_name_32 (
round INTEGER,
overall INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the highest round when the overall is less than 17?
| SELECT MAX(round) FROM table_name_32 WHERE overall < 17 | sql_create_context |
CREATE TABLE table_name_20 (
result VARCHAR,
group VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result of the race that had a group of G1 at Moonee Valley?
| SELECT result FROM table_name_20 WHERE group = "g1" AND venue = "moonee valley" | sql_create_context |
CREATE TABLE table_5150 (
"Game" real,
"December" real,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Opponent has a Game of 33?
| SELECT "Opponent" FROM table_5150 WHERE "Game" = '33' | wikisql |
CREATE TABLE table_184803_4 (
commentator VARCHAR,
spokespersons VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who was the commentator when spokesperson was claude darget
| SELECT commentator FROM table_184803_4 WHERE spokespersons = "Claude Darget" | sql_create_context |
CREATE TABLE table_58052 (
"Round" real,
"Circuit" text,
"State" text,
"Date" text,
"Winning driver" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many rounds were run at Calder Park?
| SELECT COUNT("Round") FROM table_58052 WHERE "Circuit" = 'calder park' | wikisql |
CREATE TABLE table_name_4 (
result VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result of the game on week 1?
| SELECT result FROM table_name_4 WHERE week = 1 | sql_create_context |
CREATE TABLE Research_Outcomes (
outcome_code VARCHAR(10),
outcome_description VARCHAR(255)
)
CREATE TABLE Project_Outcomes (
project_id INTEGER,
outcome_code VARCHAR(10),
outcome_details VARCHAR(255)
)
CREATE TABLE Projects (
project_id INTEGER,
organisation_id INTEGER,
project_detail... | SELECT outcome_description, COUNT(outcome_description) FROM Research_Outcomes AS T1 JOIN Project_Outcomes AS T2 ON T1.outcome_code = T2.outcome_code GROUP BY outcome_description | nvbench |
CREATE TABLE table_42635 (
"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.
-- What tournament had a runner(s)-up of Scott Hoch & Kenny Perry?
| SELECT "Tournament" FROM table_42635 WHERE "Runner(s)-up" = 'scott hoch & kenny perry' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.flag = "delta" AND lab.label = "Parathyroid Hormone" | mimicsql_data |
CREATE TABLE table_65834 (
"Country" text,
"TV Network(s)" text,
"Series Premiere" text,
"Weekly Schedule" text,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the weekly schedule for the network sky italia?
| SELECT "Weekly Schedule" FROM table_65834 WHERE "TV Network(s)" = 'sky italia' | wikisql |
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE video_games (
gameid number,
gname text,
gtype text
)
CREATE TABLE sportsinfo (
stuid number,
sportname text,
hoursperw... | SELECT gtype FROM video_games WHERE gname = "Call of Destiny" | spider |
CREATE TABLE table_41627 (
"Name" text,
"Career" text,
"Goals" real,
"Appearances" real,
"Goals/Game Ratio" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was Lee Smith's highest number of goals when he made fewer than 364 appearances?
| SELECT MAX("Goals") FROM table_41627 WHERE "Name" = 'lee smith' AND "Appearances" < '364' | 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 zyjzjlb.KH, zyjzjlb.KLX FROM zyjzjlb WHERE zyjzjlb.JZLSH = '39253929827' | css |
CREATE TABLE bdmzjzjlb (
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 jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE table_204_675 (
id number,
"year" number,
"game of the year" text,
"abstract strategy" text,
"advanced strategy" text,
"family" text,
"family card" text,
"family strategy" text,
"party" text,
"puzzle" text,
"word" text,
"historical simulation" text,
"othe... | SELECT "game of the year" FROM table_204_675 WHERE "year" = 2014 | squall |
CREATE TABLE table_10329 (
"Club" text,
"Champions" real,
"Final" real,
"Semis" real,
"Quarters" real,
"Round of 16" real,
"Series Played" real,
"Series Won" real,
"Series Lost" real,
"Series Won %" text
)
-- Using valid SQLite, answer the following questions for the tables pro... | SELECT MAX("Champions") FROM table_10329 WHERE "Series Won %" = '53.85%' AND "Final" > '0' | wikisql |
CREATE TABLE table_29410 (
"Athlete" text,
"Event" text,
"Round of 32" text,
"Round of 16" text,
"Quarterfinals" text,
"Semifinals" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the semifinals for the light flyweight event?
| SELECT "Semifinals" FROM table_29410 WHERE "Event" = 'Light flyweight' | wikisql |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
... | SELECT * FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb... | css |
CREATE TABLE table_40382 (
"Index" text,
"Name" text,
"Song" text,
"Group Song" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Group Song, when Name is Alice ?
| SELECT "Group Song" FROM table_40382 WHERE "Name" = 'alice 林芯糸' | wikisql |
CREATE TABLE table_24852622_1 (
class_c_winner VARCHAR,
round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the Class C winner in round 8?
| SELECT class_c_winner FROM table_24852622_1 WHERE round = "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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2148" AND lab."CATEGORY" = "Hematology" | mimicsql_data |
CREATE TABLE Participants (
Participant_ID INTEGER,
Participant_Type_Code CHAR(15),
Participant_Details VARCHAR(255)
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15)
)
CREATE TABLE Events (
Event_ID INTEGER,
Service_ID INTEGER,
Event_Details VARCHAR(255)
)
CREA... | SELECT Event_Details, COUNT(Event_Details) FROM Events AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage' GROUP BY Event_Details ORDER BY COUNT(Event_Details) | nvbench |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT * FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i... | css |
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.BGDH 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 = '60676464' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM jyjgzbb WH... | css |
CREATE TABLE table_36461 (
"Name" text,
"GP-GS" real,
"Gain" real,
"Loss" real,
"Long" real,
"Avg/G" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Long with a Av/g of 124.9 but Loss greater than 0?
| SELECT COUNT("Long") FROM table_36461 WHERE "Loss" > '0' AND "Avg/G" = '124.9' | wikisql |
CREATE TABLE club (
clubid number,
clubname text,
clubdesc text,
clublocation text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE member_of_club (
stuid number,
clu... | SELECT COUNT(*) FROM club WHERE clublocation = "HHH" | spider |
CREATE TABLE table_79387 (
"Actor" text,
"Character" text,
"Soap Opera" text,
"Years" text,
"Duration" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What actor plays Marie-Rose De Putter?
| SELECT "Actor" FROM table_79387 WHERE "Character" = 'marie-rose de putter' | wikisql |
CREATE TABLE table_24257833_4 (
major_version VARCHAR,
webkit_version VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the major version when the webkit version was 528.17?
| SELECT major_version FROM table_24257833_4 WHERE webkit_version = "528.17" | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartr... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-3 year') GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 3 | eicu |
CREATE TABLE table_48619 (
"Date" text,
"Pos." text,
"Player" text,
"From club" text,
"Transfer fee" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Pos., when From Club is 'CSKA Moscow'?
| SELECT "Pos." FROM table_48619 WHERE "From club" = 'cska moscow' | wikisql |
CREATE TABLE table_34924 (
"Team" text,
"Driver" text,
"Laps" real,
"Time" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total grid number that has 14 laps and a time of +29.483?
| SELECT COUNT("Grid") FROM table_34924 WHERE "Laps" = '14' AND "Time" = '+29.483' | wikisql |
CREATE TABLE table_11093 (
"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.
-- Which away team is based at glenferrie oval?
| SELECT "Away team" FROM table_11093 WHERE "Venue" = 'glenferrie oval' | wikisql |
CREATE TABLE table_64453 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which episode was the last written by chris hawkshaw t... | SELECT MAX("No. in season") FROM table_64453 WHERE "Written by" = 'chris hawkshaw' | wikisql |
CREATE TABLE table_name_90 (
value VARCHAR,
other VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number value has the Other transliteration of muoy roy?
| SELECT value FROM table_name_90 WHERE other = "muoy roy" | sql_create_context |
CREATE TABLE table_51482 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many were in attendance at the game where the visiting t... | SELECT SUM("Attendance") FROM table_51482 WHERE "Visitor" = 'jazz' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | 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 = "Benign neo pituitary" AND prescriptions.drug_type = "ADDITIVE" | mimicsql_data |
CREATE TABLE table_64097 (
"Wrestlers" text,
"Reign" text,
"Days held" text,
"Location" text,
"Event" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What wrestlers have summer brawl 2006 as the event?
| SELECT "Wrestlers" FROM table_64097 WHERE "Event" = 'summer brawl 2006' | wikisql |
CREATE TABLE table_name_25 (
ranking VARCHAR,
gold VARCHAR,
event VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Ranking has Gold less than 20 and the Event 1976 Toronto?
| SELECT ranking FROM table_name_25 WHERE gold < 20 AND event = "1976 toronto" | sql_create_context |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT p.CreationDate, p.Id AS "post_link" FROM Posts AS p JOIN PostTypes AS ty ON ty.Id = p.PostTypeId JOIN PostTags AS pt ON p.Id = pt.PostId JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName = 'python' AND ty.Name = 'Question' ORDER BY p.CreationDate DESC LIMIT 100 | sede |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = '... | advising |
CREATE TABLE table_22912 (
"Fiscal year" real,
"2-car sets" real,
"3-car sets" real,
"4-car sets" real,
"6-car sets" real,
"8-car sets" real,
"Total vehicles" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the 2 car sets for 622
| SELECT "2-car sets" FROM table_22912 WHERE "Total vehicles" = '622' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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... | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb 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 = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE person_info.XM = '苗静姝'... | css |
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 JCRGH, JCRXM FROM jyjgzbb WHERE JYZBLSH = '05689089455' | css |
CREATE TABLE table_5416 (
"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.
-- Which t... | SELECT "Team" FROM table_5416 WHERE "Location Attendance" = 'air canada centre 19,800' AND "Record" = '41–33' | wikisql |
CREATE TABLE table_34494 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of rounds of the end player with a pick number greater than 303?
| SELECT COUNT("Round") FROM table_34494 WHERE "Pick" > '303' AND "Position" = 'end' | wikisql |
CREATE TABLE table_57627 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the final score of the game against Lenka Novotn ?
| SELECT "Score" FROM table_57627 WHERE "Opponent in the final" = 'lenka novotná' | wikisql |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
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,
r... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city... | atis |
CREATE TABLE table_13336 (
"Name" text,
"Platform" text,
"Indication" text,
"Status" text,
"Collaboration" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What company collaborated in SBI-087 for rheumatoid arthritis?
| SELECT "Collaboration" FROM table_13336 WHERE "Name" = 'sbi-087' AND "Indication" = 'rheumatoid arthritis' | wikisql |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT zyjybgb.SQRGH, zyjybgb.SQRXM FROM zyjybgb WHERE zyjybgb.BGDH = '38029039376' UNION SELECT mzjybgb.SQRGH, mzjybgb.SQRXM FROM mzjybgb WHERE mzjybgb.BGDH = '38029039376' | css |
CREATE TABLE table_name_53 (
nationality VARCHAR,
club_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Nationality Club Team of Quebec remparts (qmjhl)?
| SELECT nationality FROM table_name_53 WHERE club_team = "quebec remparts (qmjhl)" | sql_create_context |
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 jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info JOIN person_info 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 = jyjgzbb.YLJ... | css |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT SOC_SRT_DIRE_NM, EACH_DOSAGE, USE_FRE FROM t_kc22 WHERE MED_CLINIC_ID = '46613991313' | css |
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 COUNT(*) FROM zyjzjlb WHERE JZKSMC = '中医推拿科' AND RYDJSJ BETWEEN '2004-10-25' AND '2011-05-02' | css |
CREATE TABLE table_2201724_1 (
score_in_the_final VARCHAR,
championship VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the final score of Wimbledon (2/2).
| SELECT score_in_the_final FROM table_2201724_1 WHERE championship = "Wimbledon (2/2)" | sql_create_context |
CREATE TABLE table_name_24 (
division VARCHAR,
coach VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which division were the IceGators when coached by Todd Gordon?
| SELECT division FROM table_name_24 WHERE coach = "todd gordon" | sql_create_context |
CREATE TABLE table_45026 (
"Player" text,
"Position" text,
"Round" real,
"Overall" real,
"MLB Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Overall, when Player is 'Dan Jennings', and when Round is greater than 9?
| SELECT MIN("Overall") FROM table_45026 WHERE "Player" = 'dan jennings' AND "Round" > '9' | wikisql |
CREATE TABLE table_name_22 (
institution VARCHAR,
team_nickname VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the institution when the team nickname is lakers?
| SELECT institution FROM table_name_22 WHERE team_nickname = "lakers" | sql_create_context |
CREATE TABLE stock (
Quantity INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average quantity of stocks?
| SELECT AVG(Quantity) FROM stock | sql_create_context |
CREATE TABLE student (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
tot_cred numeric(3,0)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
time_slot_id varchar(4... | SELECT title, COUNT(title) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY title | nvbench |
CREATE TABLE table_14947 (
"Code Name" text,
"Function (figure)" text,
"Real Name" text,
"Birthplace" text,
"Serial number" text,
"Primary military speciality" text,
"Secondary military speciality" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "Secondary military speciality" FROM table_14947 WHERE "Primary military speciality" = 'astral assault tactics' | wikisql |
CREATE TABLE table_name_98 (
batsmen VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who are the Batsmen from the year 2002?
| SELECT batsmen FROM table_name_98 WHERE year = "2002" | sql_create_context |
CREATE TABLE Problems (
problem_id INTEGER,
product_id INTEGER,
closure_authorised_by_staff_id INTEGER,
reported_by_staff_id INTEGER,
date_problem_reported DATETIME,
date_problem_closed DATETIME,
problem_description VARCHAR(255),
other_problem_details VARCHAR(255)
)
CREATE TABLE Staff (... | SELECT log_entry_description, COUNT(log_entry_description) FROM Problem_Log GROUP BY log_entry_description ORDER BY COUNT(log_entry_description) | nvbench |
CREATE TABLE table_name_14 (
opposing_teams VARCHAR,
against INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Opposing team had an Against smaller Than 5?
| SELECT opposing_teams FROM table_name_14 WHERE against < 5 | sql_create_context |
CREATE TABLE table_23501776_18 (
status VARCHAR,
new_points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If new points is 1720, what is the status?
| SELECT status FROM table_23501776_18 WHERE new_points = 1720 | sql_create_context |
CREATE TABLE table_name_97 (
opponent VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opposing team in the game(s) that started at 7:30pm?
| SELECT opponent FROM table_name_97 WHERE time = "7:30pm" | sql_create_context |
CREATE TABLE table_name_42 (
english VARCHAR,
sanskrit VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which English has a Sanskrit of sam dhi?
| SELECT english FROM table_name_42 WHERE sanskrit = "samādhi" | sql_create_context |
CREATE TABLE table_name_19 (
rank INTEGER,
worldwide_gross VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Rank of the Film with a Worldwide Gross of $183,031,272?
| SELECT SUM(rank) FROM table_name_19 WHERE worldwide_gross = "$183,031,272" | sql_create_context |
CREATE TABLE table_204_868 (
id number,
"outcome" text,
"no." number,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who did this player face in her only game in sw... | SELECT "opponent" FROM table_204_868 WHERE "tournament" = 'lenzerheide, switzerland' | squall |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT MED_ORG_DEPT_NM, OUT_DIAG_DIS_CD, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '3166992' GROUP BY MED_ORG_DEPT_NM, OUT_DIAG_DIS_CD | css |
CREATE TABLE table_name_3 (
language VARCHAR,
television_service VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What language is telemarket for you?
| SELECT language FROM table_name_3 WHERE television_service = "telemarket for you" | sql_create_context |
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
EMP_HIREDATE datetime,
EMP_DOB datetime
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE STUDENT... | SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE GROUP BY CRS_DESCRIPTION, EMP_FNAME ORDER BY COUNT(EMP_FNAME) DESC | nvbench |
CREATE TABLE table_name_82 (
engine VARCHAR,
finish VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What engine was used by the team the finished 2nd?
| SELECT engine FROM table_name_82 WHERE finish = "2nd" | sql_create_context |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
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... | SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE area.area LIKE '%hardw... | advising |
CREATE TABLE table_64663 (
"Episode" text,
"Date" text,
"Time" text,
"Network" text,
"Length" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the episode that aired at 7:30 pm ET?
| SELECT "Date" FROM table_64663 WHERE "Time" = '7:30 pm et' | wikisql |
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Reviewer (
rID int,
name text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Pleas... | SELECT director, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY director ORDER BY director DESC | nvbench |
CREATE TABLE flight (
flno number,
origin text,
destination text,
distance number,
departure_date time,
arrival_date time,
price number,
aid number
)
CREATE TABLE certificate (
eid number,
aid number
)
CREATE TABLE employee (
eid number,
name text,
salary number
)
... | SELECT aid FROM aircraft WHERE distance > 1000 | spider |
CREATE TABLE table_name_82 (
home_run INTEGER,
opposing_pitcher VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When Efrain Valdez was pitching, what was the highest home run?
| SELECT MAX(home_run) FROM table_name_82 WHERE opposing_pitcher = "efrain valdez" | sql_create_context |
CREATE TABLE table_name_10 (
companion__in_order_from_star_ VARCHAR,
orbital_period___s_day__ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Companion (in order from star) has an Orbital period (s day) of 9.6184 +0.0050 0.0049?
| SELECT companion__in_order_from_star_ FROM table_name_10 WHERE orbital_period___s_day__ = "9.6184 +0.0050 −0.0049" | sql_create_context |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT Score AS Vote, COUNT(Score) AS PostCount FROM Posts AS q WHERE q.OwnerUserId = @UserId GROUP BY Score ORDER BY Score DESC | sede |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,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... | 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 table_name_96 (
former_local_authority VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Former local authority for Ecclesfield?
| SELECT former_local_authority FROM table_name_96 WHERE name = "ecclesfield" | sql_create_context |
CREATE TABLE table_204_631 (
id number,
"#" number,
"title" text,
"english translation" text,
"original album" text,
"length" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the title , in english , of the last song on this album ?
| SELECT "english translation" FROM table_204_631 ORDER BY "#" DESC LIMIT 1 | squall |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE transfers (
row_id... | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'rev hip repl-fem comp') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 17505) AND STRFTIME('%y', pro... | mimic_iii |
CREATE TABLE table_66398 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Opponent on December 3, 1979?
| SELECT "Opponent" FROM table_66398 WHERE "Date" = 'december 3, 1979' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT demographic.diagnosis, demographic.dischtime FROM demographic WHERE demographic.name = "Morgan Mcgee" | mimicsql_data |
CREATE TABLE table_name_37 (
rank INTEGER,
state VARCHAR,
mountain_peak VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where does Mount Chamberlin, located in Alaska, rank on the chart?
| SELECT SUM(rank) FROM table_name_37 WHERE state = "alaska" AND mountain_peak = "mount chamberlin" | sql_create_context |
CREATE TABLE table_14209245_9 (
pick__number VARCHAR,
round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the pick number for round 2?
| SELECT pick__number FROM table_14209245_9 WHERE round = 2 | sql_create_context |
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 (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25... | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(SALARY) DESC | nvbench |
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 jyjgzbb (
BGDH text,
BGRQ tim... | SELECT COUNT(*) FROM jybgb WHERE jybgb.JZLSH = '62692281748' | css |
CREATE TABLE table_65705 (
"Score" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What 2012 has 2 as the score?
| SELECT "2012" FROM table_65705 WHERE "Score" = '2' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.