instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_7597 (
"Format name" text,
"Container" text,
"Video coding" text,
"Bit depth" real,
"Color sampling" text,
"Frame size" text,
"Video bit rate, Mbit/s" text,
"Audio coding" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
--... | SELECT "Frame size" FROM table_7597 WHERE "Audio coding" = 'pcm 4 ch/16 bit/48khz' AND "Format name" = 'dvcam' AND "Color sampling" = '4:1:1' | wikisql |
CREATE TABLE table_name_31 (
november INTEGER,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the latest day in November with a game 15?
| SELECT MAX(november) FROM table_name_31 WHERE game = 15 | sql_create_context |
CREATE TABLE table_28967275_2 (
episode_title VARCHAR,
series__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title of the episode with series number 14?
| SELECT episode_title FROM table_28967275_2 WHERE series__number = 14 | sql_create_context |
CREATE TABLE table_17849 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
)
-- Using valid SQLite, answer the follo... | SELECT "Try bonus" FROM table_17849 WHERE "Tries against" = '83' | wikisql |
CREATE TABLE table_1594772_2 (
s_no VARCHAR,
match_date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the numbers for date of feb 27, 1996
| SELECT s_no FROM table_1594772_2 WHERE match_date = "Feb 27, 1996" | sql_create_context |
CREATE TABLE table_339 (
"Dep." text,
"Chief town" text,
"Arrondissement" text,
"Population (1999)" text,
"Area (Square km)" real,
"Pop density" real,
"Cantons" real,
"Communes" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many com... | SELECT COUNT("Communes") FROM table_339 WHERE "Chief town" = 'Dijon' | wikisql |
CREATE TABLE table_64431 (
"Name" text,
"Hull" real,
"Pennant number" text,
"Status" text,
"Date of commission" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What status does the boat Ajax have?
| SELECT "Status" FROM table_64431 WHERE "Name" = 'ajax' | wikisql |
CREATE TABLE table_202_43 (
id number,
"year" number,
"publisher" text,
"country" text,
"accolade" text,
"rank" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times has ` stayin ' alive ' been recognized as one of the rolling stone 's... | SELECT COUNT(*) FROM table_202_43 WHERE "accolade" = '"the 500 greatest songs of all time"' | squall |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'blood, venipuncture' AND DATETIME(microlab.culturetakentime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')) | eicu |
CREATE TABLE table_8535 (
"Discipline" text,
"Championship" text,
"Circuit" text,
"Event" text,
"Session" text,
"Cause" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- With a Championship of 1959 USAC Championship Car Season what is the event?
| SELECT "Event" FROM table_8535 WHERE "Championship" = '1959 usac championship car season' | wikisql |
CREATE TABLE table_22379 (
"Species" text,
"Common name" text,
"Trinidad" text,
"Tobago" text,
"Bocas Is." text,
"Other" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the other for chironius multiventris septentrionalis
| SELECT "Other" FROM table_22379 WHERE "Species" = 'Chironius multiventris septentrionalis' | wikisql |
CREATE TABLE table_40939 (
"Pilot" text,
"Original Airdate" text,
"Musical Guest/Song performed" text,
"YouTube Hero" text,
"MySpace Band" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Pilot number for the YouTube Hero greg pattillo?
| SELECT "Pilot" FROM table_40939 WHERE "YouTube Hero" = 'greg pattillo' | wikisql |
CREATE TABLE table_44496 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which event was against Pat Barry?
| SELECT "Event" FROM table_44496 WHERE "Opponent" = 'pat barry' | wikisql |
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | SELECT Name, Weight FROM people ORDER BY Name | nvbench |
CREATE TABLE table_name_33 (
home VARCHAR,
visitor VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home team of the game where New Jersey was the visitor team and the record was 11-35-12?
| SELECT home FROM table_name_33 WHERE visitor = "new jersey" AND record = "11-35-12" | sql_create_context |
CREATE TABLE table_34572 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score when the Spurs' record was 43-13?
| SELECT "Score" FROM table_34572 WHERE "Record" = '43-13' | wikisql |
CREATE TABLE table_name_70 (
venue VARCHAR,
notes VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Venue has Notes of 58.48 m?
| SELECT venue FROM table_name_70 WHERE notes = "58.48 m" | sql_create_context |
CREATE TABLE table_name_77 (
season VARCHAR,
last_airdate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which season last aired on May 6, 1987?
| SELECT season FROM table_name_77 WHERE last_airdate = "may 6, 1987" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE l... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-178044')) AND vitalperiodic.heartrate > 86.0 AN... | eicu |
CREATE TABLE table_name_80 (
linda_mccartney VARCHAR,
stuart VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Linda McCartney has a Stuart of electric guitar?
| SELECT linda_mccartney FROM table_name_80 WHERE stuart = "electric guitar" | sql_create_context |
CREATE TABLE table_18815 (
"Specification" text,
"Gender" text,
"Junior High School (12\u201315 yrs)" text,
"Senior High School (15\u201318 yrs)" text,
"University students and Adults (18yrs+)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is ... | SELECT "Gender" FROM table_18815 WHERE "Senior High School (15\u201318 yrs)" = '26mm' | wikisql |
CREATE TABLE table_name_20 (
tie_no VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Tie no when the Home team was Ramsgate?
| SELECT tie_no FROM table_name_20 WHERE home_team = "ramsgate" | sql_create_context |
CREATE TABLE table_19266557_1 (
us_viewers__millions_ VARCHAR,
_number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many millions of viewers were there for number 6?
| SELECT us_viewers__millions_ FROM table_19266557_1 WHERE _number = 6 | sql_create_context |
CREATE TABLE statements (
statement_id number,
statement_details text
)
CREATE TABLE documents (
document_id number,
document_type_code text,
project_id number,
document_date time,
document_name text,
document_description text,
other_details text
)
CREATE TABLE documents_with_expen... | SELECT document_name, document_id FROM documents WHERE document_type_code = "BK" | spider |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
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,
... | SELECT COUNT(*) FROM mzjzjlb WHERE YLJGDM = '7972448' AND JZKSRQ BETWEEN '2011-12-28' AND '2018-02-10' AND ZSEBZ > 0 | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2184" AND diagnoses.long_title = "Stenosis of pulmonary valve, congenital" | mimicsql_data |
CREATE TABLE table_25448 (
"#" real,
"Date" text,
"Team" text,
"Score" text,
"Location Attendance" text,
"High Points" text,
"High Rebounds" text,
"High Assists" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was ... | SELECT "Score" FROM table_25448 WHERE "Team" = '@ New Jersey' | wikisql |
CREATE TABLE table_40811 (
"Frequency" text,
"Station" text,
"Operator" text,
"Language" text,
"Genre" text,
"Coverage Area" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the coverage area of muzik fm station, which has a music genre?
| SELECT "Coverage Area" FROM table_40811 WHERE "Genre" = 'music' AND "Station" = 'muzik fm' | wikisql |
CREATE TABLE table_name_51 (
us_state_district VARCHAR,
charter_date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What state or district has a charter date of april 17, 2011?
| SELECT us_state_district FROM table_name_51 WHERE charter_date = "april 17, 2011" | sql_create_context |
CREATE TABLE table_1963459_2 (
team VARCHAR,
manufacturer VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What teams drive cars manufactured by Toyota?
| SELECT team FROM table_1963459_2 WHERE manufacturer = "Toyota" | sql_create_context |
CREATE TABLE table_3064 (
"Week" real,
"Date" text,
"Kickoff" text,
"Opponent" text,
"Final score" text,
"Team record" text,
"Game site" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Rhein Fire team recor... | SELECT "Team record" FROM table_3064 WHERE "Week" = '8' | 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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime t... | 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 = 10431) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.item... | mimic_iii |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TAB... | SELECT ROW_NUMBER() OVER (ORDER BY sev.Id) AS rn, UserId, CreationDate, SuggestedEditId, 'http://stackoverflow.com/suggested-edits/' + CAST(SuggestedEditId AS TEXT) AS "edit_link", vt.Name FROM SuggestedEditVotes AS sev INNER JOIN VoteTypes AS vt ON sev.VoteTypeId = vt.Id WHERE UserId = '##TheUserid:int##' AND DATE(Cre... | sede |
CREATE TABLE table_62671 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( \u00a3 )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Money ( ) has a Player of jodie mudd?
| SELECT COUNT("Money ( \u00a3 )") FROM table_62671 WHERE "Player" = 'jodie mudd' | wikisql |
CREATE TABLE table_name_87 (
name__wade_giles_ VARCHAR,
characters VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the name that has the characters ?
| SELECT name__wade_giles_ FROM table_name_87 WHERE characters = "廣亨" | sql_create_context |
CREATE TABLE table_2277 (
"Constituency" text,
"Electorate" real,
"s Spoilt vote" real,
"Total poll (%)" text,
"For (%)" text,
"Against (%)" text,
"\u00b1 Yes side 2008 (%)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 13,895 (27.3) i... | SELECT "Total poll (%)" FROM table_2277 WHERE "Against (%)" = '13,895 (27.3)' | wikisql |
CREATE TABLE zyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_ID = '08630771' AND t_kc22.STA_DATE BETWEEN '2001-09-16' AND '2021-07-12' AND qtb.MED_SER_ORG_NO = '8807369' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED... | css |
CREATE TABLE table_37745 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" text,
"Best" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was Alex Figge's Best?
| SELECT "Best" FROM table_37745 WHERE "Name" = 'alex figge' | wikisql |
CREATE TABLE table_name_7 (
collaboration VARCHAR,
name VARCHAR,
indication VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What company collaborated in SBI-087 for rheumatoid arthritis?
| SELECT collaboration FROM table_name_7 WHERE name = "sbi-087" AND indication = "rheumatoid arthritis" | sql_create_context |
CREATE TABLE table_12078626_1 (
deadline_for_completion VARCHAR,
description VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total number of deadline for completion where description is facebook becomes a publicly traded company
| SELECT COUNT(deadline_for_completion) FROM table_12078626_1 WHERE description = "Facebook becomes a publicly traded company" | sql_create_context |
CREATE TABLE railway_manage (
Railway_ID int,
Manager_ID int,
From_Year text
)
CREATE TABLE manager (
Manager_ID int,
Name text,
Country text,
Working_year_starts text,
Age int,
Level int
)
CREATE TABLE train (
Train_ID int,
Train_Num text,
Name text,
From text,
... | SELECT T1.Location, T1.Railway_ID FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID | nvbench |
CREATE TABLE table_60042 (
"7:00 am" text,
"7:30 am" text,
"8:00 am" text,
"9:00 am" text,
"10:00 am" text,
"11:00 am" text,
"noon" text,
"12:30 pm" text,
"1:00 pm" text,
"1:30 pm" text,
"2:00 pm" text,
"3:00 pm" text,
"4:00 pm" text,
"4:30 pm" text,
"5:00 pm"... | SELECT "8:00 am" FROM table_60042 WHERE "2:00 pm" = 'passions' | wikisql |
CREATE TABLE customers (
customer_id VARCHAR,
customer_name VARCHAR,
customer_address VARCHAR,
payment_method_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the id and name of customers whose address contains WY state and do not use credit ... | SELECT customer_id, customer_name FROM customers WHERE customer_address LIKE "%WY%" AND payment_method_code <> "Credit Card" | sql_create_context |
CREATE TABLE table_63747 (
"School" text,
"Location" text,
"Mascot" text,
"Enrollment" real,
"IHSAA Football Class" text,
"Primary Conference" text,
"County" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What school has a county of 69 riple... | SELECT "School" FROM table_63747 WHERE "County" = '69 ripley' | wikisql |
CREATE TABLE table_16951 (
"Date" text,
"Tournament" text,
"Location" text,
"Purse( $ )" real,
"Winner" text,
"Score" text,
"1st Prize( $ )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the winner of the Painewebber Invitational tou... | SELECT "Winner" FROM table_16951 WHERE "Tournament" = 'PaineWebber Invitational' | wikisql |
CREATE TABLE table_65688 (
"Mexico" text,
"Ma\u00f1ana es para siempre" text,
"El Canal de las Estrellas" text,
"October 20, 2008" text,
"June 14, 2009" text,
"Monday to Friday" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the El Canal... | SELECT "El Canal de las Estrellas" FROM table_65688 WHERE "June 14, 2009" = 'february 23, 2010' | wikisql |
CREATE TABLE club_rank (
Rank real,
Club_ID int,
Gold real,
Silver real,
Bronze real,
Total real
)
CREATE TABLE competition (
Competition_ID int,
Year real,
Competition_type text,
Country text
)
CREATE TABLE player (
Player_ID int,
name text,
Position text,
Club... | SELECT Competition_type, COUNT(Competition_type) FROM competition GROUP BY Competition_type ORDER BY Competition_type | nvbench |
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE field (
fieldid int
)
C... | SELECT DISTINCT COUNT(DISTINCT writes.paperid) FROM author, writes WHERE author.authorname = 'mangpo' AND writes.authorid = author.authorid | scholar |
CREATE TABLE table_60334 (
"Position" real,
"Club" text,
"Games played" real,
"Wins" real,
"Draws" real,
"Loses" real,
"Goals scored" real,
"Goals conceded" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lo... | SELECT MIN("Games played") FROM table_60334 WHERE "Goals conceded" > '25' AND "Goals scored" > '17' AND "Position" = '7' | wikisql |
CREATE TABLE table_name_61 (
away VARCHAR,
home VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the away when the home is 3-2, and the season is 1959-60?
| SELECT away FROM table_name_61 WHERE home = "3-2" AND season = "1959-60" | sql_create_context |
CREATE TABLE table_name_17 (
venue VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What venue did the team, evansville bluecats play on?
| SELECT venue FROM table_name_17 WHERE team = "evansville bluecats" | sql_create_context |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT All_Home, AVG(Team_ID) FROM basketball_match GROUP BY All_Home ORDER BY All_Home | nvbench |
CREATE TABLE table_name_25 (
attendance VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the attendance in week 15?
| SELECT attendance FROM table_name_25 WHERE week = "15" | sql_create_context |
CREATE TABLE table_204_832 (
id number,
"name" text,
"nationality" text,
"club" text,
"from" number,
"until" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many total coaches on the list are from canada ?
| SELECT COUNT(*) FROM table_204_832 WHERE "nationality" = 'canada' | squall |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Obstructive sleep apnea" AND prescriptions.route = "PR" | mimicsql_data |
CREATE TABLE table_222198_1 (
orchestra VARCHAR,
year_of_recording VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is the orchestra when the year of recording is 1934?
| SELECT orchestra FROM table_222198_1 WHERE year_of_recording = 1934 | sql_create_context |
CREATE TABLE table_test_4 (
"id" int,
"ejection_fraction_ef" int,
"systolic_blood_pressure_sbp" int,
"active_infection" bool,
"heart_disease" bool,
"renal_disease" bool,
"estimated_glomerular_filtration_rate_egfr" int,
"cardiogenic_shock" bool,
"diastolic_blood_pressure_dbp" int,
... | SELECT * FROM table_test_4 WHERE renal_disease = 1 OR estimated_glomerular_filtration_rate_egfr < 30 | criteria2sql |
CREATE TABLE festival_detail (
Festival_ID int,
Festival_Name text,
Chair_Name text,
Location text,
Year int,
Num_of_Audience int
)
CREATE TABLE artwork (
Artwork_ID int,
Type text,
Name text
)
CREATE TABLE nomination (
Artwork_ID int,
Festival_ID int,
Result text
)
-... | SELECT Type, COUNT(*) FROM artwork GROUP BY Type ORDER BY Type DESC | nvbench |
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "9600" AND prescriptions.drug_type = "ADDITIVE" | mimicsql_data |
CREATE TABLE table_20219 (
"Date" text,
"Cover model" text,
"Centerfold model" text,
"Interview subject" text,
"20 Questions" text,
"Pictorials" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of the issue where the pictorials is... | SELECT COUNT("Date") FROM table_20219 WHERE "Pictorials" = 'Female s disk jockey' | wikisql |
CREATE TABLE manager_half (
player_id TEXT,
year INTEGER,
team_id TEXT,
league_id TEXT,
inseason INTEGER,
half INTEGER,
g INTEGER,
w INTEGER,
l INTEGER,
rank INTEGER
)
CREATE TABLE fielding (
player_id TEXT,
year INTEGER,
stint INTEGER,
team_id TEXT,
league_i... | SELECT year, AVG(attendance) FROM home_game GROUP BY year ORDER BY year | nvbench |
CREATE TABLE table_33117 (
"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 crowd size when the away team score... | SELECT COUNT("Crowd") FROM table_33117 WHERE "Away team score" = '10.9 (69)' | wikisql |
CREATE TABLE table_name_77 (
draw INTEGER,
rank VARCHAR,
televotes VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the highest Draw which has a Rank of 14, and a Televotes larger than 908?
| SELECT MAX(draw) FROM table_name_77 WHERE rank = 14 AND televotes > 908 | sql_create_context |
CREATE TABLE table_name_93 (
enrollment INTEGER,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Enrollment at Onalaska?
| SELECT MAX(enrollment) FROM table_name_93 WHERE location = "onalaska" | sql_create_context |
CREATE TABLE table_64512 (
"School" text,
"Location" text,
"Mascot" text,
"Enrollment" real,
"IHSAA Class" text,
"IHSAA Football Class" text,
"# / County" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total enrollment of the aa ... | SELECT COUNT("Enrollment") FROM table_64512 WHERE "IHSAA Class" = 'aa' | wikisql |
CREATE TABLE table_name_23 (
position VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what position did Salina Kosgei finish in the Tokyo Marathon?
| SELECT position FROM table_name_23 WHERE competition = "tokyo marathon" | sql_create_context |
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(20),
customer_last_name VARCHAR(20),
customer_address VARCHAR(255),
customer_phone VARCHAR(255),
customer_email VARCHAR(255),
other_customer_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
c... | SELECT card_type_code, SUM(card_number) FROM Customers_Cards GROUP BY card_type_code ORDER BY SUM(card_number) | nvbench |
CREATE TABLE table_name_96 (
apps INTEGER,
goals VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many apps when the rank was after 13 and having more than 73 goals?
| SELECT AVG(apps) FROM table_name_96 WHERE goals > 73 AND rank > 13 | sql_create_context |
CREATE TABLE table_13468 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Rank" text,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total of the points for wins under 6 and a rank of 2nd?
| SELECT SUM("Points") FROM table_13468 WHERE "Rank" = '2nd' AND "Wins" < '6' | wikisql |
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 lab (
subject_id text,
hadm_id text,
... | SELECT demographic.gender FROM demographic WHERE demographic.name = "Paul Edwards" | mimicsql_data |
CREATE TABLE table_52944 (
"State ranked in partisan order" text,
"Percentage Democrats" text,
"Percentage Republicans" text,
"Democratic/ Republican" text,
"Democratic seat plurality" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the democ... | SELECT "Democratic seat plurality" FROM table_52944 WHERE "State ranked in partisan order" = 'new hampshire' | wikisql |
CREATE TABLE table_name_66 (
number_of_hus__approximate_ VARCHAR,
digits VARCHAR,
level VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the approximate number of HUs when there are more than 2 digits, and 6 levels?
| SELECT COUNT(number_of_hus__approximate_) FROM table_name_66 WHERE digits > 2 AND level = 6 | sql_create_context |
CREATE TABLE user_profiles (
name VARCHAR,
followers VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the name and number of followers for each user, and sort the results by the number of followers in descending order.
| SELECT name, followers FROM user_profiles ORDER BY followers DESC | sql_create_context |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
... | SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city AS CITY_0, city AS CITY_1, ground_service WHERE airport.airport_code = airport_service.airport_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = airport_service.city_code AND CITY_1.city_name = 'BOSTON' AND ground_service.airpor... | atis |
CREATE TABLE operate_company (
id int,
name text,
Type text,
Principal_activities text,
Incorporated_in text,
Group_Equity_Shareholding real
)
CREATE TABLE airport (
id int,
City text,
Country text,
IATA text,
ICAO text,
name text
)
CREATE TABLE flight (
id int,
... | SELECT Country, COUNT(*) FROM airport GROUP BY Country ORDER BY Country DESC | nvbench |
CREATE TABLE table_name_77 (
label VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which label released on February 18, 2009?
| SELECT label FROM table_name_77 WHERE date = "february 18, 2009" | sql_create_context |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decima... | SELECT FIRST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMPLOYEE_ID DESC | nvbench |
CREATE TABLE table_203_459 (
id number,
"township" text,
"fips" number,
"population\ncenter" text,
"population" number,
"population\ndensity\n/km2 (/sq mi)" text,
"land area\nkm2 (sq mi)" text,
"water area\nkm2 (sq mi)" text,
"water %" text,
"geographic coordinates" text
)
-- U... | SELECT COUNT("township") FROM table_203_459 WHERE "water area\nkm2 (sq mi)" = 0 | squall |
CREATE TABLE table_25605 (
"Star" text,
"Stellar classification" text,
"Distance from Earth ( ly )" text,
"Constellation" text,
"Dust (or Debris; Temperature (K)" text,
"System" text,
"Dust (or Debris) Location (AU)" text,
"Cool Dust > 10 AU" text,
"Stellar Age (Myr)" text
)
-- Usi... | SELECT "System" FROM table_25605 WHERE "Constellation" = 'Aries' | wikisql |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetake... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-87465'... | eicu |
CREATE TABLE table_name_57 (
lane INTEGER,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What lane did the rank 3 swimmer use?
| SELECT MAX(lane) FROM table_name_57 WHERE rank = 3 | sql_create_context |
CREATE TABLE table_75653 (
"Outcome" text,
"Event" text,
"Year" text,
"Venue" text,
"Partner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Venue in 1986 with an Outcome of 1?
| SELECT "Venue" FROM table_75653 WHERE "Year" = '1986' AND "Outcome" = '1' | wikisql |
CREATE TABLE table_78677 (
"Year" real,
"Date" text,
"Home Team" text,
"Result" text,
"Visiting Team" text,
"Venue" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Venue on November 26?
| SELECT "Venue" FROM table_78677 WHERE "Date" = 'november 26' | 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_kc24.MED_CLINIC_ID, t_kc24.t_kc21_PERSON_ID, t_kc24.t_kc21_PERSON_NM, t_kc24.t_kc21_IDENTITY_CARD, t_kc24.t_kc21_PERSON_SEX, t_kc24.t_kc21_PERSON_AGE FROM t_kc24 WHERE t_kc24.MED_AMOUT = (SELECT t_kc24.MED_AMOUT FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID = '03425240816') | css |
CREATE TABLE table_name_95 (
game INTEGER,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Game, when Date is 'April 12'?
| SELECT MIN(game) FROM table_name_95 WHERE date = "april 12" | sql_create_context |
CREATE TABLE table_name_87 (
division VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which division do the Toronto Raptors belong in?
| SELECT division FROM table_name_87 WHERE team = "toronto raptors" | sql_create_context |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
U... | SELECT p.Id AS "post_link", 'site://posts/' + CAST(p.Id AS TEXT) + '/edit|' + 'Edit' AS "edit_link", p.CreationDate FROM Posts AS p WHERE 1 = 1 AND p.AcceptedAnswerId != p.Id AND YEAR(p.CreationDate) != 2011 AND YEAR(p.CreationDate) = @year AND (REPLACE(REPLACE(p.Body, '\\', ''), ' ', 'X') LIKE '%\XXXX%') ORDER BY p.Cr... | sede |
CREATE TABLE table_26942 (
"Name" text,
"Position" text,
"Period" text,
"Appearances\u00b9" real,
"Goals\u00b9" real,
"Nationality\u00b2" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many names correspond to the value 101 for appearances?
| SELECT COUNT("Name") FROM table_26942 WHERE "Appearances\u00b9" = '101' | wikisql |
CREATE TABLE operate_company (
group_equity_shareholding INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is maximum group equity shareholding of the companies?
| SELECT MAX(group_equity_shareholding) FROM operate_company | sql_create_context |
CREATE TABLE table_name_95 (
capacity VARCHAR,
country VARCHAR,
city VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the capacity of the team in tucson, USA?
| SELECT capacity FROM table_name_95 WHERE country = "usa" AND city = "tucson" | sql_create_context |
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 Founder, AVG(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder DESC | nvbench |
CREATE TABLE table_26624 (
"Name" text,
"Deceased Spouse" text,
"Cause of Death" text,
"Date of Spouses Death" text,
"Length of Marriage" text,
"Children Together" text,
"Current Marital Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
--... | SELECT "Current Marital Status" FROM table_26624 WHERE "Name" = 'Stella Farentino' | 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 ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'DENVER' AND ground_service.city_code = city.city_code | atis |
CREATE TABLE All_Documents (
Document_ID INTEGER,
Date_Stored DATETIME,
Document_Type_Code CHAR(15),
Document_Name CHAR(255),
Document_Description CHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Locations (
Location_Code CHAR(15),
Location_Name VARCHAR(255),
Location_Descri... | SELECT Role_Code, COUNT(*) FROM Employees GROUP BY Role_Code ORDER BY Role_Code DESC | nvbench |
CREATE TABLE table_15739098_1 (
airdate VARCHAR,
director VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the airdate when the director is george spenton-foster
| SELECT airdate FROM table_15739098_1 WHERE director = "George Spenton-Foster" | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "JEHOVAH'S WITNESS" AND lab.label = "Creatine Kinase, MB Isoenzyme" | mimicsql_data |
CREATE TABLE table_34714 (
"Year" text,
"National Champion" text,
"Runner-Up" text,
"Location" text,
"Host" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- At what Location did Robert Morris University (Illinois) Host the Lindenwood National Champtio... | SELECT "Location" FROM table_34714 WHERE "Host" = 'robert morris university (illinois)' AND "National Champion" = 'lindenwood' | wikisql |
CREATE TABLE table_name_31 (
round INTEGER,
school_club_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where's the first round that southern mississippi shows up during the draft?
| SELECT MIN(round) FROM table_name_31 WHERE school_club_team = "southern mississippi" | sql_create_context |
CREATE TABLE table_1342249_11 (
party VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many parties does incumbent carl vinson represent?
| SELECT COUNT(party) FROM table_1342249_11 WHERE incumbent = "Carl Vinson" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
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,
... | (SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGD... | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.