instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_21 (
player VARCHAR,
pick__number VARCHAR,
cfl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player was chosen by Saskatchewan in a pick larger than 38?
| SELECT player FROM table_name_21 WHERE pick__number > 38 AND cfl_team = "saskatchewan" | sql_create_context |
CREATE TABLE table_204_584 (
id number,
"pos" text,
"no" number,
"driver" text,
"constructor" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- did james hunt finish th... | SELECT (SELECT "pos" FROM table_204_584 WHERE "driver" = 'james hunt') > (SELECT "pos" FROM table_204_584 WHERE "driver" = 'mark donohue') | squall |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId numb... | SELECT r.Score AS rRep, q.Score AS qRep, 'http://earthscience.stackexchange.com/a/' + CAST(r.Id AS TEXT) + '/5917|' + q.Title AS link, q.Tags AS tags, r.LastEditDate AS rDate FROM Posts AS r, Posts AS q WHERE q.Id = r.ParentId AND r.PostTypeId = 2 AND r.Score >= 30 ORDER BY rRep DESC | sede |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE patient (
uniquep... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'breast ca' AND STRFTIME('%y', diagnosis.diagnosist... | eicu |
CREATE TABLE table_19068 (
"District" text,
"Counties Represented" text,
"Delegate" text,
"Party" text,
"First Elected" real,
"Committee" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many of the elected officials are on the Economic Matter... | SELECT COUNT("First Elected") FROM table_19068 WHERE "Committee" = 'Economic Matters' | wikisql |
CREATE TABLE files (
f_id number(10),
artist_name varchar2(50),
file_size varchar2(20),
duration varchar2(20),
formats varchar2(20)
)
CREATE TABLE genre (
g_name varchar2(20),
rating varchar2(10),
most_popular_in varchar2(50)
)
CREATE TABLE song (
song_name varchar2(50),
artist... | SELECT formats, COUNT(*) FROM files GROUP BY formats ORDER BY formats DESC | nvbench |
CREATE TABLE management (
department_ID int,
head_ID int,
temporary_acting text
)
CREATE TABLE head (
head_ID int,
name text,
born_state text,
age real
)
CREATE TABLE department (
Department_ID int,
Name text,
Creation text,
Ranking int,
Budget_in_Billions real,
Num... | SELECT Creation, COUNT(Creation) FROM department GROUP BY Creation ORDER BY Creation DESC | 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 COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '鲁舒云' AND t_kc22.STA_DATE BETWEEN '2015-07-20' AND '2019-03-28' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwyjz... | css |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_... | SELECT HIRE_DATE, SALARY FROM employees WHERE NOT FIRST_NAME LIKE '%M%' ORDER BY HIRE_DATE | nvbench |
CREATE TABLE table_60682 (
"HD designation" text,
"Constellation" text,
"Distance ( ly )" real,
"Spectral type" text,
"Signal power ( kW )" real,
"Date sent" text,
"Arrival date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the tot... | SELECT COUNT("Distance ( ly )") FROM table_60682 WHERE "Constellation" = 'draco' | wikisql |
CREATE TABLE table_10061 (
"Railway" text,
"Builder" text,
"Built" text,
"Wheels" text,
"Location" text,
"ObjectNumber" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the Builder when the wheels were 4-4-0 and the railway was GCR?
| SELECT "Builder" FROM table_10061 WHERE "Wheels" = '4-4-0' AND "Railway" = 'gcr' | wikisql |
CREATE TABLE csu_fees (
campus number,
year number,
campusfee number
)
CREATE TABLE discipline_enrollments (
campus number,
discipline number,
year number,
undergraduate number,
graduate number
)
CREATE TABLE degrees (
year number,
campus number,
degrees number
)
CREATE TA... | SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = "San Francisco State University" AND t2.year = 2001 | spider |
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 number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT * FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i... | css |
CREATE TABLE table_name_17 (
crowd INTEGER,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Average crowd when the away team was north melbourne?
| SELECT AVG(crowd) FROM table_name_17 WHERE away_team = "north melbourne" | sql_create_context |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE 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,
... | SELECT SUM(t_kc24.OVE_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '苗婉丽' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2010-10-19' AND '2016-11-12' | css |
CREATE TABLE table_name_10 (
maximum_memory VARCHAR,
standard_memory VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum memory of the model that has a standard memory of 16 mb?
| SELECT maximum_memory FROM table_name_10 WHERE standard_memory = "16 mb" | sql_create_context |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Osteoarthrosis, unspecified whether generalized or localized, site unspecified" AND lab.flag = "abnormal" | mimicsql_data |
CREATE TABLE table_name_28 (
catalog VARCHAR,
format VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- From what catalog was the release that happened on April 12, 1968, and in LP format?
| SELECT catalog FROM table_name_28 WHERE format = "lp" AND date = "april 12, 1968" | sql_create_context |
CREATE TABLE table_203_409 (
id number,
"rank" number,
"representative" text,
"party" text,
"district" text,
"seniority date" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the congressman with the greatest seniority ?
| SELECT "representative" FROM table_203_409 ORDER BY "seniority date" LIMIT 1 | squall |
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.dod_year <= "2138.0" AND procedures.short_title = "Allo hem stem ct w/o pur" | mimicsql_data |
CREATE TABLE table_74903 (
"Year" real,
"Organisation" text,
"Award" text,
"Representative Work" text,
"Result" text
)
-- 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_74903 WHERE "Year" > '2005' AND "Result" = 'nominated' | wikisql |
CREATE TABLE Customers (
customer_id INTEGER,
customer_type_code VARCHAR(20),
address_line_1 VARCHAR(80),
address_line_2 VARCHAR(80),
town_city VARCHAR(80),
state VARCHAR(80),
email_address VARCHAR(255),
phone_number VARCHAR(80)
)
CREATE TABLE Complaints (
complaint_id INTEGER,
... | SELECT product_name, COUNT(*) FROM Products AS t1 JOIN Complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name | nvbench |
CREATE TABLE table_name_5 (
crowd INTEGER,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the crowd population of the home team located in Richmond?
| SELECT SUM(crowd) FROM table_name_5 WHERE home_team = "richmond" | sql_create_context |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | SELECT * FROM jyjgzbb WHERE JCZBMC = (SELECT JCZBMC FROM jyjgzbb WHERE JYZBLSH = '10565663393') AND JCZBJGDW = (SELECT JCZBJGDW FROM jyjgzbb WHERE JYZBLSH = '10565663393') AND JCZBJGDL < (SELECT JCZBJGDL FROM jyjgzbb WHERE JYZBLSH = '10565663393') | css |
CREATE TABLE table_21639 (
"Position" real,
"Team" text,
"Played" real,
"Won" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Average 1" text,
"Points 2" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT MAX("Drawn") FROM table_21639 WHERE "Goals For" = '72' | wikisql |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE semester (
semester_id int,
... | SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'WN' AND semester.year = 2017)) AND course.course_id = course_offering.course_id AND course.department = 'department0... | advising |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
Dup... | SELECT COUNT(p.Id), DAY(p.CreationDate) FROM Posts AS p JOIN PostTypes AS pt ON pt.Id = p.PostTypeId WHERE MONTH(p.CreationDate) = 10 AND YEAR(p.CreationDate) = 2018 AND Name = 'Question' GROUP BY DAY(p.CreationDate) ORDER BY COUNT(p.Id) | sede |
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_DIRE_CD text,
MED_DIRE_NM text,... | SELECT * FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '01213401110' AND t_kc22.MED_ORG_DEPT_NM LIKE '%推拿%' | css |
CREATE TABLE weekly_weather (
station_id int,
day_of_week text,
high_temperature int,
low_temperature int,
precipitation real,
wind_speed_mph int
)
CREATE TABLE route (
train_id int,
station_id int
)
CREATE TABLE station (
id int,
network_name text,
services text,
local... | SELECT network_name, COUNT(*) FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id GROUP BY t2.station_id ORDER BY COUNT(*) 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 * FROM jyjgzbb WHERE jyjgzbb.JCZBMC = (SELECT jyjgzbb.JCZBMC FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '43240617272') AND jyjgzbb.JCZBJGDW = (SELECT jyjgzbb.JCZBJGDW FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '43240617272') AND jyjgzbb.JCZBJGDL > (SELECT jyjgzbb.JCZBJGDL FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '43240617272') | css |
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varc... | 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 = 'HOUSTON' AND date_day.day_number = 27 AND date_day.month_number = 8 AND d... | atis |
CREATE TABLE table_name_1 (
champion__seed_ VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Champion of the Tournament with a Score of 79 75 OT?
| SELECT champion__seed_ FROM table_name_1 WHERE score = "79–75 ot" | sql_create_context |
CREATE TABLE table_26898 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What episode number in the... | SELECT MAX("No. in series") FROM table_26898 WHERE "Title" = 'Mean Teacher' | wikisql |
CREATE TABLE table_name_91 (
points_for VARCHAR,
club VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points are for the Fall Bay RFC club?
| SELECT points_for FROM table_name_91 WHERE club = "fall bay rfc" | sql_create_context |
CREATE TABLE table_name_11 (
country VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Country of the rowers with a Rank of 4?
| SELECT country FROM table_name_11 WHERE rank = 4 | 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 lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-74856')) AND DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TI... | eicu |
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.admityear < "2200" AND diagnoses.long_title = "Pseudomonas infection in conditions classified elsewhere and of unspecified site" | mimicsql_data |
CREATE TABLE table_43623 (
"Developer(s)" text,
"Release date" text,
"Required OS" text,
"Genre" text,
"Type" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the minimum operating system required by Stunlock Studios' game?
| SELECT "Required OS" FROM table_43623 WHERE "Developer(s)" = 'stunlock studios' | wikisql |
CREATE TABLE table_name_78 (
type VARCHAR,
tunnel VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Type of Tunnel is the Downhill Tunnel?
| SELECT type FROM table_name_78 WHERE tunnel = "downhill" | sql_create_context |
CREATE TABLE table_29329432_1 (
no INTEGER,
production_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least number for production code 3x6266
| SELECT MIN(no) FROM table_29329432_1 WHERE production_code = "3X6266" | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.days_stay > "17" | mimicsql_data |
CREATE TABLE table_name_16 (
pba_titles INTEGER,
tv_finals VARCHAR,
events VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which PBA Titles has a TV Finals larger than 6, and an Events larger than 20?
| SELECT AVG(pba_titles) FROM table_name_16 WHERE tv_finals > 6 AND events > 20 | sql_create_context |
CREATE TABLE table_77469 (
"Team" text,
"Athletes" text,
"Run 1" text,
"Run 2" text,
"Run 3" text,
"Run 4" text,
"Final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Run 2 has a Run 1 of 1:30.03?
| SELECT "Run 2" FROM table_77469 WHERE "Run 1" = '1:30.03' | wikisql |
CREATE TABLE table_name_99 (
name VARCHAR,
lane VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- for the rank of 8 and lane less than 3 what is the name?
| SELECT name FROM table_name_99 WHERE lane < 3 AND rank = 8 | sql_create_context |
CREATE TABLE table_23014685_1 (
intercepted_by_patriot VARCHAR,
area_damaged VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Was the missile intercepted by patriot when the parking lot was damaged?
| SELECT intercepted_by_patriot FROM table_23014685_1 WHERE area_damaged = "Parking lot" | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2158" AND procedures.long_title = "Spinal tap" | mimicsql_data |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT t_kc21.IN_HOSP_DAYS FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '17340163122' | css |
CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
Attorney_General text,
US_Senate text
)
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
... | SELECT County_name, Population FROM county ORDER BY County_name | nvbench |
CREATE TABLE table_17512 (
"Chapter" real,
"Chinese" text,
"Pinyin" text,
"Translation" text,
"Subject" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the pinyin for explaining music?
| SELECT "Pinyin" FROM table_17512 WHERE "Translation" = 'Explaining Music' | wikisql |
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adul... | SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType | nvbench |
CREATE TABLE table_name_28 (
qual VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the qual with a 19 rank?
| SELECT qual FROM table_name_28 WHERE rank = "19" | sql_create_context |
CREATE TABLE table_name_26 (
player VARCHAR,
draft VARCHAR,
pick VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the player in the 2008 draft with a pick greater than 5?
| SELECT player FROM table_name_26 WHERE draft = 2008 AND pick > 5 | sql_create_context |
CREATE TABLE table_11951237_4 (
title VARCHAR,
season__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many titles are there for season 8
| SELECT COUNT(title) FROM table_11951237_4 WHERE season__number = 8 | sql_create_context |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNotices (
Id num... | SELECT COUNT(Id) FROM Users WHERE CreationDate >= '01/01/2017' AND CreationDate <= '12/31/2017' | sede |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2167" AND procedures.short_title = "Endovasc embol hd/nk ves" | mimicsql_data |
CREATE TABLE table_7582 (
"1900s" real,
"1920s" real,
"1930s" real,
"1940s" real,
"1950s" real,
"1960s" real,
"1970s" real,
"1980s" real,
"1990s" real,
"2000s to date" real,
"Total to date" real
)
-- Using valid SQLite, answer the following questions for the tables provided... | SELECT AVG("1990s") FROM table_7582 WHERE "Total to date" = '1' AND "1980s" < '0' | wikisql |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE hz_info (
KH text,
KLX number... | SELECT zyjzjlb.ZYZYZDZZBM, zyjzjlb.ZYZYZDZZMC FROM zyjzjlb WHERE zyjzjlb.JZLSH = '66471271031' | css |
CREATE TABLE table_39748 (
"Year" text,
"Total" real,
"Wins" real,
"Losses" real,
"No result" real,
"% Win" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the win percentage when there's more than 16 totals and less than 7 losses?
| SELECT "% Win" FROM table_39748 WHERE "Total" > '16' AND "Losses" < '7' | wikisql |
CREATE TABLE gwyjzb (
CLINIC_ID text,
CLINIC_TYPE 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,
... | SELECT gwyjzb.IN_DIAG_DIS_CD, gwyjzb.IN_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '92143985' UNION SELECT fgwyjzb.IN_DIAG_DIS_CD, fgwyjzb.IN_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '92143985' | css |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE date_day (
month_number int,
d... | SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city, ground_service WHERE airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'BOSTON' AND ground_service.airport_code = airport.airport_code | atis |
CREATE TABLE table_316 (
"Player" text,
"Position" text,
"School" text,
"Hometown" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position did the kid from loganville, georgia play
| SELECT "Position" FROM table_316 WHERE "Hometown" = 'Loganville, Georgia' | wikisql |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '8674269' AND IN_HOSP_DATE BETWEEN '2004-07-15' AND '2005-02-17' AND CLINIC_TYPE = '购药' | css |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDa... | SELECT DAY(CreationDate) AS creationDay, MONTH(CreationDate) AS creationMonth, (CASE WHEN ParentId IS NULL THEN 1 ELSE 0 END) AS isAnswer, COUNT(Id) AS cnt FROM Posts WHERE YEAR(Posts.CreationDate) = 2019 AND Posts.DeletionDate IS NULL GROUP BY DAY(CreationDate), MONTH(CreationDate), (CASE WHEN ParentId IS NULL THEN 1 ... | sede |
CREATE TABLE table_name_50 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What 1992 has atp masters series for the 1995?
| SELECT 1992 FROM table_name_50 WHERE 1995 = "atp masters series" | sql_create_context |
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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime ... | SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 61003) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'iron') AND STRFTIME('%y-%m', labevents.charttime) >= '2102-12' GROUP BY STR... | mimic_iii |
CREATE TABLE table_2175858_1 (
laps VARCHAR,
race_time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many laps were completed in the race with time of 3:03:50?
| SELECT laps FROM table_2175858_1 WHERE race_time = "3:03:50" | sql_create_context |
CREATE TABLE Engineer_Skills (
engineer_id INTEGER,
skill_id INTEGER
)
CREATE TABLE Skills (
skill_id INTEGER,
skill_code VARCHAR(20),
skill_description VARCHAR(255)
)
CREATE TABLE Fault_Log_Parts (
fault_log_entry_id INTEGER,
part_fault_id INTEGER,
fault_status VARCHAR(10)
)
CREATE T... | SELECT T1.part_name, T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id ORDER BY T1.part_id DESC | nvbench |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
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.admityear < "2138" AND procedures.short_title = "Endosc destr stomach les" | mimicsql_data |
CREATE TABLE table_45367 (
"Year" real,
"Starts" real,
"Wins" real,
"Top 5" real,
"Top 10" real,
"Poles" real,
"Avg. Start" real,
"Avg. Finish" real,
"Winnings" text,
"Position" text,
"Team(s)" text
)
-- Using valid SQLite, answer the following questions for the tables prov... | SELECT AVG("Top 5") FROM table_45367 WHERE "Position" = '52nd' AND "Year" < '2000' | wikisql |
CREATE TABLE table_49893 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the opponent on November 14?
| SELECT "Opponent" FROM table_49893 WHERE "Date" = 'november 14' | wikisql |
CREATE TABLE table_44682 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Attendance" real,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of Game, when Attendance is gr... | SELECT SUM("Game") FROM table_44682 WHERE "Attendance" > '18,007' AND "Opponent" = 'minnesota wild' | wikisql |
CREATE TABLE Students (
student_id INTEGER,
student_details VARCHAR(255)
)
CREATE TABLE Student_Course_Attendance (
student_id INTEGER,
course_id INTEGER,
date_of_attendance DATETIME
)
CREATE TABLE Candidate_Assessments (
candidate_id INTEGER,
qualification CHAR(15),
assessment_date DA... | SELECT last_name, COUNT(last_name) FROM People GROUP BY last_name | nvbench |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Primary pulmonary hypertension" AND lab."CATEGORY" = "Blood Gas" | mimicsql_data |
CREATE TABLE table_name_72 (
area__km_2__ INTEGER,
code VARCHAR,
region VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest area with a Code of 66097, and a Region larger than 6?
| SELECT MAX(area__km_2__) FROM table_name_72 WHERE code = 66097 AND region > 6 | sql_create_context |
CREATE TABLE table_51342 (
"Record" text,
"Hard" text,
"Clay" text,
"Grass" text,
"Carpet" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which carpet has a Clay of 1 0 and a Hard 1 1?
| SELECT "Carpet" FROM table_51342 WHERE "Clay" = '1–0' AND "Hard" = '1–1' | wikisql |
CREATE TABLE table_33094 (
"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 smallest crowd size for a home game... | SELECT MIN("Crowd") FROM table_33094 WHERE "Home team" = 'richmond' | wikisql |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT MIN(Posts.CreationDate), COUNT(*) AS "posts per day" FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.Id = PostTags.PostId WHERE Tags.TagName = 'rust' AND Posts.CreationDate > '2019-01-01' GROUP BY TIME_TO_STR(Posts.CreationDate, '%d'), TIME_TO_STR(Posts.CreationDate, '%m'), TI... | sede |
CREATE TABLE table_name_66 (
artist VARCHAR,
draw VARCHAR,
english_translation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Artist that has the Draw smaller than 16, and the English translation of lullaby?
| SELECT artist FROM table_name_66 WHERE draw < 16 AND english_translation = "lullaby" | sql_create_context |
CREATE TABLE table_name_11 (
club_clubs VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what club(s) does Tony Lockett play?
| SELECT club_clubs FROM table_name_11 WHERE player = "tony lockett" | sql_create_context |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '魏蕴美' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2010-12-02' AND '2015-12-23' AND t_kc22.MED_INV_ITEM_TYPE = '手术费' | css |
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE TABLE writes (
aid int,
pid int
)
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE domain_publication (
did int,
pid int
)
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TABL... | SELECT AUTHOR_0.name FROM author AS AUTHOR_0, author AS AUTHOR_1, author AS AUTHOR_2, publication, writes AS WRITES_0, writes AS WRITES_1, writes AS WRITES_2 WHERE AUTHOR_1.name = 'H. V. Jagadish' AND AUTHOR_2.name = 'Divesh Srivastava' AND WRITES_0.aid = AUTHOR_0.aid AND WRITES_0.pid = publication.pid AND WRITES_1.aid... | academic |
CREATE TABLE table_221398_1 (
pop_density___km²_ VARCHAR,
number_in_map VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many prefectures have a population density of 16 people/kilometers squared?
| SELECT COUNT(pop_density___km²_) FROM table_221398_1 WHERE number_in_map = "16" | sql_create_context |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
... | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 21302 AND admissions.admission_location = 'transfer from hosp/extram' ORDER BY admissions.admittime DESC LIMIT 1 | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "77" AND prescriptions.drug = "Acetaminophen-Caff-Butalbital" | mimicsql_data |
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 T2.Name, COUNT(T2.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name | nvbench |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm... | 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 = 30235) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.item... | mimic_iii |
CREATE TABLE table_31391 (
"Season" text,
"Season premiere" text,
"Season finale" text,
"TV season" text,
"Ranking" text,
"Viewers (in millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the 2nd's season's ranking?
| SELECT "Ranking" FROM table_31391 WHERE "Season" = '2nd' | wikisql |
CREATE TABLE table_32537 (
"Pool" text,
"Age Group" text,
"Time" text,
"Event" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the time for the 50m breaststroke?
| SELECT "Time" FROM table_32537 WHERE "Event" = '50m breaststroke' | wikisql |
CREATE TABLE table_65555 (
"Year" real,
"Game" text,
"Genre" text,
"Platform(s)" text,
"Developer(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the platform of the genre RPG?
| SELECT "Platform(s)" FROM table_65555 WHERE "Genre" = 'rpg' | wikisql |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE patient (
uniquep... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'obtundation' AND DATETIME(diagnosis.diagnosistime)... | eicu |
CREATE TABLE business_rates (
business_rates_id number,
cmi_cross_ref_id number
)
CREATE TABLE council_tax (
council_tax_id number,
cmi_cross_ref_id number
)
CREATE TABLE parking_fines (
council_tax_id number,
cmi_cross_ref_id number
)
CREATE TABLE cmi_cross_references (
cmi_cross_ref_id ... | SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T1.cmi_details = 'Gottlieb , Becker and Wyman' | spider |
CREATE TABLE table_68758 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which date has a Tournament of la quinta?
| SELECT "Date" FROM table_68758 WHERE "Tournament" = 'la quinta' | wikisql |
CREATE TABLE table_30082 (
"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.
-- Name t... | SELECT "Date" FROM table_30082 WHERE "Score" = 'W 112-91' | wikisql |
CREATE TABLE table_61427 (
"County" text,
"Precincts" text,
"C. Abate" text,
"R. Bacon" text,
"D. Shulman" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number for D. Shulman if C. Abate has 728 (43%)
| SELECT "D. Shulman" FROM table_61427 WHERE "C. Abate" = '728 (43%)' | wikisql |
CREATE TABLE table_name_40 (
event VARCHAR,
rank_points VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What event has 8 as the rank points, with 20 as the total?
| SELECT event FROM table_name_40 WHERE rank_points = "8" AND total = "20" | sql_create_context |
CREATE TABLE table_50591 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the record when they pl... | SELECT "Record" FROM table_50591 WHERE "Game" = '58' | wikisql |
CREATE TABLE table_name_83 (
tries VARCHAR,
pens VARCHAR,
conv VARCHAR,
start VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total of tries for a player with conv smaller than 45, 19 starts and pens fewer than 22?
| SELECT COUNT(tries) FROM table_name_83 WHERE conv < 45 AND start = 19 AND pens < 22 | sql_create_context |
CREATE TABLE table_30011_2 (
prefix_class VARCHAR,
equivalent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every prefix class for the equivalent of NTE101?
| SELECT prefix_class FROM table_30011_2 WHERE equivalent = "NTE101" | sql_create_context |
CREATE TABLE table_65592 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total for the week in the game against the Chicago Bears
| SELECT COUNT("Week") FROM table_65592 WHERE "Opponent" = 'chicago bears' | 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 MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Government" AND demographic.dod_year < "2154.0" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.