instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_50 (
overs INTEGER,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest number of Overs for the Royal Challengers Bangalore?
| SELECT MIN(overs) FROM table_name_50 WHERE team = "royal challengers bangalore" | 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 SBBM, YQBH, YQMC FROM jyjgzbb WHERE JYZBLSH = '12467585755' | css |
CREATE TABLE table_31545 (
"Pick" text,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the nationality for rudolf vercik
| SELECT "Nationality" FROM table_31545 WHERE "Player" = 'rudolf vercik' | wikisql |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT MAX(demographic.days_stay) FROM demographic WHERE demographic.admityear >= "2182" | mimicsql_data |
CREATE TABLE table_56723 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"Nationality" text,
"Team" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the player from Illinois?
| SELECT "Player" FROM table_56723 WHERE "College" = 'illinois' | wikisql |
CREATE TABLE table_66672 (
"Name" text,
"Employed" text,
"Position held" text,
"Honour" text,
"Citation" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the person employed 1970 2005?
| SELECT "Name" FROM table_66672 WHERE "Employed" = '1970–2005' | 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 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 = '00922703' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM jyjgzbb WH... | css |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', icustays.intime)) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1561) AND icustays.outtime IS NULL | mimic_iii |
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 WHERE demographic.diagnosis = "GANGRENE" AND demographic.days_stay > "20" | mimicsql_data |
CREATE TABLE table_43062 (
"Date" text,
"Cover model" text,
"Centerfold model" text,
"Interview subject" text,
"20 Questions" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the Centerfold Model on 9-03?
| SELECT "Centerfold model" FROM table_43062 WHERE "Date" = '9-03' | wikisql |
CREATE TABLE table_62378 (
"Pick #" real,
"Player" text,
"Nationality" text,
"Position" text,
"NHL team" text,
"Team from" text,
"League from" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Player has a Team from of south shore kings?
| SELECT "Player" FROM table_62378 WHERE "Team from" = 'south shore kings' | wikisql |
CREATE TABLE table_1175 (
"School Board" text,
"Type" text,
"Language" text,
"Headquarters" text,
"Census Division(s) Served" text,
"Number of Elementary Schools" real,
"Number of Secondary Schools" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT "Headquarters" FROM table_1175 WHERE "School Board" = 'Renfrew County Catholic District School Board' | wikisql |
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adul... | SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE Student_Course_Registrations (
student_id INTEGER,
course_id INTEGER,
registration_date DATETIME
)
CREATE TABLE Addresses (
address_id INTEGER,
line_1 VARCHAR(80),
line_2 VARCHAR(80),
city VARCHAR(50),
zip_postcode CHAR(20),
state_province_county VARCHAR(50),
countr... | SELECT course_name, COUNT(*) FROM Students AS T1 JOIN Student_Course_Registrations AS T2 ON T1.student_id = T2.student_id JOIN Courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id | nvbench |
CREATE TABLE table_67796 (
"Date" text,
"Venue" text,
"Score" text,
"Competition" text,
"Match report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was the Competition of Friendly held?
| SELECT "Date" FROM table_67796 WHERE "Competition" = 'friendly' | wikisql |
CREATE TABLE table_name_69 (
date VARCHAR,
pitcher VARCHAR,
length VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date when the pitcher was Jason Marquis and the length was 410'?
| SELECT date FROM table_name_69 WHERE pitcher = "jason marquis" AND length = "410'" | sql_create_context |
CREATE TABLE head (
head_id number,
name text,
born_state text,
age number
)
CREATE TABLE department (
department_id number,
name text,
creation text,
ranking number,
budget_in_billions number,
num_employees number
)
CREATE TABLE management (
department_id number,
head_... | SELECT head_id, name FROM head WHERE name LIKE '%Ha%' | spider |
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 qtb.IN_DIAG_DIS_CD, qtb.IN_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_ID = '32023982' AND qtb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 3281.11) UNION SELECT gyb.IN_DIAG_DIS_CD, gyb.IN_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_ID = '32023982' AND gyb.MED_CLINIC_ID IN (SELECT t_kc... | css |
CREATE TABLE actor (
aid int,
gender text,
name text,
nationality text,
birth_city text,
birth_year int
)
CREATE TABLE director (
did int,
gender text,
name text,
nationality text,
birth_city text,
birth_year int
)
CREATE TABLE keyword (
id int,
keyword text
)
... | SELECT movie.title FROM actor, cast, movie WHERE actor.name = 'Kevin Spacey' AND cast.aid = actor.aid AND movie.mid = cast.msid | imdb |
CREATE TABLE files (
f_id number,
artist_name text,
file_size text,
duration text,
formats text
)
CREATE TABLE genre (
g_name text,
rating text,
most_popular_in text
)
CREATE TABLE song (
song_name text,
artist_name text,
country text,
f_id number,
genre_is text,
... | SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE "4:%" UNION SELECT song_name FROM song WHERE languages = "english" | spider |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TA... | SELECT LENGTH(Body) / 100, COUNT(*) FROM Posts WHERE PostTypeId = 2 GROUP BY LENGTH(Body) / 100 ORDER BY LENGTH(Body) / 100 | sede |
CREATE TABLE table_name_18 (
gold INTEGER,
total VARCHAR,
silver VARCHAR,
nation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of the gold medals for the nation of Great britain who had more than 8 silvers and a total of less than 61... | SELECT SUM(gold) FROM table_name_18 WHERE silver > 8 AND nation = "great britain" AND total < 61 | sql_create_context |
CREATE TABLE table_name_47 (
constructor VARCHAR,
laps VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What company was Constructor when there were 16 laps and grid was 9?
| SELECT constructor FROM table_name_47 WHERE laps = 16 AND grid = 9 | sql_create_context |
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
-- Using valid SQLite, answer the following questions fo... | SELECT Type, AVG(Tonnage) FROM ship GROUP BY Type ORDER BY Type DESC | nvbench |
CREATE TABLE table_name_59 (
model VARCHAR,
propulsion VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Model has hybrid propulsion?
| SELECT model FROM table_name_59 WHERE propulsion = "hybrid" | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost numbe... | SELECT patient.age FROM patient WHERE patient.uniquepid = '013-9268' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1 | eicu |
CREATE TABLE table_18741 (
"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 ... | SELECT "Team" FROM table_18741 WHERE "Game" = '20' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE zzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
K... | SELECT jybgb.SHSJ FROM hz_info JOIN zzmzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '24318631' AND jybgb.BGRQ BETWEEN '2001-02-17' AND '2007-... | css |
CREATE TABLE table_name_59 (
rank_points VARCHAR,
total VARCHAR,
score_points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the rank points when the score was 7 and the total was 15?
| SELECT rank_points FROM table_name_59 WHERE total = "15" AND score_points = "7" | sql_create_context |
CREATE TABLE table_name_25 (
round INTEGER,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average round for the record of 1-1?
| SELECT AVG(round) FROM table_name_25 WHERE record = "1-1" | sql_create_context |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
... | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... | advising |
CREATE TABLE table_68079 (
"Week" real,
"Date" text,
"Visiting Team" text,
"Final Score" text,
"Host Team" text,
"Stadium" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date had the Houston Texans as visitors?
| SELECT "Date" FROM table_68079 WHERE "Visiting Team" = 'houston texans' | wikisql |
CREATE TABLE station_company (
Station_ID int,
Company_ID int,
Rank_of_the_Year int
)
CREATE TABLE company (
Company_ID int,
Rank int,
Company text,
Headquarters text,
Main_Industry text,
Sales_billion real,
Profits_billion real,
Assets_billion real,
Market_Value real
)
... | SELECT Main_Industry, COUNT(Main_Industry) FROM company WHERE NOT Company_ID IN (SELECT Company_ID FROM station_company) GROUP BY Main_Industry ORDER BY COUNT(Main_Industry) DESC | nvbench |
CREATE TABLE table_28261 (
"AB - Angry boar" text,
"B - Bishop" text,
"BA - Running Bear" text,
"BB - Blind Bear" text,
"BC - Beast Cadet" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is ba - running bear where b - bishop is rn - running stag... | SELECT "BA - Running Bear" FROM table_28261 WHERE "B - Bishop" = 'RN - Running Stag' | wikisql |
CREATE TABLE diagnoses (
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 prescriptions... | 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_51976 (
"Nat." text,
"Name" text,
"Moving to" text,
"Type" text,
"Transfer window" text,
"Transfer fee" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What type is shown with a moving to of valenciennes?
| SELECT "Type" FROM table_51976 WHERE "Moving to" = 'valenciennes' | wikisql |
CREATE TABLE table_name_53 (
score VARCHAR,
to_par VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score for the To par of +1?
| SELECT score FROM table_name_53 WHERE to_par = "+1" | sql_create_context |
CREATE TABLE university (
school_id number,
school text,
location text,
founded number,
affiliation text,
enrollment number,
nickname text,
primary_conference text
)
CREATE TABLE basketball_match (
team_id number,
school_id number,
team_name text,
acc_regular_season text... | SELECT team_name FROM basketball_match ORDER BY all_home DESC | spider |
CREATE TABLE table_17265535_7 (
equation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the equation is 6 9 + 6 9 + 6, what is the 2nd throw?
| SELECT MAX(2 AS nd_throw) FROM table_17265535_7 WHERE equation = "6 × 9² + 6 × 9 + 6" | sql_create_context |
CREATE TABLE table_19948664_2 (
author___editor___source VARCHAR,
ranking_la__2_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the author/editor/source when the l.a. ranking was 1st?
| SELECT author___editor___source FROM table_19948664_2 WHERE ranking_la__2_ = "1st" | sql_create_context |
CREATE TABLE table_train_80 (
"id" int,
"mini_mental_state_examination_mmse" int,
"uncontrolled_diabetes" bool,
"glucose_6_phosphate_dehydrogenase_deficiency_g6pd" int,
"cornell_scale_for_depression_in_dementia_csdd" int,
"clinical_dementia_rating_cdr" float,
"age" float,
"NOUSE" float
)... | SELECT * FROM table_train_80 WHERE mini_mental_state_examination_mmse >= 21 | criteria2sql |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId n... | SELECT YEAR(p.CreationDate) AS year, SUM(1) AS answerCount, 'Cassandra Answers' AS type FROM PostTags AS pt INNER JOIN Posts AS p ON p.Id = pt.PostId WHERE pt.TagId = 34113 AND p.PostTypeId = 2 GROUP BY YEAR(p.CreationDate) UNION SELECT YEAR(p.CreationDate) AS year, SUM(1) AS questionCount, 'HBase Questions' AS type FR... | sede |
CREATE TABLE table_name_40 (
power VARCHAR,
identifier VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Power has a CBLI Identifier?
| SELECT power FROM table_name_40 WHERE identifier = "cbli" | sql_create_context |
CREATE TABLE table_79277 (
"Constituency number" text,
"Name" text,
"Reserved for ( SC / ST /None)" text,
"District" text,
"Number of electorates (2009)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Beohari's highest number of electorates?... | SELECT MAX("Number of electorates (2009)") FROM table_79277 WHERE "Name" = 'beohari' | wikisql |
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 t_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '孙子怡' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 3407.67) | css |
CREATE TABLE table_name_58 (
renamed VARCHAR,
ship VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the original name of the ship 'Ajax'?
| SELECT renamed FROM table_name_58 WHERE ship = "ajax" | sql_create_context |
CREATE TABLE table_name_45 (
attendance INTEGER,
opponent VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the average Attendance that has the Opponent of new orleans saints, and the Week larger than 12?
| SELECT AVG(attendance) FROM table_name_45 WHERE opponent = "new orleans saints" AND week > 12 | 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 SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid... | eicu |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,... | SELECT COUNT(*) FROM hz_info JOIN mzjzjlb 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 person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND person_in... | css |
CREATE TABLE table_1539 (
"Place" real,
"Weightlifter" text,
"Body weight" text,
"one hand snatch" text,
"one hand clean & jerk" text,
"Press" text,
"Snatch" text,
"1." text,
"2." text,
"3." text,
"Total" text
)
-- Using valid SQLite, answer the following questions for the ... | SELECT "3." FROM table_1539 WHERE "Weightlifter" = 'M. Van der Goten ( BEL )' | wikisql |
CREATE TABLE table_73586 (
"Tournament" text,
"Games played" real,
"Points per game" text,
"Rebounds per game" text,
"Assists per game" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many assists per game in the tournament 2010 fiba world champi... | SELECT "Assists per game" FROM table_73586 WHERE "Tournament" = '2010 FIBA World Championship' | wikisql |
CREATE TABLE table_name_61 (
tv_season VARCHAR,
season VARCHAR,
households__in_millions_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which TV season has a Season smaller than 8, and a Household (in millions) of 15.92 (17.1 rating)?
| SELECT tv_season FROM table_name_61 WHERE season < 8 AND households__in_millions_ = "15.92 (17.1 rating)" | sql_create_context |
CREATE TABLE physician (
name VARCHAR,
employeeid VARCHAR
)
CREATE TABLE procedures (
code VARCHAR,
cost INTEGER
)
CREATE TABLE trained_in (
physician VARCHAR,
treatment VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the physicians who... | SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000 | sql_create_context |
CREATE TABLE table_28418916_3 (
opponents_head_coach VARCHAR,
fbs_opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many head coaches did Kent state golden flashes have?
| SELECT COUNT(opponents_head_coach) FROM table_28418916_3 WHERE fbs_opponent = "Kent State Golden Flashes" | sql_create_context |
CREATE TABLE table_name_13 (
pick__number INTEGER,
cfl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the highest pick number for the Hamilton tiger-cats?
| SELECT MAX(pick__number) FROM table_name_13 WHERE cfl_team = "hamilton tiger-cats" | sql_create_context |
CREATE TABLE table_train_39 (
"id" int,
"active_infection" bool,
"sepsis" bool,
"organ_failure" bool,
"septic_shock" bool,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- have sepsis as defined by an infection together w... | SELECT * FROM table_train_39 WHERE sepsis = 1 | criteria2sql |
CREATE TABLE table_name_77 (
label VARCHAR,
catalogue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the label for catalogue 7200222?
| SELECT label FROM table_name_77 WHERE catalogue = "7200222" | sql_create_context |
CREATE TABLE enzyme (
id number,
name text,
location text,
product text,
chromosome text,
omim number,
porphyria text
)
CREATE TABLE medicine_enzyme_interaction (
enzyme_id number,
medicine_id number,
interaction_type text
)
CREATE TABLE medicine (
id number,
name text,... | SELECT T1.id, T1.name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2 | spider |
CREATE TABLE table_283203_1 (
capacity VARCHAR,
club VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the capacity for the Home Venue of the New Zealand Breakers club?
| SELECT capacity FROM table_283203_1 WHERE club = "New Zealand Breakers" | 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.IN_HOSP_DAYS) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '1952480' AND t_kc21.IN_HOSP_DATE BETWEEN '2005-03-24' AND '2014-08-29' | css |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT Founder, AVG(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder | 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 T1.name FROM employee AS T1 JOIN certificate AS T2 ON T1.eid = T2.eid JOIN aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800" | spider |
CREATE TABLE table_name_78 (
outgoing_manager VARCHAR,
manner_of_departure VARCHAR,
replaced_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Outgoing manager left at his end of tenure as caretaker and was Replaced by Jesper Hansen?
| SELECT outgoing_manager FROM table_name_78 WHERE manner_of_departure = "end of tenure as caretaker" AND replaced_by = "jesper hansen" | sql_create_context |
CREATE TABLE table_name_84 (
goal VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Goal that has the Result of 2-0?
| SELECT goal FROM table_name_84 WHERE result = "2-0" | sql_create_context |
CREATE TABLE table_56397 (
"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 did the away team score when playing South ... | SELECT "Away team score" FROM table_56397 WHERE "Home team" = 'south melbourne' | wikisql |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
s... | SELECT COUNT(*) > 0 FROM course WHERE department = 'EECS' AND has_lab = 'Y' AND number = 487 | advising |
CREATE TABLE table_name_31 (
time INTEGER,
year VARCHAR,
event VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the highest time for the 1995 200 metres event?
| SELECT MAX(time) FROM table_name_31 WHERE year = 1995 AND event = "200 metres" | sql_create_context |
CREATE TABLE table_name_50 (
week_15__final__dec_3 VARCHAR,
week_12_nov_13 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was Week 15 when Week 12 was Notre Dame (7-2)?
| SELECT week_15__final__dec_3 FROM table_name_50 WHERE week_12_nov_13 = "notre dame (7-2)" | sql_create_context |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '75810879' AND MED_SER_ORG_NO = '2045056' AND OUT_DIAG_DIS_NM LIKE '%皮炎%' | css |
CREATE TABLE table_204_295 (
id number,
"model" text,
"origin" text,
"type" text,
"version" text,
"in service" number,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which country has more vehicles listed ?
| SELECT "origin" FROM table_204_295 GROUP BY "origin" ORDER BY COUNT("model") DESC LIMIT 1 | squall |
CREATE TABLE table_name_96 (
home VARCHAR,
decision VARCHAR,
visitor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the home team at the game with a decision of Mason and a visiting team of Dallas?
| SELECT home FROM table_name_96 WHERE decision = "mason" AND visitor = "dallas" | sql_create_context |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE offering_instructor (
... | SELECT DISTINCT course_offering.end_time, course_offering.section_number, course_offering.start_time FROM course, course_offering, semester WHERE course_offering.start_time > '10:00' AND course.course_id = course_offering.course_id AND course.department = 'UKRAINE' AND course.number = 252 AND semester.semester = 'WN' A... | advising |
CREATE TABLE table_name_54 (
name VARCHAR,
year VARCHAR,
high_school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Name with a Year of junior, and a High School with wheatley?
| SELECT name FROM table_name_54 WHERE year = "junior" AND high_school = "wheatley" | sql_create_context |
CREATE TABLE table_1105 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team did Derek Black Play for prior to being drafted?
| SELECT "College/junior/club team" FROM table_1105 WHERE "Player" = 'Derek Black' | 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 demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.subject_id = "17772" | mimicsql_data |
CREATE TABLE table_train_207 (
"id" int,
"anemia" bool,
"hemoglobin_a1c_hba1c" float,
"diabetic" string,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- bmi < 25 kg / m2
| SELECT * FROM table_train_207 WHERE body_mass_index_bmi < 25 | criteria2sql |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T2.Name, AVG(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name | nvbench |
CREATE TABLE table_2548 (
"High School" text,
"Type" text,
"Established" real,
"Enrollment" real,
"Mascot" text,
"WIAA Classification" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What wiaa classifications does vancouver itech prepratory have?... | SELECT "WIAA Classification" FROM table_2548 WHERE "High School" = 'Vancouver iTech Prepratory' | wikisql |
CREATE TABLE table_name_61 (
losses VARCHAR,
played INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many losses had a played number that was more than 34?
| SELECT COUNT(losses) FROM table_name_61 WHERE played > 34 | sql_create_context |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE l... | SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'insulin lispro (humalog) injection 0-20 units' AND patient.uniquepid = '002-38644' AND STRFTIME('%y-%m', medication.drugs... | eicu |
CREATE TABLE table_name_1 (
year VARCHAR,
director VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the year of the TV series directed by Soroush Sehat?
| SELECT year FROM table_name_1 WHERE director = "soroush sehat" | sql_create_context |
CREATE TABLE table_10015132_2 (
position VARCHAR,
years_in_toronto VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which positions were in Toronto in 2004?
| SELECT position FROM table_10015132_2 WHERE years_in_toronto = "2004" | sql_create_context |
CREATE TABLE table_name_47 (
score VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the Away Team is Arsenal what is the Score?
| SELECT score FROM table_name_47 WHERE away_team = "arsenal" | sql_create_context |
CREATE TABLE game (
stadium_id int,
id int,
Season int,
Date text,
Home_team text,
Away_team text,
Score text,
Competition text
)
CREATE TABLE stadium (
id int,
name text,
Home_Games int,
Average_Attendance real,
Total_Attendance real,
Capacity_Percentage real
)
... | SELECT Away_team, COUNT(Away_team) FROM game GROUP BY Away_team | nvbench |
CREATE TABLE table_52438 (
"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 did the away team Carlton score?
| SELECT "Away team score" FROM table_52438 WHERE "Away team" = 'carlton' | wikisql |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose... | SELECT MAX(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'mycs fng unsp xtrndl org') AND STRFTIME('%y', diagnoses_icd.charttime) = '2103' GROUP BY STRFTIME('%y-... | mimic_iii |
CREATE TABLE table_28858 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times was the result was re-elected and the party was anti-maso... | SELECT COUNT("First elected") FROM table_28858 WHERE "Result" = 'Re-elected' AND "Party" = 'Anti-Masonic' AND "District" = 'Pennsylvania 24' | wikisql |
CREATE TABLE table_name_46 (
athlete VARCHAR,
rank VARCHAR,
nation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the athlete for bulgaria with rank less than 22
| SELECT athlete FROM table_name_46 WHERE rank < 22 AND nation = "bulgaria" | sql_create_context |
CREATE TABLE table_4382 (
"Medal" text,
"Name" text,
"Games" text,
"Sport" text,
"Event" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the games for men's 5000 metres
| SELECT "Games" FROM table_4382 WHERE "Event" = 'men''s 5000 metres' | wikisql |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE ... | SELECT COUNT(*) > 0 FROM course, program_course WHERE course.department = 'EDUC' AND course.number = 831 AND program_course.category LIKE '%Core%' AND program_course.course_id = course.course_id | advising |
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
a... | 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, fare, flight, flight_fare WHERE ((NOT fare.round_trip_cost IS NULL AND flight_fare.fare_id = fare.fare_id AND flight.departure_time > 2000 AND flight.flight_id = flight_fare.... | atis |
CREATE TABLE table_204_173 (
id number,
"rank" number,
"group" text,
"name" text,
"nationality" text,
"2.05" text,
"2.15" text,
"2.19" text,
"2.23" text,
"2.26" text,
"result" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables prov... | SELECT "name" FROM table_204_173 WHERE id = (SELECT id FROM table_204_173 WHERE "name" = 'ivan ukhov') + 1 | squall |
CREATE TABLE table_61691 (
"Date From" text,
"Date To" text,
"Position" text,
"Name" text,
"From" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date for Liverpool, and player Robbie Threlfall?
| SELECT "Date From" FROM table_61691 WHERE "From" = 'liverpool' AND "Name" = 'robbie threlfall' | wikisql |
CREATE TABLE table_name_13 (
number_of_electorates__2009_ VARCHAR,
constituency_number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of electorates (2009) for Constituency number 182?
| SELECT number_of_electorates__2009_ FROM table_name_13 WHERE constituency_number = "182" | sql_create_context |
CREATE TABLE table_9846 (
"Volume:Issue" text,
"Issue Date(s)" text,
"Weeks on Top" text,
"Song" text,
"Artist" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many weeks on top was the single from Savage Garden?
| SELECT "Weeks on Top" FROM table_9846 WHERE "Artist" = 'savage garden' | wikisql |
CREATE TABLE table_56684 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which score has a Date of november 2?
| SELECT "Score" FROM table_56684 WHERE "Date" = 'november 2' | 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 demographic.ethnicity = "WHITE" AND lab.label = "RBC" | mimicsql_data |
CREATE TABLE projects (
project_id number,
project_details text
)
CREATE TABLE statements (
statement_id number,
statement_details text
)
CREATE TABLE accounts (
account_id number,
statement_id number,
account_details text
)
CREATE TABLE ref_document_types (
document_type_code text,
... | SELECT T2.budget_type_code, T2.budget_type_description, T1.document_id FROM documents_with_expenses AS T1 JOIN ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code | spider |
CREATE TABLE host (
host_id number,
name text,
nationality text,
age text
)
CREATE TABLE party_host (
party_id number,
host_id number,
is_main_in_charge others
)
CREATE TABLE party (
party_id number,
party_theme text,
location text,
first_year text,
last_year text,
... | SELECT nationality FROM host WHERE age > 45 INTERSECT SELECT nationality FROM host WHERE age < 35 | spider |
CREATE TABLE table_name_14 (
points INTEGER,
date VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average Points, when Date is 'February 2', and when Attendance is less than 16,874?
| SELECT AVG(points) FROM table_name_14 WHERE date = "february 2" AND attendance < 16 OFFSET 874 | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.