instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_79 (
laps VARCHAR,
grid VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many laps had a grid over 16 and a Time of +1:35.890?
| SELECT laps FROM table_name_79 WHERE grid > 16 AND time = "+1:35.890" | sql_create_context |
CREATE TABLE table_30128 (
"Year(s)" real,
"Television commentator" text,
"Dual Television commentator" text,
"Radio commentator" text,
"Spokesperson" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who made the comments for radio broadcast when Jan ... | SELECT "Radio commentator" FROM table_30128 WHERE "Television commentator" = 'Jan Gabrielsson' | wikisql |
CREATE TABLE table_3557 (
"Pick #" real,
"Brand (to)" text,
"Employee (Real name)" text,
"Role(s)" text,
"Brand (from)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the brand for pick number 15
| SELECT "Brand (to)" FROM table_3557 WHERE "Pick #" = '15' | wikisql |
CREATE TABLE climber (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many climbers are there?
| SELECT COUNT(*) FROM climber | sql_create_context |
CREATE TABLE table_name_39 (
director VARCHAR,
film_title_used_in_nomination VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Director of Children of Sarajevo?
| SELECT director FROM table_name_39 WHERE film_title_used_in_nomination = "children of sarajevo" | sql_create_context |
CREATE TABLE table_name_26 (
distance VARCHAR,
type VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the distance for the team time trial?
| SELECT distance FROM table_name_26 WHERE type = "team time trial" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,... | (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 = '64770032' AND jybgb.BGRQ BETWEEN '2000-06-13' AND '2019-11-17') U... | css |
CREATE TABLE table_75031 (
"Call sign" text,
"Analog channel" text,
"Digital channel" text,
"Virtual channel" text,
"Network" text,
"Station Ownership" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Virtual channel of 16.5 has what call sign?
| SELECT "Call sign" FROM table_75031 WHERE "Virtual channel" = '16.5' | wikisql |
CREATE TABLE table_26847237_1 (
score VARCHAR,
opposition VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score when the opposition was West Coast in Wanganui?
| SELECT score FROM table_26847237_1 WHERE opposition = "West Coast" AND location = "Wanganui" | sql_create_context |
CREATE TABLE table_29083 (
"Round #" text,
"Home Team" text,
"Win/Loss" text,
"Score" text,
"Opposition" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the home team when the round # is round 1?
| SELECT "Home Team" FROM table_29083 WHERE "Round #" = 'Round 1' | wikisql |
CREATE TABLE table_19296 (
"Celebrity" text,
"Famous for" text,
"Entered" text,
"Exited" text,
"Finished" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the finished place where exited is day 11?
| SELECT "Finished" FROM table_19296 WHERE "Exited" = 'Day 11' | wikisql |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE ... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA... | atis |
CREATE TABLE table_37965 (
"Callsign" text,
"Area served" text,
"Frequency" text,
"Band" text,
"On-air ID" text,
"Purpose" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the purpose for on-air ID of 2xx
| SELECT "Purpose" FROM table_37965 WHERE "On-air ID" = '2xx' | wikisql |
CREATE TABLE gymnast (
Gymnast_ID int,
Floor_Exercise_Points real,
Pommel_Horse_Points real,
Rings_Points real,
Vault_Points real,
Parallel_Bars_Points real,
Horizontal_Bar_Points real,
Total_Points real
)
CREATE TABLE people (
People_ID int,
Name text,
Age real,
Height ... | SELECT Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown | nvbench |
CREATE TABLE table_38780 (
"Team" text,
"Stadium" text,
"Capacity" real,
"Highest" real,
"Lowest" real,
"Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Highest smaller than 3,378, and a Stadium of cappielow has what average capacity?
| SELECT AVG("Capacity") FROM table_38780 WHERE "Highest" < '3,378' AND "Stadium" = 'cappielow' | wikisql |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... | atis |
CREATE TABLE table_27734769_9 (
high_rebounds VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who did the high rebounds for the team Minnesota?
| SELECT high_rebounds FROM table_27734769_9 WHERE team = "Minnesota" | sql_create_context |
CREATE TABLE table_10026563_1 (
ended_time_as_senior_g8_leader VARCHAR,
person VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did Jacques Chirac stop being a G8 leader?
| SELECT ended_time_as_senior_g8_leader FROM table_10026563_1 WHERE person = "Jacques Chirac" | sql_create_context |
CREATE TABLE table_21772 (
"District" real,
"Incumbent" text,
"2008 Status" text,
"Democratic" text,
"Republican" text,
"Independent Green" text,
"Libertarian" text,
"Other Party" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was th... | SELECT "Republican" FROM table_21772 WHERE "Incumbent" = 'Thelma Drake' | wikisql |
CREATE TABLE table_name_43 (
score VARCHAR,
championship VARCHAR,
surface VARCHAR,
outcome VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the score when the surface is carpet (i) outcome is winner and the championship is rotterdam, netherland... | SELECT score FROM table_name_43 WHERE surface = "carpet (i)" AND outcome = "winner" AND championship = "rotterdam, netherlands" | sql_create_context |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
Po... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%toulouse%' ORDER BY Reputation DESC LIMIT 30 | sede |
CREATE TABLE table_204_184 (
id number,
"#" number,
"title" text,
"producer(s)" text,
"featured guest(s)" text,
"length" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many tracks are in the album ?
| SELECT COUNT("title") FROM table_204_184 | squall |
CREATE TABLE table_6001 (
"Stage" text,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Combination classification" text,
"Team classification" text
)
-- Using valid SQLite, answer the following questions for the tables provided... | SELECT "Combination classification" FROM table_6001 WHERE "Stage" = '14' | wikisql |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime ti... | SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7073) AND STRFTIME('%y', procedures_icd.charttime) <= '2104' | mimic_iii |
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE STUDENT (
STU_NUM int,
... | SELECT SCHOOL_CODE, COUNT(*) FROM DEPARTMENT AS T1 JOIN PROFESSOR AS T2 ON T1.DEPT_CODE = T2.DEPT_CODE GROUP BY T1.SCHOOL_CODE | nvbench |
CREATE TABLE table_38498 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the visitor for detroit on february 24
| SELECT "Visitor" FROM table_38498 WHERE "Home" = 'detroit' AND "Date" = 'february 24' | wikisql |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeri... | SELECT patient.wardid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-34108') AND STRFTIME('%y', patient.unitadmittime) <= '2104' ORDER BY patient.unitadmittime DESC LIMIT 1 | eicu |
CREATE TABLE table_35331 (
"Episode" text,
"Title" text,
"Writer(s)" text,
"Preservation" text,
"Original airdate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the original airdate for episode 7-17 (195) from writer Sidney Slon?
| SELECT "Original airdate" FROM table_35331 WHERE "Writer(s)" = 'sidney slon' AND "Episode" = '7-17 (195)' | wikisql |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
sc... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.start_time >= '12:00:00' AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 692 AND semester.semester = 'Fall' AND semester.semester_id = course_offering.semester AND semester.year = 2006 | advising |
CREATE TABLE table_name_18 (
days VARCHAR,
year VARCHAR,
constituency VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the number of days in 1945 where the constituent was heywood and radcliffe?
| SELECT days FROM table_name_18 WHERE year = "1945" AND constituency = "heywood and radcliffe" | sql_create_context |
CREATE TABLE song (
artist_name VARCHAR,
languages VARCHAR,
rating INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the names of the artists who have produced English songs but have never received rating higher than 8.
| SELECT DISTINCT artist_name FROM song WHERE languages = "english" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8 | sql_create_context |
CREATE TABLE table_11677691_12 (
player VARCHAR,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who are all the players for armwood high school
| SELECT player FROM table_11677691_12 WHERE school = "Armwood High school" | sql_create_context |
CREATE TABLE table_68523 (
"Date" text,
"Course" text,
"Distance" text,
"Type" text,
"Winner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What type had a course of Grosseto To Rieti?
| SELECT "Type" FROM table_68523 WHERE "Course" = 'grosseto to rieti' | wikisql |
CREATE TABLE table_name_25 (
season VARCHAR,
league VARCHAR,
european_competitions VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Season when league shows bundesliga, and a European competition of played korac cup?
| SELECT season FROM table_name_25 WHERE league = "bundesliga" AND european_competitions = "played korac cup" | 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 allergy (
allergy... | 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 = '022-44805')) AND lab.labname = 'chloride' AND DATETIME(lab.labresulttime, 'start of... | eicu |
CREATE TABLE table_name_30 (
points VARCHAR,
home VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What points have pittsburgh as the home, and November 29 as the date?
| SELECT points FROM table_name_30 WHERE home = "pittsburgh" AND date = "november 29" | sql_create_context |
CREATE TABLE table_204_449 (
id number,
"no" number,
"episode" text,
"title" text,
"original airdate" text,
"viewers" number,
"nightly\nrank" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which episode had at least 1.0 viewers ?
| SELECT "title" FROM table_204_449 WHERE "viewers" >= 1.0 | squall |
CREATE TABLE table_51405 (
"Name" text,
"Current version" text,
"System" text,
"Platform" text,
"License" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the current version of the name mupen64plus with gpl v2 license?
| SELECT "Current version" FROM table_51405 WHERE "License" = 'gpl v2' AND "Name" = 'mupen64plus' | wikisql |
CREATE TABLE Order_Items (
item_id INTEGER,
order_item_status_code VARCHAR(15),
order_id INTEGER,
product_id INTEGER,
item_status_code VARCHAR(15),
item_delivered_datetime DATETIME,
item_order_quantity VARCHAR(80)
)
CREATE TABLE Premises (
premise_id INTEGER,
premises_type VARCHAR(1... | SELECT premises_type, COUNT(*) FROM Premises GROUP BY premises_type ORDER BY COUNT(*) | nvbench |
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 d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
... | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11826) AND prescriptions.drug = 'propofol' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') ORDER BY p... | mimic_iii |
CREATE TABLE aircraft (
aid number(9,0),
name varchar2(30),
distance number(6,0)
)
CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
)
CREAT... | SELECT destination, COUNT(*) FROM flight GROUP BY destination ORDER BY COUNT(*) | nvbench |
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 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 = "Follicular cyst of ovary" AND prescriptions.route = "BUCCAL" | mimicsql_data |
CREATE TABLE checking (
custid number,
balance number
)
CREATE TABLE savings (
custid number,
balance number
)
CREATE TABLE accounts (
custid number,
name text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the checking balance of the accounts... | SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM savings)) | spider |
CREATE TABLE table_name_85 (
tyre VARCHAR,
chassis VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What tyre has a chassis of p57 p61?
| SELECT tyre FROM table_name_85 WHERE chassis = "p57 p61" | sql_create_context |
CREATE TABLE table_72336 (
"Colt model no." text,
"Name" text,
"Stock" text,
"Fire control" text,
"Rear sight" text,
"Forward assist" text,
"Case deflector" text,
"Barrel length" text,
"Barrel profile" text,
"Barrel twist" text,
"Hand guards" text,
"Bayonet Lug" text,
... | SELECT "Colt model no." FROM table_72336 WHERE "Bayonet Lug" = 'No' AND "Stock" = '2nd Generation' AND "Case deflector" = 'No' AND "Name" = 'GAU-5A/A' | wikisql |
CREATE TABLE table_68449 (
"Need" text,
"Being (qualities)" text,
"Having (things)" text,
"Doing (actions)" text,
"Interacting (settings)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the being qualities for having things of language, religio... | SELECT "Being (qualities)" FROM table_68449 WHERE "Having (things)" = 'language, religions, work, customs, values, norms' | wikisql |
CREATE TABLE table_30018460_1 (
country_territory VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many first place participants where from croatia?
| SELECT 3 AS rd_runner_up FROM table_30018460_1 WHERE country_territory = "Croatia" | sql_create_context |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT AVG(t_kc21.MED_AMOUT) FROM t_kc21 WHERE t_kc21.MED_ORG_DEPT_NM = '泌尿肿瘤科' AND t_kc21.IN_HOSP_DATE BETWEEN '2000-02-11' AND '2021-08-09' AND t_kc21.IN_DIAG_DIS_NM = '瘙痒症' AND t_kc21.CLINIC_TYPE = '住院' | css |
CREATE TABLE branch (
membership_amount INTEGER,
open_year VARCHAR,
city VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London.
| SELECT MIN(membership_amount), MAX(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London' | sql_create_context |
CREATE TABLE table_16457934_4 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the minimum of 60 -64?
| SELECT MIN(60 AS _to_64) FROM table_16457934_4 | sql_create_context |
CREATE TABLE table_45280 (
"Series Number" real,
"Number of Episodes" real,
"Original Air Date" real,
"DVD Region 2 release date" text,
"DVD Region 1 release date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the original air date of seri... | SELECT AVG("Original Air Date") FROM table_45280 WHERE "Series Number" = '10' | wikisql |
CREATE TABLE table_name_8 (
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which 2007 has a 2006 of A, and a Tournament of canada?
| SELECT 2007 FROM table_name_8 WHERE 2006 = "a" AND tournament = "canada" | sql_create_context |
CREATE TABLE table_203_98 (
id number,
"title" text,
"year" number,
"director" text,
"budget" text,
"gross (worldwide)" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- did true romance make more or less money than diabolique ?
| SELECT (SELECT "gross (worldwide)" FROM table_203_98 WHERE "title" = 'true romance') > (SELECT "gross (worldwide)" FROM table_203_98 WHERE "title" = 'diabolique') | squall |
CREATE TABLE table_2077192_2 (
italian VARCHAR,
english VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Italian word for the English word 'otter'?
| SELECT italian FROM table_2077192_2 WHERE english = "otter" | sql_create_context |
CREATE TABLE Project_outcomes (
project_id VARCHAR
)
CREATE TABLE Project_Staff (
staff_id VARCHAR,
role_code VARCHAR,
project_id VARCHAR
)
CREATE TABLE Staff_Roles (
role_description VARCHAR,
role_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided a... | SELECT T1.role_description, T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY COUNT(*) DESC LIMIT 1 | sql_create_context |
CREATE TABLE table_name_94 (
date VARCHAR,
pole_position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Date has a Pole Position of michael devaney?
| SELECT date FROM table_name_94 WHERE pole_position = "michael devaney" | sql_create_context |
CREATE TABLE table_name_46 (
to_par VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the to par that has jimmy hines as the player?
| SELECT to_par FROM table_name_46 WHERE player = "jimmy hines" | sql_create_context |
CREATE TABLE table_55942 (
"Rank" real,
"Team" text,
"Floor Exercise" real,
"Pommel Horse" real,
"Rings" real,
"Vault" real,
"Parallel Bars" real,
"Horizontal Bar" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is ... | SELECT COUNT("Total") FROM table_55942 WHERE "Vault" = '38.437' AND "Floor Exercise" < '37.524' | wikisql |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'ct scan - without contrast' AND DATETIME(treatment.treatmenttime) >= DATE... | eicu |
CREATE TABLE stadium (
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which stadium name contains the substring 'Bank'?
| SELECT name FROM stadium WHERE name LIKE "%Bank%" | sql_create_context |
CREATE TABLE table_22253 (
"Canton" text,
"Years of Kindergarten" real,
"Years of Kindergarten provided" text,
"Years of Kindergarten legally required" text,
"Length of Primary School" real,
"Length of mandatory Secondary School" real,
"Separate Secondary Schools?" text,
"Cooperative Sec... | SELECT "Integrated Secondary Schools?" FROM table_22253 WHERE "Canton" = 'Uri' | wikisql |
CREATE TABLE table_74778 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the away team when the home team scored... | SELECT "Away team" FROM table_74778 WHERE "Home team score" = '10.8 (68)' | wikisql |
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE date_day (
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AN... | atis |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype tex... | SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 22517 AND DATETIME(admissions.admittime) <= DATETIME(CURRENT_TIME(), '-2 year') | mimic_iii |
CREATE TABLE table_21436373_12 (
type_of_record VARCHAR,
result_games VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what type of record was made where result/games is 10 games (29,606 avg.)
| SELECT type_of_record FROM table_21436373_12 WHERE result_games = "10 games (29,606 avg.)" | sql_create_context |
CREATE TABLE table_41023 (
"City of license" text,
"Identifier" text,
"Frequency" text,
"Power" text,
"Class" text,
"RECNet" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which city has a C1 class and Identifier of CBCD-FM?
| SELECT "City of license" FROM table_41023 WHERE "Class" = 'c1' AND "Identifier" = 'cbcd-fm' | wikisql |
CREATE TABLE table_21042 (
"Poll Source" text,
"Dates administered" text,
"Democrat: Vivian Davis Figures" text,
"Republican: Jeff Sessions" text,
"Lead Margin" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On November 14, 2007, what are the Democr... | SELECT "Democrat: Vivian Davis Figures" FROM table_21042 WHERE "Dates administered" = 'November 14, 2007' | wikisql |
CREATE TABLE table_7980 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which location was the method decision (split)?
| SELECT "Location" FROM table_7980 WHERE "Method" = 'decision (split)' | wikisql |
CREATE TABLE table_63284 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"TV Time" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the time in week 3?
| SELECT "TV Time" FROM table_63284 WHERE "Week" = '3' | wikisql |
CREATE TABLE table_name_84 (
home__2nd_leg_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the 2nd leg score when atl tico tucum n played at home?
| SELECT 2 AS nd_leg FROM table_name_84 WHERE home__2nd_leg_ = "atlético tucumán" | sql_create_context |
CREATE TABLE table_203_694 (
id number,
"#" number,
"name" text,
"took office" text,
"left office" text,
"party" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which party had the most prime ministers ?
| SELECT "party" FROM table_203_694 GROUP BY "party" ORDER BY COUNT("name") DESC LIMIT 1 | squall |
CREATE TABLE table_name_49 (
kaz_hayashi VARCHAR,
bushi VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the Kaz Hayashi which has BUSHI of yang (9:43)
| SELECT kaz_hayashi FROM table_name_49 WHERE bushi = "yang (9:43)" | sql_create_context |
CREATE TABLE table_name_56 (
genre VARCHAR,
year_recorded VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What genre is the song recorded in 1926?
| SELECT genre FROM table_name_56 WHERE year_recorded = "1926" | sql_create_context |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2187" AND lab.label = "Creatinine, Urine" | mimicsql_data |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2174" AND diagnoses.long_title = "Ventricular septal defect" | mimicsql_data |
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | SELECT COUNT(*) FROM mzjzjlb WHERE YLJGDM = '0731148' AND JZKSRQ BETWEEN '2016-11-12' AND '2019-10-06' AND WDBZ > 0 | css |
CREATE TABLE table_25751274_2 (
rating VARCHAR,
share VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rating of the episode with a share of 4 and a rating/share (18-49) of 0.7/2?
| SELECT rating FROM table_25751274_2 WHERE share = 4 AND rating / SHARE(18 - 49) = 0.7 / 2 | 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 School_ID, ACC_Percent FROM basketball_match GROUP BY Team_Name | nvbench |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE R... | SELECT p.Id, p.Id AS "post_link", p.CreationDate, p.Score, COUNT(PostHistory.Id) AS HistCount FROM Tags JOIN PostTags ON Tags.Id = PostTags.TagId JOIN Posts AS p ON p.Id = PostTags.PostId JOIN PostHistory ON PostHistory.PostId = p.Id WHERE Tags.TagName IN ('python') AND PostHistory.PostHistoryTypeId = 10 AND p.ClosedDa... | sede |
CREATE TABLE table_203_171 (
id number,
"place\n(posicion)" number,
"team\n(equipo)" text,
"played\n(pj)" number,
"won\n(pg)" number,
"draw\n(pe)" number,
"lost\n(pp)" number,
"goals scored\n(gf)" number,
"goals conceded\n(gc)" number,
"+/-\n(dif.)" number,
"points\n(pts.)" n... | SELECT "team\n(equipo)" FROM table_203_171 ORDER BY "goals conceded\n(gc)" DESC LIMIT 1 | squall |
CREATE TABLE table_78436 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average Laps for a grid smaller than 17, and a Constructor of williams - bmw, driven by... | SELECT AVG("Laps") FROM table_78436 WHERE "Grid" < '17' AND "Constructor" = 'williams - bmw' AND "Driver" = 'jenson button' | wikisql |
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varch... | SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, flight WHERE (((flight.arrival_time <= 2230 AND flight.arrival_time >= 2130) AND city.city_code = airport_service.city_code AND city.city_name = 'SAN JOSE' AND flight.to_airport = airport_service.airport_code) AND airport.airport_code = 'LGA' AND fli... | atis |
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.Code, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter | nvbench |
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password VARCHAR(10),
personal_name VARCHAR(40),
middle_name VARCHAR(40),
family_name VARCHAR(40)
)
CREATE TABLE Courses (
course_id INTEGER,
author_... | SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_33425 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Stadium" text,
"Record" text,
"Box scores" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of the game later than we... | SELECT "Date" FROM table_33425 WHERE "Week" > '13' AND "Attendance" = '41,862' | wikisql |
CREATE TABLE table_59577 (
"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 is the score of the game with a tie no of 3?
| SELECT "Score" FROM table_59577 WHERE "Tie no" = '3' | wikisql |
CREATE TABLE table_50210 (
"Opposing Team" text,
"Against" real,
"Date" text,
"Venue" text,
"Round" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which round was played in the H Venue on 29 january 1949?
| SELECT "Round" FROM table_50210 WHERE "Venue" = 'h' AND "Date" = '29 january 1949' | wikisql |
CREATE TABLE table_10581 (
"Name" text,
"City" text,
"Height feet/m" text,
"Year" real,
"Period" text,
"Surpassed by" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the period for 1896?
| SELECT "Period" FROM table_10581 WHERE "Year" = '1896' | wikisql |
CREATE TABLE grapes (
id number,
grape text,
color text
)
CREATE TABLE wine (
no number,
grape text,
winery text,
appelation text,
state text,
name text,
year number,
price number,
score number,
cases number,
drink text
)
CREATE TABLE appellations (
no numbe... | SELECT T2.name, T2.score FROM grapes AS T1 JOIN wine AS T2 ON T1.grape = T2.grape WHERE T1.color = "White" | spider |
CREATE TABLE table_25421463_1 (
races INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the fewest amount of races in any season?
| SELECT MIN(races) FROM table_25421463_1 | sql_create_context |
CREATE TABLE endowment (
endowment_id number,
school_id number,
donator_name text,
amount number
)
CREATE TABLE budget (
school_id number,
year number,
budgeted number,
total_budget_percent_budgeted number,
invested number,
total_budget_percent_invested number,
budget_invest... | SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn' INTERSECT SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Triton' | spider |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE vitalperiodic (
vitalperio... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'cultures - urine')) AND STRFTIME('%y', cost.... | eicu |
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 mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '45531183' AND NOT mzjzjlb.JZLSH IN (SELECT JZLSH FROM jybgb WHERE BGRQ <= '2016-02-04') | css |
CREATE TABLE table_55829 (
"Episode" text,
"Airdate" text,
"Rating" real,
"Share" real,
"18-49 (Rating/Share)" text,
"Viewers (m)" real,
"Rank (#)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many vieweres for the episode with a share... | SELECT "Viewers (m)" FROM table_55829 WHERE "Share" = '1' AND "Rating" > '0.7000000000000001' AND "Rank (#)" = '100/102' | wikisql |
CREATE TABLE table_77844 (
"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 away team played against Footscray as the h... | SELECT "Away team" FROM table_77844 WHERE "Home team" = 'footscray' | wikisql |
CREATE TABLE table_name_92 (
persian VARCHAR,
romani VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Persian word(s) has the same meaning as the Romani word duj?
| SELECT persian FROM table_name_92 WHERE romani = "duj" | sql_create_context |
CREATE TABLE table_name_51 (
week INTEGER,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest week that has carolina panthers as the opponent?
| SELECT MAX(week) FROM table_name_51 WHERE opponent = "carolina panthers" | sql_create_context |
CREATE TABLE table_name_32 (
centerfold_model VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the Centerfold Model on 5-95?
| SELECT centerfold_model FROM table_name_32 WHERE date = "5-95" | sql_create_context |
CREATE TABLE table_16537783_2 (
parameter VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the 3rd stage for parameter of thrust
| SELECT 3 AS rd_stage FROM table_16537783_2 WHERE parameter = "Thrust" | sql_create_context |
CREATE TABLE table_73253 (
"Locale" text,
"Skip" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot Pct." real
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT MIN("PF") FROM table_73253 WHERE "Skip" = 'Rebecca Jean MacPhee' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.