instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_66633 (
"Town" text,
"Population (2001)" real,
"Population rank" real,
"County" text,
"Municipality" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What town is from the mol tai district municipality and has a population rank of 1... | SELECT "Town" FROM table_66633 WHERE "Municipality" = 'molėtai district municipality' AND "Population (2001)" < '470' AND "Population rank" = '187' | wikisql |
CREATE TABLE table_204_164 (
id number,
"branding" text,
"callsign" text,
"frequency" text,
"power (kw)" text,
"location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the only radio station with a frequency below 90 mhz ?
| SELECT "branding" FROM table_204_164 WHERE "frequency" < 90 | squall |
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 jyjgzbb.JYZBLSH FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.B... | css |
CREATE TABLE table_name_12 (
attendance VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the attendance with a result of l 26 3
| SELECT attendance FROM table_name_12 WHERE result = "l 26–3" | sql_create_context |
CREATE TABLE region (
Region_id int,
Region_code text,
Region_name text
)
CREATE TABLE affected_region (
Region_id int,
Storm_ID int,
Number_city_affected real
)
CREATE TABLE storm (
Storm_ID int,
Name text,
Dates_active text,
Max_speed int,
Damage_millions_USD real,
Nu... | SELECT Region_name, COUNT(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.Region_id = T2.Region_id GROUP BY T1.Region_id | nvbench |
CREATE TABLE table_50444 (
"Scorer" text,
"Club" text,
"League goals" text,
"FA Cup goals" text,
"League Cup goals" text,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the amount of FA cups goals that were made when the total go... | SELECT "FA Cup goals" FROM table_50444 WHERE "Total" > '16' AND "League Cup goals" = '1' AND "Club" = 'norwich city' | wikisql |
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Other pulmonary embolism and infarction" AND prescriptions.route = "PO" | mimicsql_data |
CREATE TABLE table_name_54 (
ship VARCHAR,
commissioned VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Ship, when Commissioned is '13 March 1982'?
| SELECT ship FROM table_name_54 WHERE commissioned = "13 march 1982" | sql_create_context |
CREATE TABLE table_59576 (
"Name" text,
"Father" text,
"Birth" text,
"Marriage" text,
"Became Duchess" text,
"Ceased to be Duchess" text,
"Death" text,
"Spouse" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did the woman, who was m... | SELECT "Ceased to be Duchess" FROM table_59576 WHERE "Marriage" = '22 may 1657' | wikisql |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
... | SELECT patients.dob FROM patients WHERE patients.subject_id = 61527 | mimic_iii |
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 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 '2020-09-18' AND '2021-03-30' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.... | css |
CREATE TABLE table_51586 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance of the Florida vs. Montreal game?
| SELECT AVG("Attendance") FROM table_51586 WHERE "Home" = 'florida' AND "Visitor" = 'montreal' | wikisql |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Users.Id AS "user_link", Reputation, Location FROM Users, Badges WHERE Users.Id = Badges.UserId AND Badges.Class = 3 AND Badges.TagBased = 1 AND Badges.Name = 'node.js' AND LOWER(Users.Location) LIKE LOWER('%Norway%') ORDER BY Reputation DESC | sede |
CREATE TABLE table_11900773_6 (
design VARCHAR,
theme VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many stamps were designed for the theme of XII Summit de la Francophonie?
| SELECT COUNT(design) FROM table_11900773_6 WHERE theme = "XII Summit de la Francophonie" | sql_create_context |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'seizures' AND D... | eicu |
CREATE TABLE table_name_97 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many are there in 2003 that have 0 in 2001, more than 0 in 2009 and fewer than 0 in 1999?
| SELECT SUM(2003) FROM table_name_97 WHERE 2001 = 0 AND 2009 > 0 AND 1999 < 0 | 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 WHERE demographic.language = "PORT" AND demographic.age < "44" | mimicsql_data |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
... | SELECT Users.Id AS "user_link", COUNT(Answers.Id) AS Answers FROM Tags JOIN PostTags ON PostTags.TagId = Tags.Id JOIN Posts ON Posts.Id = PostTags.PostId JOIN Posts AS Answers ON Answers.ParentId = Posts.Id JOIN Users ON Users.Id = Answers.OwnerUserId WHERE Tags.TagName = '##TagName##' GROUP BY Users.Id ORDER BY Answer... | sede |
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 person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '魏丽文' AND hz_info.YLJGDM = '6694678' AND zyjzjlb.JZKSMC LIKE '%传染科%' | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemics... | SELECT COUNT(*) FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-23605')) AND microlab.culturesite = 'blood, venipuncture' AND DATETIME(microla... | eicu |
CREATE TABLE stock (
Shop_ID int,
Device_ID int,
Quantity int
)
CREATE TABLE shop (
Shop_ID int,
Shop_Name text,
Location text,
Open_Date text,
Open_Year int
)
CREATE TABLE device (
Device_ID int,
Device text,
Carrier text,
Package_Version text,
Applications text,
... | SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_name_93 (
place VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Place, when Player is 'Tony Lema'?
| SELECT place FROM table_name_93 WHERE player = "tony lema" | 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 admissions (
row_id number,
subject_id number,
hadm... | SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'inject/inf thrombo agent') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 60219) AND STRFTIME('%... | mimic_iii |
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
account_... | SELECT card_type_code, COUNT(card_type_code) FROM Customers_Cards GROUP BY card_type_code ORDER BY COUNT(card_type_code) | nvbench |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varcha... | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(MANAGER_ID) | nvbench |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.departure_time > 2100 AND flight.to_airport = AIRP... | atis |
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 jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND 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.JZ... | css |
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 zzmzjzjlb (
HXPLC number,
HZX... | SELECT COUNT(*) FROM person_info JOIN hz_info JOIN zzmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE person_info.XM = '水锐逸' AND zzmzjzjlb.JZKSRQ BETWEEN '2001-09-03' AND '2020-09-18' AND zzmzjzjlb.YLJGDM = '2777621' UNI... | css |
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 hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.person_info_XM = '蒋宏畅' AND hz_info.YLJGDM = '7067838' AND NOT zyjzjlb.JZKSMC LIKE '%骨科%' | css |
CREATE TABLE table_27175 (
"Player" text,
"Minutes" real,
"Field Goals" real,
"Rebounds" real,
"Assists" real,
"Steals" real,
"Blocks" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many long range shots did tonya edwa... | SELECT COUNT("Field Goals") FROM table_27175 WHERE "Player" = 'Tonya Edwards' | wikisql |
CREATE TABLE table_47628 (
"Season" real,
"Player" text,
"Club" text,
"Goals" real,
"Games" real,
"Rate" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the rate when there were more than 22 goals?
| SELECT "Rate" FROM table_47628 WHERE "Goals" > '22' | wikisql |
CREATE TABLE table_name_22 (
attendance VARCHAR,
loss VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance at the Red Sox game that had a loss of Wakefield (7 10)?
| SELECT attendance FROM table_name_22 WHERE loss = "wakefield (7–10)" | sql_create_context |
CREATE TABLE table_name_2 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the 2001 with 2007 of sf
| SELECT 2001 FROM table_name_2 WHERE 2007 = "sf" | sql_create_context |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jybgb.JYKSBM, jybgb.JYKSMC FROM jybgb WHERE jybgb.JZLSH = '41430407750' | css |
CREATE TABLE qtb (
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 WHERE qtb.MED_SER_ORG_NO = '2670365' AND qtb.IN_HOSP_DATE BETWEEN '2004-05-19' AND '2017-04-06' AND qtb.IN_DIAG_DIS_CD <> qtb.OUT_DIAG_DIS_CD UNION SELECT COUNT(*) FROM gyb WHERE gyb.MED_SER_ORG_NO = '2670365' AND gyb.IN_HOSP_DATE BETWEEN '2004-05-19' AND '2017-04-06' AND gyb.IN_DIAG_DIS_CD <> ... | css |
CREATE TABLE table_1342359_42 (
incumbent VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of incumbents for texas 12
| SELECT COUNT(incumbent) FROM table_1342359_42 WHERE district = "Texas 12" | sql_create_context |
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,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | SELECT (SELECT COUNT(*) FROM hz_info JOIN mzjzjlb JOIN jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '87156577' AND jybgb.BGRQ BETWEEN '2004-01-30' AND '2018-05-02'... | css |
CREATE TABLE Rooms (
roomName VARCHAR,
RoomId VARCHAR,
basePrice VARCHAR,
maxOccupancy VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find all the rooms that have a price higher than 160 and can accommodate more than 2 people. Report room names and i... | SELECT roomName, RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2 | sql_create_context |
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE program (
program_id int,
name varchar,
... | SELECT COUNT(*) > 0 FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN... | advising |
CREATE TABLE table_16906 (
"Model number" text,
"sSpec number" text,
"Frequency" text,
"L2 cache" text,
"FSB" text,
"Mult." text,
"Voltage" text,
"TDP" text,
"Socket" text,
"Release date" text,
"Part number(s)" text,
"Release price ( USD )" text
)
-- Using valid SQLite,... | SELECT "Frequency" FROM table_16906 WHERE "Part number(s)" = 'LF80537GF0411M' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "DIVORCED" AND prescriptions.route = "INHALATION" | mimicsql_data |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
... | SELECT number = ROW_NUMBER() OVER (ORDER BY YEAR(CreationDate), TIME_TO_STR(CreationDate, '%W')), (CAST(SUM(CASE WHEN (Tags LIKE '%<tensorflow>%') THEN 1 ELSE 0 END) AS FLOAT) * 100 / COUNT(Posts.Id)) AS "perc" FROM Posts WHERE (PostTypeId = 1 AND CreationDate >= '##Date1##' AND CreationDate <= '##Date2##') GROUP BY YE... | sede |
CREATE TABLE table_15175 (
"Stage" text,
"Date" text,
"Course" text,
"Distance" text,
"Winner" text,
"Race Leader" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the race leader for stage 5?
| SELECT "Race Leader" FROM table_15175 WHERE "Stage" = '5' | wikisql |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'micu') | mimic_iii |
CREATE TABLE table_name_34 (
chassis VARCHAR,
team VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the chassis for Augusto Scalbi on Team RP Motorsport?
| SELECT chassis FROM table_name_34 WHERE team = "rp motorsport" AND driver = "augusto scalbi" | sql_create_context |
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 '2008-02-14' AND '2009-12-01' AND gwyjzb.MED_SER_ORG_NO = '2986060' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_... | css |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE... | SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'vocal paral unilat total')) AND DATETIME(cost.chargetime, 'star... | mimic_iii |
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 txmzjzjlb.KH, txmzjzjlb.KLX FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '18195078262' UNION SELECT ftxmzjzjlb.KH, ftxmzjzjlb.KLX FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZLSH = '18195078262' | css |
CREATE TABLE table_name_39 (
print_name VARCHAR,
date_completed VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the print name in 07/87?
| SELECT print_name FROM table_name_39 WHERE date_completed = "07/87" | sql_create_context |
CREATE TABLE table_36258 (
"Date" text,
"State" text,
"George H.W. Bush" text,
"Bob Dole" text,
"Pat Robertson" text,
"Jack Kemp" text,
"Pete du Pont" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When Bob Dole had 26%, and Pete du Pont had... | SELECT "Pat Robertson" FROM table_36258 WHERE "Bob Dole" = '26%' AND "Pete du Pont" = '0%' | wikisql |
CREATE TABLE member_attendance (
Member_ID int,
Performance_ID int,
Num_of_Pieces int
)
CREATE TABLE performance (
Performance_ID real,
Date text,
Host text,
Location text,
Attendance int
)
CREATE TABLE member (
Member_ID text,
Name text,
Nationality text,
Role text
)
... | SELECT Location, COUNT(*) FROM performance GROUP BY Location ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_25258 (
"Number" real,
"Name" text,
"Position" text,
"Height" text,
"Experience" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How long has Mel Daniels been playing?
| SELECT "Experience" FROM table_25258 WHERE "Name" = 'Mel Daniels' | 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 COUNT(*) FROM zyjzjlb WHERE zyjzjlb.JZKSDM = '700' AND zyjzjlb.RYDJSJ BETWEEN '2001-04-20' AND '2005-06-26' | css |
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 demographic (
subject_id text,
hadm_id t... | SELECT demographic.discharge_location, demographic.diagnosis FROM demographic WHERE demographic.name = "Charley Pescatore" | mimicsql_data |
CREATE TABLE table_name_52 (
laps INTEGER,
rider VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many laps did pere riba ride?
| SELECT SUM(laps) FROM table_name_52 WHERE rider = "pere riba" | sql_create_context |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLO... | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY COUNT(HIRE_DATE) | nvbench |
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Pneumonitis due to inhalation of food or vomitus" | mimicsql_data |
CREATE TABLE table_43312 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many silvers did Turkey get?
| SELECT "Silver" FROM table_43312 WHERE "Nation" = 'turkey' | wikisql |
CREATE TABLE table_34015 (
"Year ended" text,
"Passengers flown" real,
"Employees (Average/Year)" real,
"Net profit/loss (SEK)" real,
"Basic eps (SEK)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Employees (Average/Year) have a Net profi... | SELECT COUNT("Employees (Average/Year)") FROM table_34015 WHERE "Net profit/loss (SEK)" > '4,936,000,000' AND "Basic eps (SEK)" > '1.06' | wikisql |
CREATE TABLE field (
fieldid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename... | SELECT DISTINCT keyphrase.keyphraseid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'jeffrey heer' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | scholar |
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description... | SELECT apt_number, room_count FROM Apartments ORDER BY apt_number 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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT demographic.admission_type FROM demographic WHERE demographic.name = "Evelyn Lawrence" | mimicsql_data |
CREATE TABLE table_13564702_3 (
points_for VARCHAR,
try_bonus VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of points for when try bonus is 10
| SELECT COUNT(points_for) FROM table_13564702_3 WHERE try_bonus = "10" | sql_create_context |
CREATE TABLE table_name_3 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which 2005 has a 2004 of 3 2?
| SELECT 2005 FROM table_name_3 WHERE 2004 = "3–2" | sql_create_context |
CREATE TABLE table_59812 (
"Rank" real,
"Show" text,
"Number of Viewers" text,
"Date" text,
"Network" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When has a Rank larger than 2 and a Network of itv?
| SELECT "Date" FROM table_59812 WHERE "Rank" > '2' AND "Network" = 'itv' | wikisql |
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.dod_year <= "2138.0" AND diagnoses.icd9_code = "53190" | mimicsql_data |
CREATE TABLE table_9288 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What opponent had a record of 37-27?
| SELECT "Opponent" FROM table_9288 WHERE "Record" = '37-27' | wikisql |
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.expire_flag = "0" AND diagnoses.long_title = "Intestinal bypass or anastomosis status" | 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 airline.airline_code FROM airline, airport, flight WHERE airport.airport_code = 'DAL' AND flight.airline_code = airline.airline_code AND flight.from_airport = airport.airport_code | atis |
CREATE TABLE table_25406 (
"Season" real,
"Episodes" real,
"Timeslot (ET)" text,
"Season Premiere" text,
"Season Finale" text,
"TV Season" text,
"Rank" text,
"Viewers (in millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was... | SELECT MAX("Season") FROM table_25406 WHERE "Season Premiere" = 'December 11, 2010' | wikisql |
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_... | SELECT DISTINCT flight.arrival_time, flight.departure_time FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND ... | atis |
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE student (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
tot_cred numeric(3,0)
)
CREATE TABLE teaches (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(... | SELECT building, COUNT(building) FROM department GROUP BY building ORDER BY building | nvbench |
CREATE TABLE table_name_29 (
lap_by_lap VARCHAR,
year VARCHAR,
ratings VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the lap-by-lap broadcaster before 1994 who garnered ratings of 8.0/21?
| SELECT lap_by_lap FROM table_name_29 WHERE year < 1994 AND ratings = "8.0/21" | sql_create_context |
CREATE TABLE table_30804 (
"Year" text,
"Position" real,
"Games played" real,
"Won" real,
"Tied" real,
"Lost" real,
"Goals Scored" real,
"Goals Against" real,
"Points" real,
"Postseason place" text
)
-- Using valid SQLite, answer the following questions for the tables provided ... | SELECT "Goals Scored" FROM table_30804 WHERE "Position" = '17' AND "Tied" = '5' | wikisql |
CREATE TABLE table_22552 (
"Nation" text,
"Rider" text,
"Horse" text,
"Cross Country Penalties" text,
"Total Penalties" text,
"Total Team Penalties" text,
"Team Rank" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which nation is where the h... | SELECT "Nation" FROM table_22552 WHERE "Horse" = 'Parkmore Ed' | wikisql |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
P... | SELECT AVG(LENGTH(Body)) AS AverageLength, AVG(Score) AS QuestionScore, AVG(Score) + STDEV(Score) AS PlusOneSigma, AVG(Score) - STDEV(Score) AS MinusOneSigma FROM Posts WHERE PostTypeId = 1 AND LENGTH(Body) <= 8000 GROUP BY ROUND(LENGTH(Body), -2) ORDER BY ROUND(LENGTH(Body), -2) | sede |
CREATE TABLE table_name_7 (
title_rank VARCHAR,
series VARCHAR,
character VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title rank of the actor who played the character of arthur hastings during series 1-8, 13?
| SELECT title_rank FROM table_name_7 WHERE series = "1-8, 13" AND character = "arthur hastings" | sql_create_context |
CREATE TABLE table_27103 (
"Total" real,
"#" real,
"Title" text,
"Director" text,
"Writer(s)" text,
"Viewers" text,
"Air date" text,
"Production code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 3 is the number what is the highes... | SELECT MAX("Total") FROM table_27103 WHERE "#" = '3' | wikisql |
CREATE TABLE table_54298 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the margin of victory for the winning score of 10 (71-65-68-70=274)?
| SELECT "Margin of victory" FROM table_54298 WHERE "Winning score" = '−10 (71-65-68-70=274)' | wikisql |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CRE... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'ATLANTA' AND ground_service.city_code = city.city_code | atis |
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 COUNT(*) > 0 FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2238 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1)) AND inputevents_c... | mimic_iii |
CREATE TABLE table_5435 (
"Church name" text,
"Organized by" text,
"Date" text,
"Split off / Continuation of" text,
"Current status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Independent Church's Split off/ Continuation?
| SELECT "Split off / Continuation of" FROM table_5435 WHERE "Church name" = 'independent church' | wikisql |
CREATE TABLE table_203_486 (
id number,
"place" number,
"team" text,
"matches" number,
"won" number,
"drawn" number,
"lost" number,
"difference" text,
"points" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which country performed ... | SELECT "team" FROM table_203_486 WHERE "team" IN ('switzerland', 'great britain') ORDER BY "place" LIMIT 1 | squall |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number... | SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-67644' AND NOT patient.hospitaldischargetime IS NULL ORDER BY pati... | eicu |
CREATE TABLE table_78185 (
"Title" text,
"Published in" text,
"Publication Date" text,
"Setting" text,
"Fictional date" text,
"Main characters" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name what was published in july 1934 with a setting of... | SELECT "Published in" FROM table_78185 WHERE "Setting" = 'mars' AND "Publication Date" = 'july 1934' | wikisql |
CREATE TABLE table_name_33 (
team_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the second leg that Valencia was on?
| SELECT 2 AS nd_leg FROM table_name_33 WHERE team_2 = "valencia" | 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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.short_title = "Joint replaced knee" | mimicsql_data |
CREATE TABLE table_45011 (
"Fin. Pos" text,
"Car No." text,
"Driver" text,
"Team" text,
"Laps" text,
"Time/Retired" text,
"Grid" text,
"Laps Led" text,
"Points" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team had a driver w... | SELECT "Team" FROM table_45011 WHERE "Fin. Pos" = '7' | wikisql |
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
... | 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 = 'ST. PETERSBURG' AND date_day.day_number = 23 AND date_day.month_number = ... | atis |
CREATE TABLE table_name_42 (
gold VARCHAR,
rank VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the gold medal count ranked 2 with a total of more than 21?
| SELECT COUNT(gold) FROM table_name_42 WHERE rank = 2 AND total > 21 | 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 t_kc22.t_kc21_MED_SER_ORG_NO FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '金晴画' AND t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '阿卡波糖片') | css |
CREATE TABLE table_name_47 (
touchdowns INTEGER,
player VARCHAR,
extra_points VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Touchdowns have an Extra points of 0, and Points larger than 5, and a Player of curtis redden?
| SELECT AVG(touchdowns) FROM table_name_47 WHERE extra_points = 0 AND points > 5 AND player = "curtis redden" | sql_create_context |
CREATE TABLE college (
college_id text,
name_full text,
city text,
state text,
country text
)
CREATE TABLE fielding (
player_id text,
year number,
stint number,
team_id text,
league_id text,
pos text,
g number,
gs number,
inn_outs number,
po number,
a num... | SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961 | spider |
CREATE TABLE table_name_37 (
award VARCHAR,
year VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which award was nominated for in 2000?
| SELECT award FROM table_name_37 WHERE year = 2000 AND result = "nominated" | sql_create_context |
CREATE TABLE table_48696 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of departure" text,
"Incoming manager" text,
"Date hired" text,
"Position in table" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was th... | SELECT "Manner of departure" FROM table_48696 WHERE "Outgoing manager" = 'miguel brindisi' | wikisql |
CREATE TABLE table_80373 (
"2002/ 03" text,
"2004/ 05" text,
"2006/ 07" text,
"2007/ 08" text,
"2008/ 09" text,
"2009/ 10" text,
"2010/ 11" text,
"2011/ 12" text,
"2012/ 13" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the 200... | SELECT "2006/ 07" FROM table_80373 WHERE "2011/ 12" = 'lq' AND "2010/ 11" = 'lq' AND "2002/ 03" = 'lq' | wikisql |
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_l... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = '... | advising |
CREATE TABLE table_32870 (
"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 away team's score when the crowd wa... | SELECT "Away team score" FROM table_32870 WHERE "Crowd" > '16,500' AND "Home team score" = '15.15 (105)' | wikisql |
CREATE TABLE table_name_65 (
year_s__won VARCHAR,
finish VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Year(s) Won, when Finish is 'T31', and when Player is 'Nick Price'?
| SELECT year_s__won FROM table_name_65 WHERE finish = "t31" AND player = "nick price" | sql_create_context |
CREATE TABLE table_name_21 (
height VARCHAR,
name VARCHAR,
spike VARCHAR,
block VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Height(s), when Spike is less than 352, when Block is greater than 300, and when Name is Pablo ... | SELECT COUNT(height) FROM table_name_21 WHERE spike < 352 AND block > 300 AND name = "pablo meana" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.