instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_3362 (
"meas. num." real,
"passed" text,
"YES votes" real,
"NO votes" real,
"% YES" text,
"Const. Amd.?" text,
"type" text,
"description" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many no votes were there in t... | SELECT "NO votes" FROM table_3362 WHERE "description" = 'Partial public funding of election campaigns' | wikisql |
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRA... | atis |
CREATE TABLE table_43066 (
"Position" text,
"Jersey #" real,
"Name" text,
"Height (cm)" real,
"Weight (kg)" real,
"Birthdate" text,
"Birthplace" text,
"1990\u20131991 Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the avera... | SELECT AVG("Height (cm)") FROM table_43066 WHERE "Position" = 'd' AND "Birthplace" = 'new hope, minnesota' | wikisql |
CREATE TABLE table_name_15 (
title VARCHAR,
director VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the title for director p.j. hogan?
| SELECT title FROM table_name_15 WHERE director = "p.j. hogan" | 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 d_icd_procedures (
row_id number,
icd9_code text,
s... | SELECT t1.drug FROM (SELECT prescriptions.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 50 AND 59) GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 <= 4 | mimic_iii |
CREATE TABLE rooms (
roomid text,
roomname text,
beds number,
bedtype text,
maxoccupancy number,
baseprice number,
decor text
)
CREATE TABLE reservations (
code number,
room text,
checkin text,
checkout text,
rate number,
lastname text,
firstname text,
adults... | SELECT T2.roomname FROM reservations AS T1 JOIN rooms AS T2 ON T1.room = T2.roomid WHERE firstname LIKE '%ROY%' | spider |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_procedures (
row_i... | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 85169) AND STRFTIME('%y', procedures_icd.charttime) <= '2102' ORDER BY procedures_icd.charttime LIMIT 1 | mimic_iii |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE T... | SELECT a.ParentId AS "post_link" FROM Posts AS a JOIN Posts AS b ON b.ParentId = a.ParentId WHERE a.PostTypeId = 2 AND b.PostTypeId = 2 AND a.OwnerUserId = '##userid:int##' AND b.OwnerUserId = 9003 | sede |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.diagnosis = "ACUTE SUBDURAL HEMATOMA" | 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 COUNT(qtb.PERSON_ID) FROM qtb WHERE qtb.MED_SER_ORG_NO = '3922120' AND qtb.REMOTE_SETTLE_FLG = '异地1' OR qtb.REMOTE_SETTLE_FLG = '异地2' UNION SELECT COUNT(gyb.PERSON_ID) FROM gyb WHERE gyb.MED_SER_ORG_NO = '3922120' AND gyb.REMOTE_SETTLE_FLG = '异地1' OR gyb.REMOTE_SETTLE_FLG = '异地2' UNION SELECT COUNT(zyb.PERSON_ID... | css |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT Founder, AVG(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder DESC | nvbench |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Medicaid" AND demographic.admission_location = "EMERGENCY ROOM ADMIT" | mimicsql_data |
CREATE TABLE table_name_34 (
attendance INTEGER,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Attendance when the Time was 2:13?
| SELECT MIN(attendance) FROM table_name_34 WHERE time = "2:13" | sql_create_context |
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.JCFF FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.... | css |
CREATE TABLE table_57534 (
"Country" text,
"Interview" real,
"Swimsuit" real,
"Evening Gown" real,
"Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the sum of average for interview more than 9.57 and swimsuit more than 9.65
| SELECT SUM("Average") FROM table_57534 WHERE "Interview" > '9.57' AND "Swimsuit" > '9.65' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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_... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(DEPARTMENT_ID) DESC | nvbench |
CREATE TABLE table_51343 (
"Rank" real,
"Council area" text,
"Speakers" real,
"Population" real,
"Percentage(%)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most rank for population more than 93,378
| SELECT MAX("Rank") FROM table_51343 WHERE "Population" > '93,378' | wikisql |
CREATE TABLE table_204_489 (
id number,
"rank" number,
"name" text,
"height" text,
"floors" number,
"year" number,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many buildings have at least ten floors ?
| SELECT COUNT("name") FROM table_204_489 WHERE "floors" >= 10 | squall |
CREATE TABLE Payments (
payment_id INTEGER,
booking_id INTEGER,
customer_id INTEGER,
payment_type_code VARCHAR(15),
amount_paid_in_full_yn VARCHAR(1),
payment_date DATETIME,
amount_due DECIMAL(19,4),
amount_paid DECIMAL(19,4)
)
CREATE TABLE Products_for_Hire (
product_id INTEGER,
... | SELECT first_name, COUNT(*) FROM Customers AS T1 JOIN Bookings AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_22337 (
"City of license /Market" text,
"Station" text,
"Channel ( TV / RF )" text,
"Owned Since" real,
"Affiliation" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are all the stations with a license in Cincinnati?
| SELECT "Station" FROM table_22337 WHERE "City of license /Market" = 'Cincinnati' | wikisql |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
... | SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE | nvbench |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT All_Games, All_Games_Percent FROM basketball_match ORDER BY All_Games DESC | nvbench |
CREATE TABLE table_6106 (
"Celebrity" text,
"Known for" text,
"Entered" text,
"Exited" text,
"Finished" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On which day did the person who is known for the only way is essex star enter?
| SELECT "Entered" FROM table_6106 WHERE "Known for" = 'the only way is essex star' | wikisql |
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Draw a bar chart for what i... | SELECT gender, AVG(age) FROM Person GROUP BY gender ORDER BY gender DESC | nvbench |
CREATE TABLE table_name_39 (
time VARCHAR,
lane VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the time of the person in lane 7?
| SELECT time FROM table_name_39 WHERE lane = 7 | sql_create_context |
CREATE TABLE table_name_92 (
venue VARCHAR,
sport VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Venue has Basketball as a Sport?
| SELECT venue FROM table_name_92 WHERE sport = "basketball" | 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.dob FROM demographic WHERE demographic.subject_id = "3343" | mimicsql_data |
CREATE TABLE table_name_89 (
earnings_per_share__p_ INTEGER,
year_ended VARCHAR,
revenue__£million_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When revenue is smaller than 4,177 million in year 2008, what is the sum of earnings per share?
| SELECT SUM(earnings_per_share__p_) FROM table_name_89 WHERE year_ended = "2008" AND revenue__£million_ < 4 OFFSET 177 | sql_create_context |
CREATE TABLE table_49548 (
"Volume:Issue" text,
"Issue date(s)" text,
"Weeks at number one" real,
"Song" text,
"Artist(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Song has a Weeks at number one larger than 2, and an Issue date(s) of 17 ... | SELECT "Song" FROM table_49548 WHERE "Weeks at number one" > '2' AND "Issue date(s)" = '17 april - 8 may' | wikisql |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
... | SELECT (SELECT vitalperiodic.systemicsystolic FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-61539') AND NOT patient.unitdischarget... | eicu |
CREATE TABLE project_staff (
staff_id number,
project_id number,
role_code text,
date_from time,
date_to time,
other_details text
)
CREATE TABLE project_outcomes (
project_id number,
outcome_code text,
outcome_details text
)
CREATE TABLE documents (
document_id number,
docu... | SELECT T1.project_details FROM projects AS T1 JOIN project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%' | spider |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid num... | 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 = 'pancreatitis - chronic' AND DATETIME(diagnosis.dia... | eicu |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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... | SELECT jybgb.BGDH 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 = '33303356' AND jybgb.BGRQ BETWEEN '2011-04-24' AND '2015-10-06' UNION... | css |
CREATE TABLE table_5499 (
"Name" text,
"Hanzi" text,
"Origin" text,
"Launch" real,
"Owner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the earliest launch that was from Beijing?
| SELECT MIN("Launch") FROM table_5499 WHERE "Origin" = 'beijing' | wikisql |
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEG... | SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_65199 (
"Rank" real,
"Rider" text,
"Team" text,
"Speed" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Brian Mateer's Speed?
| SELECT "Speed" FROM table_65199 WHERE "Rider" = 'brian mateer' | wikisql |
CREATE TABLE table_name_41 (
wins INTEGER,
points VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest win number of the competitor who had 90 points before 1994?
| SELECT MIN(wins) FROM table_name_41 WHERE points = 90 AND year < 1994 | sql_create_context |
CREATE TABLE table_49770 (
"Game" real,
"Date" text,
"Opponent" 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.
-- Wh... | SELECT "Record" FROM table_49770 WHERE "Location/Attendance" = 'palace of auburn hills 8,108' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.dob_year < "2052" | mimicsql_data |
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE journal (
journalid int,
jo... | SELECT DISTINCT paperid FROM paper WHERE year = 2014 | scholar |
CREATE TABLE table_64221 (
"Event" text,
"Date" text,
"Location" text,
"Winning skip" text,
"Runner-up skip" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date shows Binia Feltscher-Beeli as the runner-up skip?
| SELECT "Date" FROM table_64221 WHERE "Runner-up skip" = 'binia feltscher-beeli' | wikisql |
CREATE TABLE program (
program_id number,
name text,
origin text,
launch number,
owner text
)
CREATE TABLE broadcast (
channel_id number,
program_id number,
time_of_day text
)
CREATE TABLE channel (
channel_id number,
name text,
owner text,
share_in_percent number,
... | SELECT COUNT(DISTINCT owner) FROM channel | spider |
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 = "Cardiac complications, not elsewhere classified" AND prescriptions.route = "DWELL" | mimicsql_data |
CREATE TABLE table_16162581_1 (
pinyin VARCHAR,
wade_giles VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of pinyin for hsin-y an-i-ma
| SELECT COUNT(pinyin) FROM table_16162581_1 WHERE wade_giles = "hsin-yüan-i-ma" | 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 gwyjzb.OUT_DIAG_DIS_CD, gwyjzb.OUT_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_NM = '朱同和' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 9872.67) UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, fgwyjzb.OUT_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '朱同和' AND fgwyjzb.... | css |
CREATE TABLE table_name_52 (
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was Home team Footscray's score?
| SELECT home_team AS score FROM table_name_52 WHERE home_team = "footscray" | sql_create_context |
CREATE TABLE table_18109 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the first election for john mchugh
| SELECT COUNT("First elected") FROM table_18109 WHERE "Incumbent" = 'John McHugh' | wikisql |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
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,
... | 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_ID = '01949589' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2005-03-23' AND '2014-10-28' AND t_kc22.MED_INV_ITEM_TYPE = '手术费' | css |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL v... | SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(SALARY) | nvbench |
CREATE TABLE table_73363 (
"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.
-- How many production codes ... | SELECT COUNT("Production code") FROM table_73363 WHERE "Title" = 'The Sub' | wikisql |
CREATE TABLE table_name_92 (
champion VARCHAR,
runner_up VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What champion has north melbourne as the runner-up?
| SELECT champion FROM table_name_92 WHERE runner_up = "north melbourne" | sql_create_context |
CREATE TABLE Parties (
Party_ID INTEGER,
Party_Details VARCHAR(255)
)
CREATE TABLE Agreements (
Document_ID INTEGER,
Event_ID INTEGER
)
CREATE TABLE Products_in_Events (
Product_in_Event_ID INTEGER,
Event_ID INTEGER,
Product_ID INTEGER
)
CREATE TABLE Products (
Product_ID INTEGER,
... | SELECT Product_Name, COUNT(Product_Name) FROM Products GROUP BY Product_Name ORDER BY COUNT(Product_Name) DESC | nvbench |
CREATE TABLE table_10473 (
"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.
-- What i... | SELECT "High assists" FROM table_10473 WHERE "High rebounds" = 'nick collison (11)' | wikisql |
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE dorm_amenity (
amenid number,
amenity_name text
)
CREATE TABLE lives_in (
stuid number,
dormid number,
room_number number
)... | SELECT AVG(age), MAX(age), sex FROM student GROUP BY sex | spider |
CREATE TABLE table_name_92 (
home VARCHAR,
series VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Home has a Series of series tied 3 3?
| SELECT home FROM table_name_92 WHERE series = "series tied 3–3" | sql_create_context |
CREATE TABLE table_68798 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" text,
"Best" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the team with the best of 1:43.134?
| SELECT "Team" FROM table_68798 WHERE "Best" = '1:43.134' | wikisql |
CREATE TABLE table_51897 (
"Player" text,
"Height" text,
"School" text,
"Hometown" text,
"College" text,
"NBA Draft" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player has a College of arizona?
| SELECT "Player" FROM table_51897 WHERE "College" = 'arizona' | wikisql |
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER... | SELECT Rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.Advisor GROUP BY T1.Rank | nvbench |
CREATE TABLE table_22916979_2 (
population__2000_census_ VARCHAR,
census_designated_place VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total number of population where census designated place is westmont?
| SELECT COUNT(population__2000_census_) FROM table_22916979_2 WHERE census_designated_place = "Westmont" | sql_create_context |
CREATE TABLE table_name_63 (
production_cost VARCHAR,
producer VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the production cost when the producer is raintree pictures?
| SELECT production_cost FROM table_name_63 WHERE producer = "raintree pictures" | sql_create_context |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid num... | SELECT MAX(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-35481')) AND lab.labname = '-bands' AND DATETIME(lab.labresulttime, 'start of ... | eicu |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.icd9_code = "5856" | mimicsql_data |
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 COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-34260')) AND vitalperiodic.respiration < 0.0 AND NOT vitalperiod... | eicu |
CREATE TABLE zyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '57773140' AND NOT qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 5299.72) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '57773140' AND NOT gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_... | css |
CREATE TABLE table_name_27 (
eagle_riders VARCHAR,
japanese_voice_actor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Eagle Riders character voiced by Japanese voice actor Katsuji Mori?
| SELECT eagle_riders FROM table_name_27 WHERE japanese_voice_actor = "katsuji mori" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "ED" | mimicsql_data |
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 AVG(demographic.age) FROM demographic WHERE demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND demographic.diagnosis = "LEFT FEMUR FRACTURE" | mimicsql_data |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'postsurgical hypot... | mimic_iii |
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 * FROM gwyjzb WHERE gwyjzb.PERSON_ID = '55245256' AND gwyjzb.MED_SER_ORG_NO = '6462307' AND NOT gwyjzb.MED_ORG_DEPT_NM LIKE '%针灸科%' UNION SELECT * FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '55245256' AND fgwyjzb.MED_SER_ORG_NO = '6462307' AND NOT fgwyjzb.MED_ORG_DEPT_NM LIKE '%针灸科%' | css |
CREATE TABLE table_name_26 (
year VARCHAR,
top_25 VARCHAR,
earnings__$_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year has a Top 25 of 0, and a Earnings ($) larger than 0?
| SELECT year FROM table_name_26 WHERE top_25 = 0 AND earnings__$_ > 0 | sql_create_context |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE C... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, LastAccessDate FROM Users WHERE LOWER(Location) LIKE '%hyderabad%' AND (LOWER(AboutMe) LIKE '%android%') ORDER BY Reputation DESC LIMIT 10 | sede |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE Users (
Id number,
Reputation number,... | SELECT COUNT(DISTINCT myAnswer.ParentId) AS cnt, tag.Id AS tagID, tag.TagName AS tagName FROM Posts AS myAnswer, PostTags AS a2t, Tags AS tag WHERE a2t.PostId = myAnswer.ParentId AND a2t.TagId = tag.Id AND myAnswer.OwnerUserId = @MyUserId AND myAnswer.PostTypeId = 2 GROUP BY tag.Id, tag.TagName ORDER BY cnt DESC | sede |
CREATE TABLE table_name_2 (
height_above_sea_level__m_ VARCHAR,
opened VARCHAR,
distance_from_wellington VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the height above sea level for the station opened 175.67km from Wellington prior to 1887?
| SELECT height_above_sea_level__m_ FROM table_name_2 WHERE opened < 1887 AND distance_from_wellington = "175.67km" | sql_create_context |
CREATE TABLE table_name_68 (
player VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What player scored 71-69-71=211?
| SELECT player FROM table_name_68 WHERE score = 71 - 69 - 71 = 211 | sql_create_context |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
... | SELECT COUNT(*) FROM Users | sede |
CREATE TABLE table_name_67 (
director_s_ VARCHAR,
title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What director(s) have the intouchables as the title?
| SELECT director_s_ FROM table_name_67 WHERE title = "the intouchables" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "STEMI" AND procedures.icd9_code = "9755" | mimicsql_data |
CREATE TABLE table_10283 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the sum of the grid with alfa romeo and toulo de graffenried
| SELECT SUM("Grid") FROM table_10283 WHERE "Constructor" = 'alfa romeo' AND "Driver" = 'toulo de graffenried' | wikisql |
CREATE TABLE table_40271 (
"Year" text,
"Team" text,
"Comp" text,
"Long" text,
"Rate" text,
"RAtt" text,
"RYds" text,
"RAvg" text,
"Lost" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the RYds when the RAtt was 2, and the co... | SELECT "RYds" FROM table_40271 WHERE "RAtt" = '2' AND "Comp" = '41' | wikisql |
CREATE TABLE table_63989 (
"Team #1" text,
"Agg." text,
"Team #2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the aggregate score of the matchup with a leg 2 of 72-64?
| SELECT "Agg." FROM table_63989 WHERE "2nd leg" = '72-64' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '矽肺(硅肺)Ⅲ期' AND jyjgzbb.JCZBMC = '三碘甲状腺原氨... | css |
CREATE TABLE table_203_372 (
id number,
"from" number,
"to" number,
"name" text,
"party" text,
"position" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what mayor of anglet town served for the same number of years as daubin ?
| SELECT "name" FROM table_203_372 WHERE "name" <> 'daubin' AND "to" - "from" = (SELECT "to" - "from" FROM table_203_372 WHERE "name" = 'daubin') | squall |
CREATE TABLE table_name_97 (
pick INTEGER,
school_club_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average pick number of Pennsylvania?
| SELECT AVG(pick) FROM table_name_97 WHERE school_club_team = "pennsylvania" | 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 prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "68" AND lab.fluid = "Ascites" | mimicsql_data |
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 employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
... | SELECT EMPLOYEE_ID, COMMISSION_PCT FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | nvbench |
CREATE TABLE table_75966 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of Team 2 with a Team 1 of Al Qadsia?
| SELECT "Team 2" FROM table_75966 WHERE "Team 1" = 'al qadsia' | wikisql |
CREATE TABLE table_name_47 (
top_25 VARCHAR,
top_10 VARCHAR,
events VARCHAR,
cuts_made VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of top-25s in events under 13, cuts made under 3, and 1 top-10?
| SELECT top_25 FROM table_name_47 WHERE events < 13 AND cuts_made < 3 AND top_10 = 1 | sql_create_context |
CREATE TABLE table_name_65 (
school VARCHAR,
height VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which school did the player have a height of 6-4?
| SELECT school FROM table_name_65 WHERE height = "6-4" | sql_create_context |
CREATE TABLE table_10655 (
"Concession" text,
"Date" real,
"Grantee" text,
"Size" text,
"County" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the county for mariano castro
| SELECT "County" FROM table_10655 WHERE "Grantee" = 'mariano castro' | wikisql |
CREATE TABLE table_51204 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the home team score 5.9 (39)?
| SELECT "Date" FROM table_51204 WHERE "Home team score" = '5.9 (39)' | wikisql |
CREATE TABLE table_name_26 (
circuit VARCHAR,
series VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Circuit, when Series is ASTC Round 4?
| SELECT circuit FROM table_name_26 WHERE series = "astc round 4" | sql_create_context |
CREATE TABLE table_51025 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Points difference" text,
"Bonus Points" text,
"Points" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How ma... | SELECT "Points for" FROM table_51025 WHERE "Club" = 'fall bay rfc' | wikisql |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
O... | SELECT COUNT(Id) AS Questions FROM Posts WHERE NOT ClosedDate IS NULL AND PostTypeId = 1 GROUP BY YEAR(CreationDate) ORDER BY YEAR(CreationDate) | sede |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code... | SELECT DISTINCT fare.fare_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_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN DIEGO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.c... | atis |
CREATE TABLE table_58557 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the silver medal count of the team that finished with 8 bronze medals?
| SELECT SUM("Silver") FROM table_58557 WHERE "Bronze" = '8' | wikisql |
CREATE TABLE table_36052 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many picks are there for defensive back for rounds larger than 11?
| SELECT COUNT("Pick") FROM table_36052 WHERE "Position" = 'defensive back' AND "Round" > '11' | wikisql |
CREATE TABLE table_name_68 (
innings VARCHAR,
runs VARCHAR,
matches VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the total Innings that has Runs of 1598, and Matches less than 41?
| SELECT COUNT(innings) FROM table_name_68 WHERE runs = 1598 AND matches < 41 | sql_create_context |
CREATE TABLE table_3410 (
"No." real,
"#" real,
"Episode" text,
"Writer" text,
"Director" text,
"Original air date" text,
"Viewing figure" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What episode number of the season is episode number 11 ... | SELECT MAX("#") FROM table_3410 WHERE "No." = '11' | wikisql |
CREATE TABLE table_22402438_7 (
college_junior_club_team VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many college/junior/clubteams have John garrett as the player?
| SELECT COUNT(college_junior_club_team) FROM table_22402438_7 WHERE player = "John Garrett" | sql_create_context |
CREATE TABLE table_12214 (
"Name" text,
"GP-GS" text,
"Gain" real,
"Loss" real,
"Long" real,
"Avg/G" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the total long for an avg/g over 0.2, fewer than 2 loss, and a gain less than 8?
| SELECT COUNT("Long") FROM table_12214 WHERE "Avg/G" > '0.2' AND "Loss" < '2' AND "Gain" < '8' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.