instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_10692 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the time/retired for Grid of 13
| SELECT "Time/Retired" FROM table_10692 WHERE "Grid" = '13' | wikisql |
CREATE TABLE list (
lastname text,
firstname text,
grade number,
classroom number
)
CREATE TABLE teachers (
lastname text,
firstname text,
classroom number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which teachers teach the student named EVE... | SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "EVELINA" AND T1.lastname = "BROMLEY" | spider |
CREATE TABLE table_44369 (
"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 the class when part 2 is bond?
| SELECT "Class" FROM table_44369 WHERE "Part 2" = 'bond' | wikisql |
CREATE TABLE table_1341423_9 (
results VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How did the election in the Florida 14 district end?
| SELECT results FROM table_1341423_9 WHERE district = "Florida 14" | sql_create_context |
CREATE TABLE table_108 (
"Track #" real,
"Song" text,
"Singers" text,
"Picturization" text,
"Length" text,
"Lyricist" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What song has a length of 3:05?
| SELECT "Song" FROM table_108 WHERE "Length" = '3:05' | wikisql |
CREATE TABLE table_name_79 (
score VARCHAR,
home VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Score, when Home is 'Montreal Canadiens', and when Date is 'May 16'?
| SELECT score FROM table_name_79 WHERE home = "montreal canadiens" AND date = "may 16" | sql_create_context |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT Team_Name, All_Games_Percent FROM basketball_match | nvbench |
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 Headquarter, AVG(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY AVG(Manufacturer) DESC | nvbench |
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 demographic (
subject_id text,
hadm_id 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 = "Stevens-Johnson-TEN syn" AND prescriptions.route = "IV BOLUS" | mimicsql_data |
CREATE TABLE table_name_76 (
home_team VARCHAR,
tie_no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home team of the game with tie number 34?
| SELECT home_team FROM table_name_76 WHERE tie_no = "34" | sql_create_context |
CREATE TABLE table_21131 (
"Election" real,
"Candidates fielded" real,
"# of seats won" real,
"Total votes" real,
"% of popular vote" text,
"Place" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many percentages are listed for the election i... | SELECT COUNT("% of popular vote") FROM table_21131 WHERE "Election" = '1983' | wikisql |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text... | SELECT someQuestion.Id AS "post_link", someQuestion.ViewCount, someQuestion.CommentCount AS comms, someQuestion.AnswerCount, someQuestion.FavoriteCount AS favs, someQuestion.Score AS QuetionScore, yourAnswer.Score AS YourScore, someQuestion.Tags FROM Posts AS yourAnswer JOIN Posts AS someQuestion ON yourAnswer.ParentId... | sede |
CREATE TABLE table_name_33 (
attendance INTEGER,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many people were in attendance on January 4, 2008?
| SELECT SUM(attendance) FROM table_name_33 WHERE date = "january 4, 2008" | sql_create_context |
CREATE TABLE table_name_47 (
fa_cup_apps INTEGER,
league_goals VARCHAR,
total_goals VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which FA Cup apps has league goals of 1 with total goals less than 1?
| SELECT AVG(fa_cup_apps) FROM table_name_47 WHERE league_goals = 1 AND total_goals < 1 | sql_create_context |
CREATE TABLE table_32420 (
"Year" real,
"Location" text,
"Fans' Choice Award" text,
"Male Artist of the Year" text,
"Female Artist of the Year" text,
"Group or Duo of the Year" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won Female Artist... | SELECT "Female Artist of the Year" FROM table_32420 WHERE "Group or Duo of the Year" = 'family brown' AND "Year" = '1983' | wikisql |
CREATE TABLE table_1287 (
"Player" text,
"No." real,
"Nationality" text,
"Position" text,
"Years in Orlando" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT WAS THE NUMBER OF THE ONLY FORWARD-CENTER TO MAKE THE ROSTE... | SELECT MIN("No.") FROM table_1287 WHERE "Position" = 'Forward-Center' | wikisql |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar... | SELECT DISTINCT course.name, course.number, program_course.workload FROM course, program_course WHERE course.department LIKE '%IOE%' AND program_course.course_id = course.course_id AND program_course.workload < 3 | advising |
CREATE TABLE table_18567 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year was incumbent joe b. bates first elected?
| SELECT "First elected" FROM table_18567 WHERE "Incumbent" = 'Joe B. Bates' | wikisql |
CREATE TABLE table_name_37 (
constituency_number VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many constituents does udaipura have?
| SELECT constituency_number FROM table_name_37 WHERE name = "udaipura" | sql_create_context |
CREATE TABLE table_name_15 (
field VARCHAR,
geological_trend VARCHAR,
discovery VARCHAR,
operator_s_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Field has a Discovery of na, and an Operator(s) of woc, and a Geological Trend of western
| SELECT field FROM table_name_15 WHERE discovery = "na" AND operator_s_ = "woc" AND geological_trend = "western" | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "WIDOWED" AND lab.label = "Digoxin" | mimicsql_data |
CREATE TABLE table_25060 (
"Name" text,
"#" real,
"Position" text,
"Height" text,
"Weight" real,
"Year" text,
"Home Town" text,
"High School" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was rickie winslow's number?
| SELECT MAX("#") FROM table_25060 WHERE "Name" = 'Rickie Winslow' | wikisql |
CREATE TABLE albums (
aid number,
title text,
year number,
label text,
type text
)
CREATE TABLE vocals (
songid number,
bandmate number,
type text
)
CREATE TABLE instruments (
songid number,
bandmateid number,
instrument text
)
CREATE TABLE performance (
songid number,... | SELECT COUNT(DISTINCT label) FROM albums | spider |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,... | SELECT (SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7698)) AND DATETIME(inputevents_cv.charttime, 'start of month') = DATETIME(CURRENT... | mimic_iii |
CREATE TABLE table_name_2 (
name VARCHAR,
avg_g VARCHAR,
gp_gs VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Avg/G smaller than 225.5, and a GP-GS of 8 0 has what name?
| SELECT name FROM table_name_2 WHERE avg_g < 225.5 AND gp_gs = "8–0" | sql_create_context |
CREATE TABLE prereq (
course_id text,
prereq_id text
)
CREATE TABLE course (
course_id text,
title text,
dept_name text,
credits number
)
CREATE TABLE classroom (
building text,
room_number text,
capacity number
)
CREATE TABLE student (
id text,
name text,
dept_name te... | SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq) | spider |
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 jyjgzbb.BGDH FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON 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 hz_info.RYBH = '00922703' AND NOT jyjgzbb.BGDH IN (SELECT jyjgzb... | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE 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 < "2170" AND lab.fluid = "Other Body Fluid" | mimicsql_data |
CREATE TABLE table_14286908_1 (
total_finals VARCHAR,
year_of_last_win VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many total finals where there when the last win was in 2012-13?
| SELECT total_finals FROM table_14286908_1 WHERE year_of_last_win = "2012-13" | sql_create_context |
CREATE TABLE table_21505 (
"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.
-- Who ha... | SELECT "High points" FROM table_21505 WHERE "Date" = 'February 6' | wikisql |
CREATE TABLE table_70390 (
"Overall place" text,
"Yacht name" text,
"Skipper" text,
"Points" text,
"Combined elapsed time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which yacht name has a Combined elapsed time of 179d 11h 58m 14s?
| SELECT "Yacht name" FROM table_70390 WHERE "Combined elapsed time" = '179d 11h 58m 14s' | wikisql |
CREATE TABLE table_name_44 (
name VARCHAR,
county VARCHAR,
cerclis_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name for Charleston County with a CERCLIS ID of scd980711279?
| SELECT name FROM table_name_44 WHERE county = "charleston" AND cerclis_id = "scd980711279" | sql_create_context |
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE journal (
journalid int,
journalname... | SELECT DISTINCT COUNT(cite.citedpaperid) FROM author, cite, paper, writes WHERE author.authorname = 'mark steedman' AND paper.paperid = cite.citedpaperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | scholar |
CREATE TABLE table_name_46 (
week INTEGER,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Week has an Opponent of san francisco 49ers?
| SELECT MAX(week) FROM table_name_46 WHERE opponent = "san francisco 49ers" | sql_create_context |
CREATE TABLE table_10686 (
"Code" real,
"Type" text,
"Name" text,
"Area (km 2 )" real,
"Population" real,
"Regional County Municipality" text,
"Region" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many people have a vl type in a region... | SELECT SUM("Population") FROM table_10686 WHERE "Type" = 'vl' AND "Region" > '3' | wikisql |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) AND STRFTIME('%y', diagnosis.diagnosistime) <= '2102' GROUP BY diagnosis.... | eicu |
CREATE TABLE table_17191 (
"DVD Name" text,
"Released" text,
"Audio" text,
"Aspect Ratio" text,
"Duration" text,
"Number of Episodes" real,
"Num of Discs" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the aspect ratio of the DVD rel... | SELECT "Aspect Ratio" FROM table_17191 WHERE "Released" = '12/10/2009' | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.dob_year < "2052" | mimicsql_data |
CREATE TABLE table_64455 (
"Type of service" text,
"2006" real,
"2007" real,
"2008" real,
"Change 06-07" text,
"Change 07-08" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the greatest 2007 when the change 06-07 was 14.7%?
| SELECT MAX("2007") FROM table_64455 WHERE "Change 06-07" = '14.7%' | wikisql |
CREATE TABLE table_203_152 (
id number,
"province" text,
"capital" text,
"area (km2)" number,
"population" number,
"density" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which province has the most area ?
| SELECT "province" FROM table_203_152 ORDER BY "area (km2)" DESC LIMIT 1 | squall |
CREATE TABLE table_56578 (
"Year" real,
"Category" text,
"Genre" text,
"Title" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the title of Ashanti's 2003 rap song?
| SELECT "Title" FROM table_56578 WHERE "Year" = '2003' AND "Genre" = 'rap' | wikisql |
CREATE TABLE table_name_55 (
team_1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the 1st leg for team being budoni (Sardinia)
| SELECT 1 AS st_leg FROM table_name_55 WHERE team_1 = "budoni (sardinia)" | sql_create_context |
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 lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "SINGLE" AND diagnoses.long_title = "Intestinal bypass or anastomosis status" | mimicsql_data |
CREATE TABLE table_204_507 (
id number,
"bridge name" text,
"location" text,
"year completed" number,
"total length" text,
"carries" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which bridge is longer - old youngs bay bridge or oregon city bri... | SELECT "bridge name" FROM table_204_507 WHERE "bridge name" IN ('old youngs bay bridge', 'oregon city bridge') ORDER BY "total length" DESC LIMIT 1 | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "31-32 comp wks gestation" AND lab.flag = "abnormal" | mimicsql_data |
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Reviewer (
rID int,
name text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Ignor... | SELECT title, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director <> "null" ORDER BY stars DESC | nvbench |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
d... | SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '018-20179')) AND DATETIME(lab.labresulttime, 'start of month') = DATETIME(CURRENT_TIME(),... | eicu |
CREATE TABLE table_name_57 (
week INTEGER,
attendance INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Week has an Attendance larger than 65,070?
| SELECT MAX(week) FROM table_name_57 WHERE attendance > 65 OFFSET 070 | sql_create_context |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Martin Murray%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.off... | advising |
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_l... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 5 AND program_course.category LIKE 'ULCS' | advising |
CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
)
CREATE TABLE Scientists (
SSN int,
Name Char(30)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- A bar chart for finding ... | SELECT T2.Name, COUNT(T2.Name) FROM AssignedTo AS T1 JOIN Projects AS T2 ON T1.Project = T2.Code JOIN Scientists AS T3 ON T1.Scientist = T3.SSN WHERE T3.Name LIKE '%Smith%' GROUP BY T2.Name | nvbench |
CREATE TABLE table_name_27 (
engine VARCHAR,
year VARCHAR,
points VARCHAR,
chassis VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the engine that saw 0 points, and a Chassis of porsche 718, in 1961?
| SELECT engine FROM table_name_27 WHERE points = 0 AND chassis = "porsche 718" AND year = 1961 | sql_create_context |
CREATE TABLE table_74843 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Format has a Label of toy's factory records?
| SELECT "Format" FROM table_74843 WHERE "Label" = 'toy''s factory records' | wikisql |
CREATE TABLE table_2273738_1 (
type VARCHAR,
local_authority VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Leeds City Council is the local authority for what type of location?
| SELECT type FROM table_2273738_1 WHERE local_authority = "Leeds city Council" | sql_create_context |
CREATE TABLE table_43808 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT'S THE TIE NUMBER WITH AN AWAY TEAM OF WREXHAM?
| SELECT "Tie no" FROM table_43808 WHERE "Away team" = 'wrexham' | wikisql |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT AVG(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25233)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arte... | mimic_iii |
CREATE TABLE table_name_87 (
city VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is the Mackey Arena located?
| SELECT city FROM table_name_87 WHERE venue = "mackey arena" | sql_create_context |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varc... | SELECT DISTINCT course.name, course.number, program_course.workload FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'EECS' AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1) | advising |
CREATE TABLE table_name_14 (
partner VARCHAR,
surface VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who played on a hard surface?
| SELECT partner FROM table_name_14 WHERE surface = "hard" | sql_create_context |
CREATE TABLE table_2668393_18 (
district VARCHAR,
candidates VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the district with the candidates edwin gray (dr)?
| SELECT district FROM table_2668393_18 WHERE candidates = "Edwin Gray (DR)" | sql_create_context |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varch... | SELECT DISTINCT course_offering.has_final_exam FROM course_offering INNER JOIN course ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHER... | advising |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40)... | SELECT JOB_TITLE, AVG(SALARY) FROM employees AS T1 JOIN jobs AS T2 ON T1.JOB_ID = T2.JOB_ID GROUP BY T2.JOB_TITLE ORDER BY JOB_TITLE DESC | nvbench |
CREATE TABLE table_79658 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in final" text,
"Score" text,
"Prize Money" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of the match on clay with score of 6-3 2-6 6-4?
| SELECT "Date" FROM table_79658 WHERE "Surface" = 'clay' AND "Score" = '6-3 2-6 6-4' | wikisql |
CREATE TABLE table_11108 (
"Date" text,
"Opponent" text,
"Result" text,
"Kickoff [a ]" text,
"Game site" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which date has a Kickoff [a] of 4:00, and an Opponent of detroit lions?
| SELECT "Date" FROM table_11108 WHERE "Kickoff [a ]" = '4:00' AND "Opponent" = 'detroit lions' | wikisql |
CREATE TABLE table_60611 (
"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 is Kirk... | SELECT MIN("Lost") FROM table_60611 WHERE "Team" = 'kirkby town' AND "Goals For" > '83' | wikisql |
CREATE TABLE budget (
School_id int,
Year int,
Budgeted int,
total_budget_percent_budgeted real,
Invested int,
total_budget_percent_invested real,
Budget_invested_percent text
)
CREATE TABLE School (
School_id text,
School_name text,
Location text,
Mascot text,
Enrollmen... | SELECT COUNT(*), SUM(Enrollment) FROM School GROUP BY County | nvbench |
CREATE TABLE table_name_91 (
segment_a VARCHAR,
segment_d VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Segment A entry for the episode that has an entry of Diesel filters for Segment D?
| SELECT segment_a FROM table_name_91 WHERE segment_d = "diesel filters" | sql_create_context |
CREATE TABLE web_client_accelerator (
id number,
name text,
operating_system text,
client text,
connection text
)
CREATE TABLE browser (
id number,
name text,
market_share number
)
CREATE TABLE accelerator_compatible_browser (
accelerator_id number,
browser_id number,
compa... | SELECT id, market_share FROM browser WHERE name = 'Safari' | spider |
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
)
CREATE TABLE trip (
id INTEGER,
d... | SELECT date, COUNT(date) FROM weather ORDER BY COUNT(date) 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 zyjzjlb (
CYBQDM text,
CYBQMC... | SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.YLJGDM = '8880467' AND mzjzjlb.JZKSRQ BETWEEN '2000-03-11' AND '2001-06-23' AND mzjzjlb.ZSEBZ > 0 | css |
CREATE TABLE table_name_92 (
opponent VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team was the opponent for the game played on September 19, 1999?
| SELECT opponent FROM table_name_92 WHERE date = "september 19, 1999" | 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 COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '9826244' AND jybgb.BGRQ BETWEEN '2008-07-31' AND '2012-06-09' GROUP BY jybgb.KSBM HAVING COUNT(*) >= 12) AS T | css |
CREATE TABLE table_name_3 (
date VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What day did the play on week 6?
| SELECT date FROM table_name_3 WHERE week = 6 | sql_create_context |
CREATE TABLE table_26352 (
"equation:" text,
"k_{\\mathrm{H,pc}} = \\frac{p}{c_\\mathrm{aq}}" text,
"k_{\\mathrm{H,cp}} = \\frac{c_\\mathrm{aq}}{p}" text,
"k_{\\mathrm{H,px}} = \\frac{p}{x}" text,
"k_{\\mathrm{H,cc}} = \\frac{c_{\\mathrm{aq}}}{c_{\\mathrm{gas}}}" text
)
-- Using valid SQLite, answ... | SELECT "k_{\\mathrm{H,cc}} = \\frac{c_{\\mathrm{aq}}}{c_{\\mathrm{gas}}}" FROM table_26352 WHERE "equation:" = 'O 2' | wikisql |
CREATE TABLE mzb (
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '魏浩邈' AND qtb.MED_SER_ORG_NO = '5236324' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '魏浩邈' AND gyb.MED_SER_ORG_NO = '5236324' UNION... | 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 gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '56236131' AND gwyjzb.MED_SER_ORG_NO = '6811873' AND NOT gwyjzb.OUT_DIAG_DIS_NM LIKE '%孤独症%' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '56236131' AND fgwyjzb.MED_SER_ORG_NO = '6811873' AND NOT fgwyjzb.OUT_DIAG_DIS_NM LIKE '... | css |
CREATE TABLE table_13094 (
"Place" real,
"Team" text,
"Played" real,
"Draw" real,
"Lost" real,
"Goals Scored" real,
"Goals Conceded" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average of lost for place less... | SELECT AVG("Lost") FROM table_13094 WHERE "Place" < '10' AND "Points" < '23' AND "Team" = 'chorrillo' AND "Goals Conceded" < '26' | wikisql |
CREATE TABLE inst (
instid number,
name text,
country text
)
CREATE TABLE authorship (
authid number,
instid number,
paperid number,
authorder number
)
CREATE TABLE papers (
paperid number,
title text
)
CREATE TABLE authors (
authid number,
lname text,
fname text
)
-... | SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = "Nameless , Painless" | spider |
CREATE TABLE courses (
course_id number,
author_id number,
subject_id number,
course_name text,
course_description text
)
CREATE TABLE student_course_enrolment (
registration_id number,
student_id number,
course_id number,
date_of_enrolment time,
date_of_completion time
)
CREAT... | SELECT T1.course_description, T1.course_name FROM courses AS T1 JOIN student_course_enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2 | spider |
CREATE TABLE table_2508633_8 (
pick__number INTEGER,
nfl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the pick number minimum if the NFL team is the San Diego Chargers?
| SELECT MIN(pick__number) FROM table_2508633_8 WHERE nfl_team = "San Diego Chargers" | sql_create_context |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost numb... | SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25050)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht'... | mimic_iii |
CREATE TABLE table_name_83 (
location_attendance VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location and attendance when the score as w 117 109 (ot)?
| SELECT location_attendance FROM table_name_83 WHERE score = "w 117–109 (ot)" | sql_create_context |
CREATE TABLE table_43807 (
"Release date" text,
"Album title" text,
"Record label" text,
"Disc number" text,
"Track number" text,
"Title" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name The Title which has a Track number of 07, and a Record ... | SELECT "Title" FROM table_43807 WHERE "Track number" = '07' AND "Record label" = 'emi' AND "Release date" = '21 april 2006' | wikisql |
CREATE TABLE table_name_21 (
high_assists VARCHAR,
game VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which High assists have a Game larger than 21, and a Record of 18-6?
| SELECT high_assists FROM table_name_21 WHERE game > 21 AND record = "18-6" | sql_create_context |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE T... | SELECT LAST_NAME, SALARY FROM employees WHERE FIRST_NAME LIKE '%m' | nvbench |
CREATE TABLE table_203_838 (
id number,
"year" number,
"world car of the year" text,
"world performance car" text,
"world green car" text,
"world car design of the year" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many total world perform... | SELECT "world performance car" FROM table_203_838 WHERE "year" = 2007 | squall |
CREATE TABLE table_name_43 (
lineup VARCHAR,
assist_pass VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the Lineup that has an Assist/pass of carli lloyd,a Competition of 2010 concacaf world cup qualifying group stage?
| SELECT lineup FROM table_name_43 WHERE assist_pass = "carli lloyd" AND competition = "2010 concacaf world cup qualifying – group stage" | sql_create_context |
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 t_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '凤霞影' AND t_kc21.MED_SER_ORG_NO = '0445377' AND t_kc21.OUT_DIAG_DOC_NM LIKE '曹%' | css |
CREATE TABLE table_26092 (
"Week" real,
"Date" text,
"Opponent" text,
"Location" text,
"Final Score" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which opponent has 32194 as the attendance?
| SELECT "Opponent" FROM table_26092 WHERE "Attendance" = '32194' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT * FROM qtb WHERE qtb.PERSON_ID = '45006665' AND qtb.MED_SER_ORG_NO = '5335029' AND qtb.MED_ORG_DEPT_NM LIKE '%准分子%' UNION SELECT * FROM gyb WHERE gyb.PERSON_ID = '45006665' AND gyb.MED_SER_ORG_NO = '5335029' AND gyb.MED_ORG_DEPT_NM LIKE '%准分子%' UNION SELECT * FROM zyb WHERE zyb.PERSON_ID = '45006665' AND zyb.MED... | css |
CREATE TABLE member (
Member_ID text,
Name text,
Nationality text,
Role text
)
CREATE TABLE member_attendance (
Member_ID int,
Performance_ID int,
Num_of_Pieces int
)
CREATE TABLE performance (
Performance_ID real,
Date text,
Host text,
Location text,
Attendance int
)
... | SELECT Location, COUNT(*) FROM performance GROUP BY Location ORDER BY COUNT(*) | nvbench |
CREATE TABLE SportsInfo (
StuID INTEGER,
SportName VARCHAR(32),
HoursPerWeek INTEGER,
GamesPlayed INTEGER,
OnScholarship VARCHAR(1)
)
CREATE TABLE Plays_Games (
StuID INTEGER,
GameID INTEGER,
Hours_Played INTEGER
)
CREATE TABLE Video_Games (
GameID INTEGER,
GName VARCHAR(40),
... | SELECT GameID, SUM(Hours_Played) FROM Plays_Games GROUP BY GameID | nvbench |
CREATE TABLE table_name_91 (
opponents_in_the_final VARCHAR,
partner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Opponents in the final have a Partner of daniella dominikovic?
| SELECT opponents_in_the_final FROM table_name_91 WHERE partner = "daniella dominikovic" | sql_create_context |
CREATE TABLE table_63077 (
"Rank (2012)" real,
"Rank (2010)" real,
"Employer" text,
"Industry" text,
"2012 Employees (Total)" real,
"2010 Employees (Total)" real,
"2007 Employees (Total)" text,
"Head office" text
)
-- Using valid SQLite, answer the following questions for the tables pr... | SELECT "2012 Employees (Total)" FROM table_63077 WHERE "Rank (2012)" = '7' | wikisql |
CREATE TABLE table_45177 (
"State" text,
"Type" text,
"Name" text,
"Title" text,
"Royal house" text,
"From" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which state was Dai from?
| SELECT "State" FROM table_45177 WHERE "Name" = 'dai' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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 ... | SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '7867709' AND t_kc21.IN_HOSP_DATE BETWEEN '2000-01-02' AND '2013-01-02' AND t_kc21.PERSON_NM LIKE '郎%' | css |
CREATE TABLE table_51063 (
"Model number" text,
"sSpec number" text,
"Frequency" text,
"GPU frequency" text,
"L2 cache" text,
"I/O bus" text,
"Memory" text,
"Socket" text,
"Release date" text,
"Part number(s)" text
)
-- Using valid SQLite, answer the following questions for the... | SELECT "sSpec number" FROM table_51063 WHERE "Frequency" = '1 ghz' | wikisql |
CREATE TABLE table_39691 (
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Game time" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the game with a result of w 27-24 (ot)?
| SELECT "Date" FROM table_39691 WHERE "Result" = 'w 27-24 (ot)' | wikisql |
CREATE TABLE table_40209 (
"Event" text,
"2007\u201308" text,
"2008\u201309" text,
"2009\u201310" text,
"2010\u201311" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Event when DNP shows for 2007 08?
| SELECT "Event" FROM table_40209 WHERE "2007\u201308" = 'dnp' | wikisql |
CREATE TABLE table_203_565 (
id number,
"wrestlers" text,
"times" number,
"date" text,
"location" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which wrestlers have the same year listed for their date as kodo fuyuki and the sandma... | SELECT "wrestlers" FROM table_203_565 WHERE "wrestlers" <> 'kodo fuyuki and the sandman' AND "date" = (SELECT "date" FROM table_203_565 WHERE "wrestlers" = 'kodo fuyuki and the sandman') | squall |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.