instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE Ref_Incident_Type (
incident_type_code VARCHAR(10),
incident_type_description VARCHAR(80)
)
CREATE TABLE Behavior_Incident (
incident_id INTEGER,
incident_type_code VARCHAR(10),
student_id INTEGER,
date_incident_start DATETIME,
date_incident_end DATETIME,
incident_summary V... | SELECT date_of_notes, COUNT(date_of_notes) FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = "Fanny" ORDER BY COUNT(date_of_notes) | nvbench |
CREATE TABLE table_204_511 (
id number,
"number" number,
"driver" text,
"entrant" text,
"chassis" text,
"engine" text,
"tyre" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- troy ruttman was entered by the same person as which other driver ?
| SELECT "driver" FROM table_204_511 WHERE "driver" <> 'troy ruttman' AND "entrant" = (SELECT "entrant" FROM table_204_511 WHERE "driver" = 'troy ruttman') | squall |
CREATE TABLE table_9216 (
"Tournament" text,
"Surface" text,
"Week" text,
"Winner and score" text,
"Finalist" text,
"Semifinalists" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the surface when the winner and score is gustavo kuerten 6... | SELECT "Surface" FROM table_9216 WHERE "Winner and score" = 'gustavo kuerten 6-4, 7-5, 7-6(6)' | wikisql |
CREATE TABLE table_203_417 (
id number,
"rnd." number,
"pick #" number,
"nfl team" text,
"player" text,
"pos." text,
"college" text,
"conf." text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the first detroit lions ... | SELECT "player" FROM table_203_417 WHERE "nfl team" = 'detroit lions' AND "conf." <> 'pac-10' ORDER BY "pick #" LIMIT 1 | squall |
CREATE TABLE table_74957 (
"Ranking" real,
"Nationality" text,
"Name" text,
"Years" text,
"ICFC" real,
"FCWC" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest number of FCWC in the Years of 1958 1965, and an I... | SELECT MAX("FCWC") FROM table_74957 WHERE "Years" = '1958–1965' AND "ICFC" < '11' | wikisql |
CREATE TABLE climber (
climber_id number,
name text,
country text,
time text,
points number,
mountain_id number
)
CREATE TABLE mountain (
mountain_id number,
name text,
height number,
prominence number,
range text,
country text
)
-- Using valid SQLite, answer the follo... | SELECT name FROM mountain ORDER BY height DESC LIMIT 1 | spider |
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases INTEGER,
Drink TEXT
)
CREATE TABLE appellations (
No... | SELECT Grape, COUNT(*) FROM wine GROUP BY Grape | nvbench |
CREATE TABLE table_75665 (
"Wrestler" text,
"Reign" text,
"Days held" text,
"Location" text,
"Event" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where did the wrestler, super parka, with the title with a reign of 2?
| SELECT "Location" FROM table_75665 WHERE "Wrestler" = 'super parka' AND "Reign" = '2' | wikisql |
CREATE TABLE table_58876 (
"Round" real,
"Pick" real,
"Player" text,
"Nationality" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was Mario Elie picked in a round before 7?
| SELECT MAX("Pick") FROM table_58876 WHERE "Player" = 'mario elie' AND "Round" < '7' | wikisql |
CREATE TABLE table_204_590 (
id number,
"year" number,
"division" number,
"league" text,
"regular season" text,
"playoffs" text,
"open cup" text,
"avg. attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the number of t... | SELECT COUNT(*) FROM table_204_590 WHERE "league" = 'usl a-league' AND "playoffs" = 'did not qualify' | squall |
CREATE TABLE table_14911 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did sony music direct a label?
| SELECT "Date" FROM table_14911 WHERE "Label" = 'sony music direct' | wikisql |
CREATE TABLE table_name_71 (
method VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want to know the method for opponent of jerry bohlander
| SELECT method FROM table_name_71 WHERE opponent = "jerry bohlander" | sql_create_context |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT Id AS "post_link", ViewCount, Score, Tags FROM Posts WHERE Posts.OwnerUserId = @UserId AND ViewCount > 0 ORDER BY ViewCount DESC, Score DESC LIMIT 20 | sede |
CREATE TABLE table_1769428_2 (
car__number VARCHAR,
winning_driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many car numbers were listed for Rusty Wallace?
| SELECT COUNT(car__number) FROM table_1769428_2 WHERE winning_driver = "Rusty Wallace" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
ic... | SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY intakeoutput.celllabel) AS ... | eicu |
CREATE TABLE table_36921 (
"Nation" text,
"Skip" text,
"Third" text,
"Second" text,
"Lead" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Spain's skip?
| SELECT "Skip" FROM table_36921 WHERE "Nation" = 'spain' | wikisql |
CREATE TABLE table_name_78 (
attendance VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance on October 6?
| SELECT attendance FROM table_name_78 WHERE date = "october 6" | sql_create_context |
CREATE TABLE table_204_664 (
id number,
"rank" number,
"bib" number,
"name" text,
"nationality" text,
"start" text,
"penalties (p+p+s+s)" text,
"time" text,
"deficit" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many took at le... | SELECT COUNT(*) FROM table_204_664 WHERE "time" >= 35 | squall |
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '46674930' AND t_kc22.t_kc21_IN_HOSP_DATE BETWEEN '2000-05-21' AND '2000-10-13' | css |
CREATE TABLE table_34397 (
"Date" text,
"Tournament" text,
"Location" text,
"Winner" text,
"Score" text,
"1st prize ( $ )" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the Winner in north carolina at the greater greensboro ... | SELECT "Winner" FROM table_34397 WHERE "Location" = 'north carolina' AND "Tournament" = 'greater greensboro open' | wikisql |
CREATE TABLE table_1341884_45 (
first_elected VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many voted in the texas 6 section
| SELECT first_elected FROM table_1341884_45 WHERE district = "Texas 6" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND demographic.days_stay = "14" | mimicsql_data |
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswer... | SELECT COUNT(*) AS PostsLastMonth, 6 AS Moderators, (COUNT(*) / 6) AS PostsLastMonthPerMod FROM Posts WHERE LastActivityDate >= DATEADD(month, -1, (SELECT MAX(LastActivityDate) FROM Posts)) | sede |
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE... | SELECT DISTINCT FLIGHT_0.flight_id FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days A... | atis |
CREATE TABLE table_13650 (
"Round" real,
"Dates" text,
"Rally Name" text,
"Rally HQ" text,
"Support Category" text,
"Surface" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Rally Name has a Surface of asphalt and gravel?
| SELECT "Rally Name" FROM table_13650 WHERE "Surface" = 'asphalt and gravel' | wikisql |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE icustays (
row_id number,
... | 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 = 'streptococcal septicemia') AND DATETIME(diagnoses_icd.charttime, 'start of year') = DATETIME(CURRENT_T... | mimic_iii |
CREATE TABLE table_name_47 (
location_attendance VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the location attendance on January 19?
| SELECT location_attendance FROM table_name_47 WHERE date = "january 19" | sql_create_context |
CREATE TABLE musical (
Musical_ID int,
Name text,
Year int,
Award text,
Category text,
Nominee text,
Result text
)
CREATE TABLE actor (
Actor_ID int,
Name text,
Musical_ID int,
Character text,
Duration text,
age int
)
-- Using valid SQLite, answer the following que... | SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee | nvbench |
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.dod_year <= "2115.0" AND lab.itemid = "50824" | mimicsql_data |
CREATE TABLE table_2509202_2 (
tipuani_municipality VARCHAR,
tacacoma_municipality VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- tipuani municipality when tacacoma municipality is 6?
| SELECT tipuani_municipality FROM table_2509202_2 WHERE tacacoma_municipality = "6" | sql_create_context |
CREATE TABLE table_15188 (
"Year" real,
"Population (Total)" real,
"(Barcaldine)" real,
"(Aramac)" real,
"(Jericho)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average (Jericho) with a Population (Total) less than 4,059 in 1986 and a... | SELECT AVG("(Jericho)") FROM table_15188 WHERE "Population (Total)" < '4,059' AND "Year" = '1986' AND "(Barcaldine)" > '1,779' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_ID = '42705253' AND t_kc21.IN_HOSP_DATE BETWEEN '2016-09-13' AND '2017-01-15' GROUP BY t_kc21.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE table_name_86 (
score VARCHAR,
place VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Score has a Place of t8, and a Country of scotland?
| SELECT score FROM table_name_86 WHERE place = "t8" AND country = "scotland" | 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(qtb.IN_HOSP_DAYS) FROM qtb WHERE qtb.MED_SER_ORG_NO = '1952480' AND qtb.IN_HOSP_DATE BETWEEN '2005-03-24' AND '2014-08-29' UNION SELECT AVG(gyb.IN_HOSP_DAYS) FROM gyb WHERE gyb.MED_SER_ORG_NO = '1952480' AND gyb.IN_HOSP_DATE BETWEEN '2005-03-24' AND '2014-08-29' UNION SELECT AVG(zyb.IN_HOSP_DAYS) FROM zyb WH... | css |
CREATE TABLE table_72699 (
"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.
-- List the pictorals from issues when lindsey roeper wa... | SELECT "Pictorials" FROM table_72699 WHERE "Cover model" = 'Lindsey Roeper' | wikisql |
CREATE TABLE table_79640 (
"Round" real,
"Date" text,
"Home Team" text,
"Away Team" text,
"Attendance" real,
"Stadium" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the least round for the game played at Members Equity Stadium in from o... | SELECT MIN("Round") FROM table_79640 WHERE "Stadium" = 'members equity stadium' AND "Attendance" < '12,581' | wikisql |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE labev... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'heparin flush port (10units/ml)' AND DATETIME(prescriptions.start... | mimic_iii |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2155.0" AND procedures.icd9_code = "598" | mimicsql_data |
CREATE TABLE table_204_672 (
id number,
"year" number,
"title" text,
"label" text,
"uk singles chart" number,
"u.s. billboard hot 100 chart" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the last single from this music group ?
| SELECT "title" FROM table_204_672 ORDER BY id DESC LIMIT 1 | squall |
CREATE TABLE table_65330 (
"Position" text,
"Height (cm)" real,
"Weight (kg)" real,
"Birthplace" text,
"2009\u201310 team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of the heights for the Cornell Big Red?
| SELECT SUM("Height (cm)") FROM table_65330 WHERE "2009\u201310 team" = 'cornell big red' | wikisql |
CREATE TABLE table_29368 (
"Episode #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Originalairdate" text,
"Ratings" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the ratings for 'episode 6'?
| SELECT "Ratings" FROM table_29368 WHERE "Title" = 'Episode 6' | wikisql |
CREATE TABLE table_train_137 (
"id" int,
"hbv" bool,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"substance_dependence" bool,
"hcv" bool,
"schizophrenia" bool,
"neutrophil_count" int,
"renal_disease" bool,
"creatinine_clearance_cl" float,
"platelet_count"... | SELECT * FROM table_train_137 WHERE primary_psychotic_disorder = 1 OR schizophrenia = 1 OR schizoaffective_disorder = 1 OR delusional_disorder = 1 OR bipolar_disorder = 1 | criteria2sql |
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 ACC_Regular_Season, Team_ID FROM basketball_match ORDER BY Team_ID DESC | nvbench |
CREATE TABLE table_17069 (
"Player" text,
"Position" text,
"School" text,
"Hometown" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT SCHOOL DID THE PLAYER FROM SOUTH CAROLINA ATTEND?
| SELECT "School" FROM table_17069 WHERE "College" = 'South Carolina' | 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 jyjgzbb.YQBH, jyjgzbb.YQMC 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 jybg... | css |
CREATE TABLE table_name_64 (
zone INTEGER,
stations VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the average zone for waddon marsh tram stop
| SELECT AVG(zone) FROM table_name_64 WHERE stations = "waddon marsh tram stop" | sql_create_context |
CREATE TABLE table_143579_1 (
area___ha__ INTEGER,
island VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the area of Colonsay Island?
| SELECT MIN(area___ha__) FROM table_143579_1 WHERE island = "Colonsay" | sql_create_context |
CREATE TABLE table_22328 (
"Serial No." real,
"District" text,
"Headquartered City" text,
"City Population (2009)" real,
"City Area(km 2 )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what district is the city listed in Serial number 9?
| SELECT COUNT("District") FROM table_22328 WHERE "Serial No." = '9' | wikisql |
CREATE TABLE table_name_98 (
date VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what Date is Carlton the Away Team?
| SELECT date FROM table_name_98 WHERE away_team = "carlton" | sql_create_context |
CREATE TABLE Customer_Contact_Channels (
customer_id INTEGER,
channel_code VARCHAR(15),
active_from_date DATETIME,
active_to_date DATETIME,
contact_number VARCHAR(50)
)
CREATE TABLE Order_Items (
order_id INTEGER,
product_id INTEGER,
order_quantity VARCHAR(15)
)
CREATE TABLE Customer_A... | SELECT order_date, COUNT(order_date) FROM Customers AS t1 JOIN Customer_Orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = "Delivered" GROUP BY customer_name | nvbench |
CREATE TABLE table_651 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the series nu... | SELECT MIN("No. in series") FROM table_651 WHERE "Written by" = 'Elizabeth Devine' | wikisql |
CREATE TABLE table_31751 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Venue" text,
"Start Time" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the number of weeks for december 5, 2005
| SELECT COUNT("Week") FROM table_31751 WHERE "Date" = 'december 5, 2005' | wikisql |
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 Affiliation, SUM(Enrollment) FROM university GROUP BY Affiliation ORDER BY Affiliation DESC | nvbench |
CREATE TABLE table_15187735_6 (
segment_a VARCHAR,
segment_c VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Segment A for when Segment C is s Sailboard?
| SELECT segment_a FROM table_15187735_6 WHERE segment_c = "s Sailboard" | sql_create_context |
CREATE TABLE table_name_69 (
venue VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Competition of fa cup rd 1 had what venue?
| SELECT venue FROM table_name_69 WHERE competition = "fa cup rd 1" | sql_create_context |
CREATE TABLE table_31813 (
"Nomination" text,
"Actor's Name" text,
"Film Name" text,
"Director" text,
"Country" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the actor's name for escho raz o voyne
| SELECT "Actor's Name" FROM table_31813 WHERE "Film Name" = 'escho raz o voyne' | wikisql |
CREATE TABLE table_name_50 (
year INTEGER,
play VARCHAR,
recipient VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the average year for much ado about nothing and recipient of ray virta
| SELECT AVG(year) FROM table_name_50 WHERE play = "much ado about nothing" AND recipient = "ray virta" | sql_create_context |
CREATE TABLE table_64399 (
"Season" real,
"Series" text,
"Team" text,
"Races" text,
"Wins" text,
"Poles" text,
"F/Laps" text,
"Podiums" text,
"Points" text,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Podiums l... | SELECT "Podiums" FROM table_64399 WHERE "Series" = 'world rally championship' | wikisql |
CREATE TABLE table_7541 (
"Date" text,
"Opponent" text,
"Location" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where did they play against Clemson?
| SELECT "Location" FROM table_7541 WHERE "Opponent" = 'clemson' | wikisql |
CREATE TABLE table_name_89 (
release_date VARCHAR,
country VARCHAR,
release_format VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many release dates have a Country of west germany, and a Release format of vinyl?
| SELECT COUNT(release_date) FROM table_name_89 WHERE country = "west germany" AND release_format = "vinyl" | sql_create_context |
CREATE TABLE table_203_798 (
id number,
"party" text,
"votes" text,
"%" number,
"swing" number,
"seats" number,
"change" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many votes did the independent party have ?
| SELECT "votes" FROM table_203_798 WHERE "party" = 'independent' | squall |
CREATE TABLE table_name_16 (
res VARCHAR,
round VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result when there were less than 3 rounds against Gil Rael?
| SELECT res FROM table_name_16 WHERE round < 3 AND opponent = "gil rael" | sql_create_context |
CREATE TABLE table_name_17 (
award VARCHAR,
year VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the award in a year more than 2005, and the Result of nominated?
| SELECT award FROM table_name_17 WHERE year > 2005 AND result = "nominated" | sql_create_context |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId... | SELECT Title, ViewCount FROM Posts | sede |
CREATE TABLE table_train_243 (
"id" int,
"c_peptide_level" float,
"finger_stick_measurements" bool,
"diabetic" string,
"fasting_blood_glucose_fbg" float,
"hypoglycemia" bool,
"insulin_requirement" float,
"triglyceride_tg" float,
"a1c" float,
"age" float,
"NOUSE" float
)
-- ... | SELECT * FROM table_train_243 WHERE a1c >= 7.1 AND a1c <= 11 | criteria2sql |
CREATE TABLE table_name_19 (
team VARCHAR,
high_assists VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team was played against on the game where Earl Watson (6) had the highest assists on January 19?
| SELECT team FROM table_name_19 WHERE high_assists = "earl watson (6)" AND date = "january 19" | sql_create_context |
CREATE TABLE table_10930 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many laps have a Time/Retired of +12.5 secs?
| SELECT COUNT("Laps") FROM table_10930 WHERE "Time/Retired" = '+12.5 secs' | 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 * FROM hz_info JOIN zyjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.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_info_hz_i... | css |
CREATE TABLE table_12014 (
"Rider" text,
"Horse" text,
"Faults" text,
"Round 1 + 2A Points" text,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the highest total when the horse is spender s
| SELECT MAX("Total") FROM table_12014 WHERE "Horse" = 'spender s' | wikisql |
CREATE TABLE Students_in_Detention (
student_id INTEGER,
detention_id INTEGER,
incident_id INTEGER
)
CREATE TABLE Ref_Address_Types (
address_type_code VARCHAR(15),
address_type_description VARCHAR(80)
)
CREATE TABLE Students (
student_id INTEGER,
address_id INTEGER,
first_name VARCHAR... | SELECT other_details, AVG(monthly_rental) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE Participants_in_Events (
Event_ID INTEGER,
Participant_ID INTEGER
)
CREATE TABLE Participants (
Participant_ID INTEGER,
Participant_Type_Code CHAR(15),
Participant_Details VARCHAR(255)
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15)
)
CREATE TABLE Eve... | SELECT T1.Event_Details, T1.Event_ID FROM Events AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_Details ORDER BY T1.Event_ID | nvbench |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
sh... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT outputevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM outputevents GROUP BY outputevents.itemid) AS t1 WHERE t1.c1 <= 4) | mimic_iii |
CREATE TABLE table_name_36 (
balls VARCHAR,
strike_rate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the strike rate is 70.10, what is the balls?
| SELECT balls FROM table_name_36 WHERE strike_rate = "70.10" | sql_create_context |
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 (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "SINGLE" AND diagnoses.short_title = "Migrne unsp wo ntrc mgrn" | mimicsql_data |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT lab.flag FROM lab WHERE lab.subject_id = "6983" | mimicsql_data |
CREATE TABLE table_16815824_1 (
round5 VARCHAR,
total_points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the round 5 score if the team's total points where 212?
| SELECT round5 FROM table_16815824_1 WHERE total_points = 212 | sql_create_context |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT demographic.dod, demographic.dischtime FROM demographic WHERE demographic.subject_id = "94762" | mimicsql_data |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE aircraft (... | SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, flight WHERE airport.airport_code = 'DAL' AND city.city_code = airport_service.city_code AND flight.from_airport = airport_service.airport_code AND flight.to_airport = airport.airport_code | atis |
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 OUT_DIAG_DIS_CD, OUT_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_NM = '周锐志' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT >= 6373.39) | css |
CREATE TABLE table_name_52 (
score VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of game 30?
| SELECT score FROM table_name_52 WHERE game = 30 | sql_create_context |
CREATE TABLE table_203_593 (
id number,
"tenure" text,
"coach" text,
"years" number,
"record" text,
"pct." number,
"ncaa tournament" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who was the first coach to reach the ncaa tournament ?
| SELECT "coach" FROM table_203_593 WHERE NOT "ncaa tournament" IS NULL ORDER BY "tenure" LIMIT 1 | squall |
CREATE TABLE table_19704392_1 (
rpm VARCHAR,
standard_speed__6th_gear_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- when standard speed (6th gear) is 88, what is the rpm?
| SELECT rpm FROM table_19704392_1 WHERE standard_speed__6th_gear_ = "88" | sql_create_context |
CREATE TABLE table_47742 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Attendance" real,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What home is dated march 19?
| SELECT "Home" FROM table_47742 WHERE "Date" = 'march 19' | 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 demographic.age, demographic.diagnosis FROM demographic WHERE demographic.name = "Gonzalo Wasson" | mimicsql_data |
CREATE TABLE gyb (
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 qtb.MED_ORG_DEPT_NM, qtb.IN_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '5848199' GROUP BY qtb.MED_ORG_DEPT_NM, qtb.IN_DIAG_DIS_NM UNION SELECT gyb.MED_ORG_DEPT_NM, gyb.IN_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '5848199' GROUP BY gyb.MED_ORG_DEPT_NM, gyb.IN_... | css |
CREATE TABLE table_4420 (
"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.
-- I want the NHL team for wade belak
| SELECT "NHL team" FROM table_4420 WHERE "Player" = 'wade belak' | wikisql |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CR... | 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 = 3125) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_it... | mimic_iii |
CREATE TABLE table_204_868 (
id number,
"outcome" text,
"no." number,
"date" text,
"tournament" text,
"surface" text,
"opponent" text,
"score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the number of victories this player has... | SELECT COUNT(*) FROM table_204_868 WHERE "surface" = 'hard' | squall |
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND date_day.day_number = 25 AND date_day.month_number = 6 A... | atis |
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.long_title = "Atrial cardioversion" | mimicsql_data |
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Compa... | SELECT director, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY director | nvbench |
CREATE TABLE table_61162 (
"Lince" text,
"Leopard 2A4" text,
"Leclerc" text,
"M1A1 Abrams" text,
"M60A3 Patton" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the lince when Leclerc was Hp (kw)?
| SELECT "Lince" FROM table_61162 WHERE "Leclerc" = 'hp (kw)' | wikisql |
CREATE TABLE table_name_22 (
events INTEGER,
earnings VARCHAR,
average VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Events has Earnings of $113,259, and an Average larger than 229.5?
| SELECT MAX(events) FROM table_name_22 WHERE earnings = "$113,259" AND average > 229.5 | sql_create_context |
CREATE TABLE table_12250 (
"Round" real,
"Date" text,
"Event" text,
"Circuit" text,
"Winning Driver" text,
"Winning Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Circuit has an Event of international procar meeting?
| SELECT "Circuit" FROM table_12250 WHERE "Event" = 'international procar meeting' | wikisql |
CREATE TABLE table_16799784_7 (
diameter__km_ VARCHAR,
longitude VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the diameter (km) of longitude 170.1e
| SELECT diameter__km_ FROM table_16799784_7 WHERE longitude = "170.1E" | sql_create_context |
CREATE TABLE table_57955 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the low lap total for a grid of 14?
| SELECT MIN("Laps") FROM table_57955 WHERE "Grid" = '14' | wikisql |
CREATE TABLE table_16372911_1 (
acc_home VARCHAR,
acc__percentage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the ACC home game record for the team who's ACC winning percentage was .813?
| SELECT acc_home FROM table_16372911_1 WHERE acc__percentage = ".813" | sql_create_context |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
h... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'inj/inf pla... | mimic_iii |
CREATE TABLE table_25695 (
"Player" text,
"Games Played" real,
"Minutes" real,
"Field Goals" real,
"Three Pointers" real,
"Free Throws" real,
"Rebounds" real,
"Assists" real,
"Blocks" real,
"Steals" real,
"Points" real
)
-- Using valid SQLite, answer the following questions... | SELECT MAX("Free Throws") FROM table_25695 WHERE "Steals" = '4' | 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 jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.