instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE outputevents (
... | SELECT inputevents_cv.charttime 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 = 3277)) AND DATETIME(inputevents_cv.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 's... | mimic_iii |
CREATE TABLE table_30013 (
"Series #" real,
"Episode #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which episodes did Katie Palmer write?
| SELECT "Title" FROM table_30013 WHERE "Written by" = 'Katie Palmer' | wikisql |
CREATE TABLE table_52183 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the attendance for week larger than 10 and result of l 22-21
| SELECT "Attendance" FROM table_52183 WHERE "Week" > '10' AND "Result" = 'l 22-21' | wikisql |
CREATE TABLE table_40336 (
"Year" text,
"GP/GS" text,
"Shots" real,
"Goals" real,
"Assists" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Shots with a Point that is larger than 32?
| SELECT MIN("Shots") FROM table_40336 WHERE "Points" > '32' | wikisql |
CREATE TABLE table_43032 (
"Maximum Ceiling Temperature" text,
"Temperature Rating" text,
"Temperature Classification" text,
"Color Code (with Fusible Link)" text,
"Glass Bulb Color" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the tempera... | SELECT "Temperature Rating" FROM table_43032 WHERE "Temperature Classification" = 'intermediate' | wikisql |
CREATE TABLE table_13899 (
"Heat" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many heats does Julia Wilkinson have?
| SELECT COUNT("Heat") FROM table_13899 WHERE "Name" = 'julia wilkinson' | wikisql |
CREATE TABLE table_39753 (
"Office" text,
"Democratic ticket" text,
"Republican ticket" text,
"Socialist ticket" text,
"Workers ticket" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Office when the Republican ticket shows seymour lowman... | SELECT "Office" FROM table_39753 WHERE "Republican ticket" = 'seymour lowman' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.short_title = "Opioid dependence-contin" | mimicsql_data |
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Student... | SELECT date_test_taken, COUNT(date_test_taken) FROM Student_Tests_Taken WHERE test_result = "Pass" GROUP BY date_test_taken ORDER BY COUNT(date_test_taken) DESC | nvbench |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE mzjzjlb.JZZDSM = '器质性精神综合征' AND jyjgzbb.JCZBMC = '同型半胱氨酸' | css |
CREATE TABLE personfriend (
name text,
friend text,
year number
)
CREATE TABLE person (
name text,
age number,
city text,
gender text,
job text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the person who has exactly one friend.
| SELECT name FROM personfriend GROUP BY name HAVING COUNT(*) = 1 | spider |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CRE... | 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 = 'MILWAUKEE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST.... | atis |
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Courses... | SELECT login_name, gender_mf FROM Course_Authors_and_Tutors ORDER BY personal_name | nvbench |
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 MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '4821131' AND gwyjzb.OUT_DIAG_DIS_CD = 'T22.309' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '4821131' AND fgwyjzb.OUT_D... | css |
CREATE TABLE table_name_75 (
position INTEGER,
drawn VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- At what average position is the drawn 9 and the points greater than 25?
| SELECT AVG(position) FROM table_name_75 WHERE drawn = 9 AND points > 25 | sql_create_context |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT 'http://meta.judaism.stackexchange.com/a/' + CAST(Id AS TEXT) + ' ' FROM Posts WHERE (Body LIKE '%alt text%' OR Body LIKE '%enter image description here%') AND (Title IS NULL OR NOT Title LIKE '%alt text%') ORDER BY Id | sede |
CREATE TABLE table_19018191_5 (
l_apps VARCHAR,
total_g VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of apps for total g is 8
| SELECT COUNT(l_apps) FROM table_19018191_5 WHERE total_g = 8 | sql_create_context |
CREATE TABLE table_30253 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many pick# for CFL team of Toronto Argonauts?
| SELECT COUNT("Pick #") FROM table_30253 WHERE "CFL Team" = 'Toronto Argonauts' | wikisql |
CREATE TABLE table_47624 (
"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.
-- What event had the opponent Ryan Bow?
| SELECT "Event" FROM table_47624 WHERE "Opponent" = 'ryan bow' | wikisql |
CREATE TABLE table_79783 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the record 27-25?
| SELECT "Date" FROM table_79783 WHERE "Record" = '27-25' | wikisql |
CREATE TABLE table_name_2 (
drawn VARCHAR,
cambridge_united_career VARCHAR,
lost VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many draws have a Cambridge United career of 2008 2009 and less than 13 losses?
| SELECT COUNT(drawn) FROM table_name_2 WHERE cambridge_united_career = "2008–2009" AND lost < 13 | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "5679" AND prescriptions.drug_type = "MAIN" | mimicsql_data |
CREATE TABLE table_47995 (
"Year" real,
"Network" text,
"Title" text,
"Notes" text,
"Language" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the notes for Happy Camp?
| SELECT "Notes" FROM table_47995 WHERE "Title" = 'happy camp' | wikisql |
CREATE TABLE table_203_724 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many countries do not have any gold medals ?
| SELECT COUNT("nation") FROM table_203_724 WHERE "gold" = 0 | squall |
CREATE TABLE organisation_types (
organisation_type text,
organisation_type_description text
)
CREATE TABLE grants (
grant_id number,
organisation_id number,
grant_amount number,
grant_start_date time,
grant_end_date time,
other_details text
)
CREATE TABLE documents (
document_id n... | SELECT T1.outcome_description FROM research_outcomes AS T1 JOIN project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint' | spider |
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 WHERE demographic.ethnicity = "WHITE" AND demographic.age < "49" | mimicsql_data |
CREATE TABLE table_71338 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which opponent led to a 56-59 record?
| SELECT "Opponent" FROM table_71338 WHERE "Record" = '56-59' | wikisql |
CREATE TABLE table_38377 (
"Team" text,
"Manufacturer" text,
"Car model" text,
"Engine" text,
"Driver" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Car Model has the Manufacturer of Saab, and Driver Dean Randle?
| SELECT "Car model" FROM table_38377 WHERE "Manufacturer" = 'saab' AND "Driver" = 'dean randle' | wikisql |
CREATE TABLE table_name_39 (
location VARCHAR,
years_in_gfl VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the location where the Years in GFL was 1988-?
| SELECT location FROM table_name_39 WHERE years_in_gfl = "1988-" | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.dod_year <= "2174.0" | mimicsql_data |
CREATE TABLE table_30555 (
"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.
-- Which team drafted Ron Annear?
| SELECT "NHL team" FROM table_30555 WHERE "Player" = 'Ron Annear' | wikisql |
CREATE TABLE table_name_62 (
place VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where did Jay Haas place?
| SELECT place FROM table_name_62 WHERE player = "jay haas" | sql_create_context |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(DEPARTMENT_ID) | nvbench |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2174.0" AND lab.fluid = "Pleural" | mimicsql_data |
CREATE TABLE table_74098 (
"Institution" text,
"Location" text,
"Founded" real,
"Affiliation" text,
"Enrollment" real,
"Team Nickname" text,
"Primary conference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many primary conferences wer... | SELECT COUNT("Primary conference") FROM table_74098 WHERE "Location" = 'Allendale, Michigan' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age >= 60) AND DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY... | eicu |
CREATE TABLE table_25740774_1 (
position VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many positions are shown for the 2010 season?
| SELECT COUNT(position) FROM table_25740774_1 WHERE season = 2010 | sql_create_context |
CREATE TABLE table_203_478 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- when was their second win ?
| SELECT "date" FROM table_203_478 WHERE "result" = 'w' AND "date" > (SELECT "date" FROM table_203_478 WHERE "result" = 'w' ORDER BY "date" LIMIT 1) ORDER BY "date" LIMIT 1 | squall |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length in... | SELECT DISTINCT airline.airline_code FROM airline, 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 = 'TORONTO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_n... | atis |
CREATE TABLE table_204_713 (
id number,
"rank" number,
"bib" number,
"athlete" text,
"country" text,
"time" text,
"deficit" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- did marcus hellner or jean marc gaillard rank tenth ?
| SELECT "athlete" FROM table_204_713 WHERE "rank" = 10 | squall |
CREATE TABLE table_203_865 (
id number,
"place" number,
"athlete" text,
"nation" text,
"best mark" text,
"throw 1" number,
"throw 2" number,
"throw 3" number,
"throw 4" number,
"throw 5" number,
"throw 6" number
)
-- Using valid SQLite, answer the following questions for th... | SELECT "athlete" FROM table_203_865 ORDER BY "place" LIMIT 1 | squall |
CREATE TABLE table_65475 (
"School" text,
"Location" text,
"Mascot" text,
"Enrollment" real,
"IHSAA Class" text,
"County" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What counties mascot are the Red Ramblers?
| SELECT "County" FROM table_65475 WHERE "Mascot" = 'red ramblers' | wikisql |
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 text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "6" AND lab."CATEGORY" = "Hematology" | mimicsql_data |
CREATE TABLE table_name_94 (
election_date VARCHAR,
member VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the election date for the electorate of member charles brown category:articles with hcards?
| SELECT election_date FROM table_name_94 WHERE member = "charles brown category:articles with hcards" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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... | SELECT demographic.admission_location, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "98220" | mimicsql_data |
CREATE TABLE ref_incident_type (
incident_type_code text,
incident_type_description text
)
CREATE TABLE teachers (
teacher_id number,
address_id number,
first_name text,
middle_name text,
last_name text,
gender text,
cell_mobile_number text,
email_address text,
other_details... | SELECT T1.line_1, AVG(T2.monthly_rental) FROM addresses AS T1 JOIN student_addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id | spider |
CREATE TABLE table_19517448_3 (
yards_per_attempt VARCHAR,
total_yards VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many yards per attempt were there when total yards were 513?
| SELECT yards_per_attempt FROM table_19517448_3 WHERE total_yards = "513" | sql_create_context |
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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CR... | SELECT admissions.age FROM admissions WHERE admissions.subject_id = 1258 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1 | mimic_iii |
CREATE TABLE table_20370 (
"N\u00b0" real,
"Television service" text,
"Country" text,
"Language" text,
"Content" text,
"DAR" text,
"HDTV" text,
"Package/Option" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many values of HDTV apply... | SELECT COUNT("HDTV") FROM table_20370 WHERE "Television service" = 'Elite Shopping TV' | wikisql |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
Revision... | SELECT Name, YEAR(p.CreationDate) AS Year, MONTH(p.CreationDate) AS Month, COUNT(*) AS Posts, p.CommentCount AS CommentCount, p.Id AS ID FROM Posts AS p CROSS JOIN (VALUES ('C')) AS Language(Name) WHERE (SUBSTRING(p.Body, 0, STR_POSITION(p.Body, CHAR(10))) LIKE '%_>,\_' + name + ',_:\%') GROUP BY Name, YEAR(p.CreationD... | sede |
CREATE TABLE table_name_95 (
tournament VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Tournament had a Score of 4 6, 6 7, 3 6?
| SELECT tournament FROM table_name_95 WHERE score = "4–6, 6–7, 3–6" | sql_create_context |
CREATE TABLE table_name_75 (
position VARCHAR,
school_club_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position is listed for the nebraska team?
| SELECT position FROM table_name_75 WHERE school_club_team = "nebraska" | sql_create_context |
CREATE TABLE table_name_11 (
prize VARCHAR,
winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the prize for winner benny spindler?
| SELECT prize FROM table_name_11 WHERE winner = "benny spindler" | sql_create_context |
CREATE TABLE table_name_66 (
date VARCHAR,
sport VARCHAR,
record VARCHAR,
time__seconds_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date, when the Record is, 'track', when the Time (seconds) is longer than 43.564, and when the Sport i... | SELECT date FROM table_name_66 WHERE record = "track" AND time__seconds_ > 43.564 AND sport = "luge - women's singles" | sql_create_context |
CREATE TABLE table_name_37 (
laps INTEGER,
time_retired VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the highest laps for time/retired of engine and grid of 5
| SELECT MAX(laps) FROM table_name_37 WHERE time_retired = "engine" AND grid = 5 | sql_create_context |
CREATE TABLE table_78419 (
"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.
-- In the game where the home team scored 15.17 (10... | SELECT "Away team" FROM table_78419 WHERE "Home team score" = '15.17 (107)' | wikisql |
CREATE TABLE table_name_58 (
score VARCHAR,
opposition VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What score has Leicestershire as the opponent after 1906?
| SELECT score FROM table_name_58 WHERE opposition = "leicestershire" AND year > 1906 | sql_create_context |
CREATE TABLE procedures (
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
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.diagnosis = "LEFT INTERNAL JUGULAR VEIN THROMBOSIS;LEFT ARM EDEMA" | mimicsql_data |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id numbe... | SELECT (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 = 28959) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.item... | mimic_iii |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE admissions (
row_id numb... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'free skin graft nec')) AND STRFTIME('%y', cost.chargetime... | mimic_iii |
CREATE TABLE claims_processing_stages (
claim_status_description VARCHAR,
claim_status_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the description of the claim status 'Open'?
| SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = "Open" | sql_create_context |
CREATE TABLE table_name_45 (
name VARCHAR,
shoulder VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the gun with a shoulder that measures 10.688 (.420)?
| SELECT name FROM table_name_45 WHERE shoulder = "10.688 (.420)" | sql_create_context |
CREATE TABLE table_name_10 (
d_47 VARCHAR,
d_42 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the D 47 which has D 42 of d 22
| SELECT d_47 FROM table_name_10 WHERE d_42 = "d 22" | sql_create_context |
CREATE TABLE table_12962773_5 (
height VARCHAR,
position VARCHAR,
current_club VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the height with position being forward and current club being real madrid
| SELECT height FROM table_12962773_5 WHERE position = "Forward" AND current_club = "Real Madrid" | sql_create_context |
CREATE TABLE table_17714 (
"Name of System" text,
"Location" text,
"Traction Type" text,
"Date (From)" text,
"Date (To)" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the date (from) where the notes are apeldoornsche tramw... | SELECT "Date (From)" FROM table_17714 WHERE "Notes" = 'Apeldoornsche Tramweg-Maatschappij' | wikisql |
CREATE TABLE airlines (
alid number,
name text,
iata text,
icao text,
callsign text,
country text,
active text
)
CREATE TABLE airports (
apid number,
name text,
city text,
country text,
x number,
y number,
elevation number,
iata text,
icao text
)
CREATE ... | SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States') | spider |
CREATE TABLE table_33661 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text,
"Position in table" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is t... | SELECT "Replaced by" FROM table_33661 WHERE "Team" = 'bolton wanderers' | wikisql |
CREATE TABLE table_48108 (
"Rank" real,
"Title" text,
"Studio" text,
"Director" text,
"Worldwide Gross" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average rank for the film directed by michael bay?
| SELECT AVG("Rank") FROM table_48108 WHERE "Director" = 'michael bay' | wikisql |
CREATE TABLE table_75789 (
"Date" text,
"Time" text,
"Home" text,
"Away" text,
"Score" text,
"Ground" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who has the Home Score of 52-54?
| SELECT "Home" FROM table_75789 WHERE "Score" = '52-54' | wikisql |
CREATE TABLE table_51014 (
"Constituency" text,
"Electorate" real,
"Votes" real,
"Turnout" real,
"Spoilt" real,
"Percent Yes" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE AVERAGE VOTE FOR DUBLIN SOUTH, AND SPOILT SMALLER THAN 3,387... | SELECT AVG("Votes") FROM table_51014 WHERE "Constituency" = 'dublin south' AND "Spoilt" < '3,387' | wikisql |
CREATE TABLE table_70316 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Blue Jays lowest attendance when their record was 52-48?
| SELECT MIN("Attendance") FROM table_70316 WHERE "Record" = '52-48' | wikisql |
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.short_title = "Aortocor bypas-2 cor art" | mimicsql_data |
CREATE TABLE table_name_9 (
date VARCHAR,
game_site VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Date was the Game at Griffith Stadium?
| SELECT date FROM table_name_9 WHERE game_site = "griffith stadium" | sql_create_context |
CREATE TABLE table_49416 (
"Game" real,
"November" real,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the earliest day in November with a record of 15-7-1?
| SELECT MIN("November") FROM table_49416 WHERE "Record" = '15-7-1' | wikisql |
CREATE TABLE table_name_87 (
position VARCHAR,
overall VARCHAR,
college VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the position with an overall less than 128 for Brigham Young college?
| SELECT position FROM table_name_87 WHERE overall < 128 AND college = "brigham young" | sql_create_context |
CREATE TABLE table_name_40 (
opponent VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What opponent has December 6, 1964 as the date?
| SELECT opponent FROM table_name_40 WHERE date = "december 6, 1964" | sql_create_context |
CREATE TABLE party (
party_id number,
party_theme text,
location text,
first_year text,
last_year text,
number_of_hosts number
)
CREATE TABLE host (
host_id number,
name text,
nationality text,
age text
)
CREATE TABLE party_host (
party_id number,
host_id number,
is... | SELECT nationality FROM host WHERE age > 45 INTERSECT SELECT nationality FROM host WHERE age < 35 | spider |
CREATE TABLE nuclear_power_plants (
id text,
name text,
latitude text,
longitude text,
country text,
status text,
reactortype text,
reactormodel text,
constructionstartat text,
operationalfrom text,
operationalto text,
capacity text,
lastupdatedat text,
source tex... | SELECT longitude, latitude FROM nuclear_power_plants WHERE reactortype = "BWR" ORDER BY constructionstartat LIMIT 1 | geonucleardata |
CREATE TABLE table_29712 (
"Conference" text,
"Old membership total" real,
"New membership total" real,
"Net change" text,
"Members added" real,
"Members lost" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the new membership total at t... | SELECT "New membership total" FROM table_29712 WHERE "Conference" = 'NCHC (men only)' | wikisql |
CREATE TABLE table_name_65 (
home_team VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Home team is on Wednesday, 25 february 1998?
| SELECT home_team FROM table_name_65 WHERE date = "wednesday, 25 february 1998" | sql_create_context |
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
end_station_name TEXT,
end_station... | SELECT date, COUNT(date) FROM weather WHERE max_temperature_f > 85 GROUP BY date ORDER BY date DESC | nvbench |
CREATE TABLE table_name_60 (
score VARCHAR,
partner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score when the partner was arnaud cl ment?
| SELECT score FROM table_name_60 WHERE partner = "arnaud clément" | sql_create_context |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT t2.drug FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 58649 AND procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = ... | mimic_iii |
CREATE TABLE table_1108394_6 (
staten_island VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the republican candidate in 2013 when Staten Island was 451?
| SELECT 2013 AS _republican_primary FROM table_1108394_6 WHERE staten_island = "451" | sql_create_context |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChang... | SELECT MIN(a.OwnerUserId), COUNT(a.Id) FROM Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId INNER JOIN PostTags AS pt ON pt.PostId = q.Id WHERE NOT a.OwnerUserId IS NULL AND a.PostTypeId = 2 AND a.Score > @MinVoteCount AND pt.TagId = @StartTagId GROUP BY a.OwnerUserId | sede |
CREATE TABLE team (
year number,
league_id text,
team_id text,
franchise_id text,
div_id text,
rank number,
g number,
ghome number,
w number,
l number,
div_win text,
wc_win text,
lg_win text,
ws_win text,
r number,
ab number,
h number,
double numbe... | SELECT T2.name, T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE table_66849 (
"Vehicle Flight #" text,
"Date" text,
"Pilot" text,
"Mach" real,
"Velocity (km/h)" real,
"Altitude (ft)" real,
"Duration" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest altitude of the flight wit... | SELECT MIN("Altitude (ft)") FROM table_66849 WHERE "Mach" > '0.905' AND "Duration" = '00:06:17' | wikisql |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT (SELECT COUNT(*) 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 = '13034482' AND mzjzjlb.JZKSRQ BETWEEN '2003-04-25' AND '2009-02-02') + (SELECT COUNT(*) FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_... | css |
CREATE TABLE broadcast (
Channel_ID int,
Program_ID int,
Time_of_day text
)
CREATE TABLE program (
Program_ID int,
Name text,
Origin text,
Launch real,
Owner text
)
CREATE TABLE broadcast_share (
Channel_ID int,
Program_ID int,
Date text,
Share_in_percent real
)
CREATE... | SELECT Time_of_day, COUNT(*) FROM broadcast GROUP BY Time_of_day ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_17295 (
"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 rebounds" FROM table_17295 WHERE "High points" = 'Chris Bosh (16)' | wikisql |
CREATE TABLE hz_info_mzjzjlb (
JZLSH number,
YLJGDM number,
mzjzjlb_id 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,
KLX ... | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ... | css |
CREATE TABLE table_24990183_5 (
name VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the player from georgia?
| SELECT name FROM table_24990183_5 WHERE country = "Georgia" | sql_create_context |
CREATE TABLE train (
id number,
train_number number,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TABLE route (
train_id number,
station_id number
)
CREATE TABLE weekly_weather (
station_id number,
day_of_week text,
high_temperature number... | SELECT train_number, time FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur' | spider |
CREATE TABLE table_45334 (
"Year" real,
"Domestic freight" real,
"Domestic mail" real,
"International freight" real,
"International mail" real,
"Total freight and mail" real,
"Change" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much i... | SELECT SUM("International mail") FROM table_45334 WHERE "Change" = '+35,7%' AND "Year" > '2008' | wikisql |
CREATE TABLE table_name_57 (
total VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total for Rank 11?
| SELECT COUNT(total) FROM table_name_57 WHERE rank = 11 | sql_create_context |
CREATE TABLE table_5927 (
"Year" real,
"Chart" text,
"Track" text,
"Peak" real,
"Weeks on Chart" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many weeks was the track Abrazame on the Billboard Latin Pop airplay before 1997?
| SELECT SUM("Weeks on Chart") FROM table_5927 WHERE "Track" = 'abrazame' AND "Chart" = 'billboard latin pop airplay' AND "Year" < '1997' | wikisql |
CREATE TABLE table_42953 (
"Year" real,
"Actor" text,
"Award" text,
"Motion Picture" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which actor won in 1966?
| SELECT "Actor" FROM table_42953 WHERE "Year" = '1966' | wikisql |
CREATE TABLE roller_coaster (
roller_coaster_id number,
name text,
park text,
country_id number,
length number,
height number,
speed text,
opened text,
status text
)
CREATE TABLE country (
country_id number,
name text,
population number,
area number,
languages te... | SELECT length, height FROM roller_coaster | spider |
CREATE TABLE table_203_502 (
id number,
"team" text,
"titles" number,
"runner-up" number,
"third place" number,
"fourth place" number,
"years participated" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times has michigan state be... | SELECT "runner-up" FROM table_203_502 WHERE "team" = 'michigan state' | squall |
CREATE TABLE bdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT wdmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '陈淑兰' AND NOT wdmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2010-02-1... | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.