instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '华曼衍' AND NOT MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT > 7616.57) | css |
CREATE TABLE table_2614 (
"Stage" real,
"Stage winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Malaysian rider classification" text,
"Team classification" text,
"Malaysian team classification" text
)
-- Using valid SQLite, an... | SELECT "Malaysian team classification" FROM table_2614 WHERE "Points classification" = 'Mohd Nur Rizuan Zainal' | wikisql |
CREATE TABLE table_name_25 (
network VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the network in 2011?
| SELECT network FROM table_name_25 WHERE year = 2011 | sql_create_context |
CREATE TABLE table_45183 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" text,
"Competition" text,
"Man of the Match" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which competition has stuart potts as the man of t... | SELECT "Competition" FROM table_45183 WHERE "Man of the Match" = 'stuart potts' | wikisql |
CREATE TABLE table_20567 (
"Year" real,
"GDP Nominal ($ billions)" text,
"GDP Adjusted ($ billions)" text,
"Population (millions)" text,
"GDP per capita Nominal ($)" real,
"GDP per capita Adjusted ($)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "GDP Adjusted ($ billions)" FROM table_20567 WHERE "Population (millions)" = '5.141' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | SELECT zyjybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE person_info.XM = '蒋夏彤' ... | css |
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId n... | SELECT (1.0 * (SELECT COUNT(*) FROM Users WHERE Reputation > 1)) / (1.0 * (SELECT COUNT(*) FROM Users)) * 100 | sede |
CREATE TABLE pilot (
pilot_id number,
pilot_name text,
rank number,
age number,
nationality text,
position text,
join_year number,
team text
)
CREATE TABLE aircraft (
aircraft_id number,
order_year number,
manufacturer text,
model text,
fleet_series text,
powertr... | SELECT nationality, COUNT(*) FROM pilot GROUP BY nationality | spider |
CREATE TABLE gyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT qtb.FLX_MED_ORG_ID FROM qtb WHERE qtb.MED_CLINIC_ID = '05496713735' UNION SELECT gyb.FLX_MED_ORG_ID FROM gyb WHERE gyb.MED_CLINIC_ID = '05496713735' UNION SELECT zyb.FLX_MED_ORG_ID FROM zyb WHERE zyb.MED_CLINIC_ID = '05496713735' UNION SELECT mzb.FLX_MED_ORG_ID FROM mzb WHERE mzb.MED_CLINIC_ID = '05496713735' | css |
CREATE TABLE table_467 (
"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.
-- Who was the writters for the... | SELECT "Written by" FROM table_467 WHERE "Directed by" = 'Richard L. Bare' AND "No. in season" = '8' | wikisql |
CREATE TABLE table_204_324 (
id number,
"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.
-- are there at least 4 teams in the column of team 2 ?
| SELECT (SELECT COUNT("team 2") FROM table_204_324) > 4 | squall |
CREATE TABLE table_name_51 (
year INTEGER,
trim VARCHAR,
power VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the Year average that's got Trim of LS/LT and Power of HP (KW)?
| SELECT AVG(year) FROM table_name_51 WHERE trim = "ls/lt" AND power = "hp (kw)" | sql_create_context |
CREATE TABLE manufacturers (
headquarter VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the number of manufactures that are based in Tokyo or Beijing.
| SELECT COUNT(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing' | sql_create_context |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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,
H... | SELECT SUM(t_kc22.QTY), SUM(t_kc22.AMOUNT) FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_CD = '8954-j' AND t_kc22.STA_DATE BETWEEN '2009-03-05' AND '2017-06-25' | css |
CREATE TABLE ARTIST (
artistid VARCHAR
)
CREATE TABLE ALBUM (
artistid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many artists do not have any album?
| SELECT COUNT(*) FROM ARTIST WHERE NOT artistid IN (SELECT artistid FROM ALBUM) | sql_create_context |
CREATE TABLE table_name_14 (
driver VARCHAR,
laps VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What driver has less than 18 laps and a grid number under 16?
| SELECT driver FROM table_name_14 WHERE laps < 18 AND grid < 16 | sql_create_context |
CREATE TABLE table_14098_1 (
country_or_territory_with_flag VARCHAR,
capital VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country'c capital is santiago?
| SELECT country_or_territory_with_flag FROM table_14098_1 WHERE capital = "Santiago" | sql_create_context |
CREATE TABLE table_name_97 (
played INTEGER,
points VARCHAR,
lost VARCHAR,
drawn VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Played has a Lost larger than 14, and a Drawn of 10, and Points larger than 46?
| SELECT AVG(played) FROM table_name_97 WHERE lost > 14 AND drawn = 10 AND points > 46 | sql_create_context |
CREATE TABLE table_27599216_6 (
capacity VARCHAR,
institution VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the capacity for the institution of university of alberta?
| SELECT capacity FROM table_27599216_6 WHERE institution = "University of Alberta" | sql_create_context |
CREATE TABLE table_name_70 (
color_commentator_s_ VARCHAR,
network VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the color commentator for ESPN from 1990 to 1992?
| SELECT color_commentator_s_ FROM table_name_70 WHERE network = "espn" | sql_create_context |
CREATE TABLE table_18161217_2 (
cospar_id VARCHAR,
satellite VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What it the international designation for the kosmos 2379 satellite?
| SELECT cospar_id FROM table_18161217_2 WHERE satellite = "Kosmos 2379" | sql_create_context |
CREATE TABLE table_5205 (
"Position" text,
"Game 1" text,
"Game 2" text,
"Game 3" text,
"Exhibition*" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Position has a Game 1 of noel cleal?
| SELECT "Position" FROM table_5205 WHERE "Game 1" = 'noel cleal' | wikisql |
CREATE TABLE aircraft (
aid number(9,0),
name varchar2(30),
distance number(6,0)
)
CREATE TABLE employee (
eid number(9,0),
name varchar2(30),
salary number(10,2)
)
CREATE TABLE certificate (
eid number(9,0),
aid number(9,0)
)
CREATE TABLE flight (
flno number(4,0),
origin var... | SELECT destination, COUNT(destination) FROM flight WHERE price > 300 GROUP BY destination | nvbench |
CREATE TABLE table_23528223_2 (
written_by VARCHAR,
us_viewers__millions_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who wrote the episode seen by 10.64 million people in the US?
| SELECT written_by FROM table_23528223_2 WHERE us_viewers__millions_ = "10.64" | sql_create_context |
CREATE TABLE table_name_66 (
class VARCHAR,
no_built VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which class at 55 built?
| SELECT class FROM table_name_66 WHERE no_built = 55 | sql_create_context |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
v... | 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 = 2518 AND admissions.dischtime IS NULL)) AND chartevents.itemid IN (SELECT d_items.itemid FROM ... | mimic_iii |
CREATE TABLE table_225880_1 (
year INTEGER,
runner_s__up VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least year for walter hagen
| SELECT MIN(year) FROM table_225880_1 WHERE runner_s__up = "Walter Hagen" | 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 zyjzjlb.JZLSH 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 NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2019-07-16') | css |
CREATE TABLE INVOICES (
Product_ID VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the product ID of the most frequently ordered item on invoices?
| SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1 | sql_create_context |
CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER numeric,
DEPT_CODE varchar(18),
STU_PHONE varchar(4),
PROF_NUM int
)
CREATE TABLE CL... | SELECT DEPT_CODE, COUNT(*) FROM STUDENT GROUP BY DEPT_CODE ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_name_31 (
final_score VARCHAR,
opponent VARCHAR,
town VARCHAR,
year VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the final score in 2007 for the world league in novi sad played against Italy?
| SELECT final_score FROM table_name_31 WHERE year = 2007 AND competition = "world league" AND town = "novi sad" AND opponent = "italy" | sql_create_context |
CREATE TABLE table_8341 (
"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 is the highest game whose score was 94-116
| SELECT MAX("Game") FROM table_8341 WHERE "Score" = '94-116' | wikisql |
CREATE TABLE table_60465 (
"Golden Rivers" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of byes when the wins were 9?
| SELECT COUNT("Byes") FROM table_60465 WHERE "Wins" = '9' | wikisql |
CREATE TABLE table_21655290_1 (
film_title_used_in_nomination VARCHAR,
original_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which film title used in nomination has vinterkyss as the original title?
| SELECT film_title_used_in_nomination FROM table_21655290_1 WHERE original_title = "Vinterkyss" | sql_create_context |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_AGE <= 21) | css |
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 zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC 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 = '李宇航' | css |
CREATE TABLE table_69283 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real,
"Away Fans" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the lowest attendance at a game when there were fewer than 151 away fans... | SELECT MIN("Attendance") FROM table_69283 WHERE "Away Fans" < '151' AND "Opponent" = 'bury' | wikisql |
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 COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '2594151' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2004-10-21' AND '2007-11-27' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) >= 4929.26) AS T | css |
CREATE TABLE table_60661 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what place is the player with a score of 72-66-75=213?
| SELECT "Place" FROM table_60661 WHERE "Score" = '72-66-75=213' | wikisql |
CREATE TABLE table_203_685 (
id number,
"no. in\nseries" number,
"no. in\nseason" number,
"title" text,
"directed by" text,
"written by" text,
"original air date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- after the first episode , when ... | SELECT "no. in\nseason" FROM table_203_685 WHERE "no. in\nseason" <> 1 AND "written by" = 'will dixon' LIMIT 1 | squall |
CREATE TABLE Behavior_Incident (
incident_id INTEGER,
incident_type_code VARCHAR(10),
student_id INTEGER,
date_incident_start DATETIME,
date_incident_end DATETIME,
incident_summary VARCHAR(255),
recommendations VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Teachers (
teach... | SELECT date_of_notes, COUNT(date_of_notes) FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = "Fanny" ORDER BY COUNT(date_of_notes) | nvbench |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE... | SELECT * FROM Posts ORDER BY Posts.Score DESC LIMIT 10 | sede |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
CO... | SELECT JOB_ID, SUM(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID | nvbench |
CREATE TABLE table_39163 (
"Rank" real,
"Rider" text,
"Team" text,
"Speed" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Rider of the LCR Honda 600CC Team with a Time of 59 22.80?
| SELECT "Rider" FROM table_39163 WHERE "Team" = 'lcr honda 600cc' AND "Time" = '59’ 22.80' | wikisql |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE transfers (
row_id number... | SELECT t2.drug FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 45321 AND procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_proce... | mimic_iii |
CREATE TABLE table_name_87 (
glendale VARCHAR,
pasadena VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the percentage of Glendale when Pasadena is 14%?
| SELECT glendale FROM table_name_87 WHERE pasadena = "14%" | sql_create_context |
CREATE TABLE Order_Items (
order_id INTEGER,
product_id INTEGER,
order_quantity VARCHAR(15)
)
CREATE TABLE Customer_Addresses (
customer_id INTEGER,
address_id INTEGER,
date_address_from DATETIME,
address_type VARCHAR(15),
date_address_to DATETIME
)
CREATE TABLE Customers (
custome... | SELECT date_became_customer, COUNT(date_became_customer) FROM Customers WHERE customer_id BETWEEN 10 AND 20 ORDER BY COUNT(date_became_customer) DESC | nvbench |
CREATE TABLE table_65855 (
"Year (Ceremony)" text,
"Actor/Actress" text,
"Category" text,
"Film title used in nomination" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What category was al pacino nominated for in the film, glengarry ... | SELECT "Category" FROM table_65855 WHERE "Actor/Actress" = 'al pacino' AND "Film title used in nomination" = 'glengarry glen ross' | wikisql |
CREATE TABLE table_25390694_2 (
production_code VARCHAR,
writer VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the production code of the episode written by Brendan Cowell?
| SELECT production_code FROM table_25390694_2 WHERE writer = "Brendan Cowell" | sql_create_context |
CREATE TABLE table_name_5 (
game INTEGER,
location VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least game for october 10 at shibe park
| SELECT MIN(game) FROM table_name_5 WHERE location = "shibe park" AND date = "october 10" | 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 COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '47170641' AND t_kc22.STA_DATE BETWEEN '2003-05-14' AND '2009-01-31' AND t_kc22.SELF_PAY_AMO > 6302.95 | css |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-109861')) AND medication.drugname = 'morphine' AND DATETIM... | eicu |
CREATE TABLE table_name_6 (
high_rebounds VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is High Rebounds, when Score is 61-59?
| SELECT high_rebounds FROM table_name_6 WHERE score = "61-59" | 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 COUNT(*) FROM zzmzjzjlb WHERE zzmzjzjlb.YLJGDM = '5779181' AND zzmzjzjlb.JZKSRQ BETWEEN '2014-12-11' AND '2018-04-18' AND zzmzjzjlb.ZSEBZ > 0 UNION SELECT COUNT(*) FROM fzzmzjzjlb WHERE fzzmzjzjlb.YLJGDM = '5779181' AND fzzmzjzjlb.JZKSRQ BETWEEN '2014-12-11' AND '2018-04-18' AND fzzmzjzjlb.ZSEBZ > 0 | css |
CREATE TABLE table_78858 (
"Rank" real,
"Athlete" text,
"Nandao" real,
"Nanquan" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Nanquan has a Nandao smaller than 9.44, and a Rank smaller than 9, and a Total larger than 18.68?
| SELECT MIN("Nanquan") FROM table_78858 WHERE "Nandao" < '9.44' AND "Rank" < '9' AND "Total" > '18.68' | wikisql |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type t... | SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25461 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1)) AND ch... | mimic_iii |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellv... | SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '025-53910' AND STRFTIME('%y', patient.hospitaladmittime) <= '2104' | eicu |
CREATE TABLE table_203_810 (
id number,
"#" number,
"title" text,
"songwriters" text,
"producer(s)" text,
"performer (s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- on how many songs is m. isham listed as a songwriter ?
| SELECT COUNT("title") FROM table_203_810 WHERE "songwriters" = 'm. isham' | squall |
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 mzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_info.person_i... | css |
CREATE TABLE table_67958 (
"Year" real,
"Population (Region total)" real,
"Population (Stanthorpe)" real,
"Population (Warwick)" real,
"Population (Allora)" real,
"Population (Glengallan)" real,
"Population (Rosenthal)" real
)
-- Using valid SQLite, answer the following questions for the t... | SELECT COUNT("Population (Region total)") FROM table_67958 WHERE "Population (Rosenthal)" < '2,460' AND "Population (Glengallan)" = '4,639' AND "Population (Allora)" > '2,106' | wikisql |
CREATE TABLE table_39706 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the game with a score of 15 6?
| SELECT "Date" FROM table_39706 WHERE "Score" = '15–6' | wikisql |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE admis... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 60136) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE... | mimic_iii |
CREATE TABLE table_75036 (
"Games" real,
"First" real,
"Last" real,
"Gold" real,
"Bronze" real,
"Total" real,
"Best finish (first/last)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games are associated with over 0 golds and a fir... | SELECT SUM("Games") FROM table_75036 WHERE "Gold" > '0' AND "First" < '2008' | wikisql |
CREATE TABLE table_6057 (
"Functions" text,
"s Default argument" text,
"Lambda functions" text,
"eval function" text,
"Pseudorandom number generation" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the s default argument without a pseudorand... | SELECT "s Default argument" FROM table_6057 WHERE "Pseudorandom number generation" = 'no' AND "eval function" = 'no' | wikisql |
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Student_Tests_Taken (
registration_id INTEGER,
date_test_taken DATETIME,
test_result VARCHAR(255)
)
CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARC... | SELECT author_id, gender_mf FROM Course_Authors_and_Tutors ORDER BY personal_name | nvbench |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
chart... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_i... | mimic_iii |
CREATE TABLE table_52148 (
"Constructor" text,
"Chassis" text,
"Engine" text,
"Tyre" text,
"Driver" text,
"Rounds" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In rounds 7-13 what engine was featured?
| SELECT "Engine" FROM table_52148 WHERE "Rounds" = '7-13' | wikisql |
CREATE TABLE Ref_document_types (
document_type_code VARCHAR,
document_type_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the document type code for document type 'Paper'?
| SELECT document_type_code FROM Ref_document_types WHERE document_type_name = "Paper" | sql_create_context |
CREATE TABLE Student_Tests_Taken (
registration_id VARCHAR,
test_result VARCHAR
)
CREATE TABLE Student_Course_Enrolment (
date_of_enrolment VARCHAR,
registration_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the enrollment dates of all ... | SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" | sql_create_context |
CREATE TABLE table_26202847_6 (
championship VARCHAR,
score_in_the_final VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is the championship where 6 1, 3 6, 3 6 is the score in the final?
| SELECT championship FROM table_26202847_6 WHERE score_in_the_final = "6–1, 3–6, 3–6" | sql_create_context |
CREATE TABLE table_name_17 (
_percentage_of_pop INTEGER,
country__or_dependent_territory_ VARCHAR,
average_relative_annual_growth___percentage_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average % of population Tunisia, which has an avera... | SELECT AVG(_percentage_of_pop) FROM table_name_17 WHERE country__or_dependent_territory_ = "tunisia" AND average_relative_annual_growth___percentage_ < 1.03 | sql_create_context |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT IN_DIAG_DIS_CD, IN_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '28022050' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT >= 7272.12) | css |
CREATE TABLE table_26022 (
"Series #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (in millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the amount of U.S. viewers is 2.14 million,... | SELECT "Directed by" FROM table_26022 WHERE "U.S. viewers (in millions)" = '2.14' | 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 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "WIDOWED" AND prescriptions.route = "OU" | mimicsql_data |
CREATE TABLE table_name_27 (
fa_trophy VARCHAR,
player VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many FA trophies did Ceri Williams get with a smaller total than 19?
| SELECT COUNT(fa_trophy) FROM table_name_27 WHERE player = "ceri williams" AND total < 19 | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "59" AND prescriptions.drug = "Ranitidine" | mimicsql_data |
CREATE TABLE table_353 (
"Year" real,
"Song name" text,
"Film name" text,
"Co-singer" text,
"Music director" text,
"Lyricist" text,
"Language" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what are the song names for the film kaal bhairav?
| SELECT "Song name" FROM table_353 WHERE "Film name" = 'Kaal Bhairav' | wikisql |
CREATE TABLE table_75848 (
"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 rank of the nation with more than 0 silver medals and 38 bronze medals?
| SELECT "Rank" FROM table_75848 WHERE "Silver" > '0' AND "Bronze" = '38' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodici... | SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '027-124213' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY patient.hospitaladmittime LIMIT 1 | eicu |
CREATE TABLE table_name_88 (
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- With a 1992 result of A, and at the U.S. Open Tournament, what is the 1989 result?
| SELECT 1989 FROM table_name_88 WHERE 1992 = "a" AND tournament = "u.s. open" | sql_create_context |
CREATE TABLE table_1538516_1 (
glass_bulb_color VARCHAR,
temperature_classification VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the glass bulb color for ordinary
| SELECT glass_bulb_color FROM table_1538516_1 WHERE temperature_classification = "Ordinary" | sql_create_context |
CREATE TABLE table_26914076_2 (
no VARCHAR,
directed_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number for simon cellan jones
| SELECT no FROM table_26914076_2 WHERE directed_by = "Simon Cellan Jones" | 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 qtb.MED_AMOUT FROM qtb WHERE qtb.MED_CLINIC_ID = '54836024642' UNION SELECT gyb.MED_AMOUT FROM gyb WHERE gyb.MED_CLINIC_ID = '54836024642' UNION SELECT zyb.MED_AMOUT FROM zyb WHERE zyb.MED_CLINIC_ID = '54836024642' UNION SELECT mzb.MED_AMOUT FROM mzb WHERE mzb.MED_CLINIC_ID = '54836024642' | css |
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 departments (
DEPARTMENT_ID decimal... | SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY SUM(MANAGER_ID) DESC | nvbench |
CREATE TABLE table_9498 (
"Model number" text,
"sSpec number" text,
"Frequency" text,
"L2 cache" text,
"Mult." text,
"Voltage" text,
"Socket" text,
"Part number(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which model number has so... | SELECT "Model number" FROM table_9498 WHERE "Socket" = 'μpga2 bga2 mmc-2' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT gwyjzb.IN_DIAG_DIS_CD, gwyjzb.IN_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '43832017' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 8811.34) UNION SELECT fgwyjzb.IN_DIAG_DIS_CD, fgwyjzb.IN_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '43832017' AND fgw... | css |
CREATE TABLE table_name_38 (
club VARCHAR,
played VARCHAR,
losing_bonus VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What club has a play of 22, and losing bonus of 7?
| SELECT club FROM table_name_38 WHERE played = "22" AND losing_bonus = "7" | sql_create_context |
CREATE TABLE table_train_171 (
"id" int,
"systolic_blood_pressure_sbp" int,
"hiv_infection" bool,
"hemoglobin_a1c_hba1c" float,
"hepatitis_c" bool,
"diastolic_blood_pressure_dbp" int,
"body_mass_index_bmi" float,
"triglyceride_tg" float,
"NOUSE" float
)
-- Using valid SQLite, answe... | SELECT * FROM table_train_171 WHERE (systolic_blood_pressure_sbp >= 160 OR diastolic_blood_pressure_dbp >= 100) | criteria2sql |
CREATE TABLE trip (
id number,
duration number,
start_date text,
start_station_name text,
start_station_id number,
end_date text,
end_station_name text,
end_station_id number,
bike_id number,
subscription_type text,
zip_code number
)
CREATE TABLE station (
id number,
... | SELECT DISTINCT start_station_name FROM trip WHERE duration < 100 | spider |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "14" AND lab.label = "Bilirubin, Direct" | mimicsql_data |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuo... | SELECT MIN(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'vascular comp vessel nec') GROUP BY STRFTIME('%y', diagnoses_icd.charttime)) AS t1 | mimic_iii |
CREATE TABLE table_201_1 (
id number,
"from" number,
"to" number,
"name" text,
"party" text,
"position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which mayor was elected immediately after michel deuzet ?
| SELECT "name" FROM table_201_1 WHERE "from" > (SELECT "from" FROM table_201_1 WHERE "name" = 'michel deuzet') ORDER BY "from" LIMIT 1 | squall |
CREATE TABLE table_78131 (
"Player" text,
"Position" text,
"School" text,
"Hometown" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which hometown has a player of Ray Drew?
| SELECT "Hometown" FROM table_78131 WHERE "Player" = 'ray drew' | wikisql |
CREATE TABLE documents (
document_id number,
document_status_code text,
document_type_code text,
shipping_agent_code text,
receipt_date time,
receipt_number text,
other_details text
)
CREATE TABLE ref_document_status (
document_status_code text,
document_status_description text
)
C... | SELECT document_id, receipt_date FROM documents | spider |
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 jybgb_jyjgzbb (
JYZBLSH number,
... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = j... | css |
CREATE TABLE table_name_76 (
alabama VARCHAR,
mississippi_st VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the Alabama player associated with Walt Harris?
| SELECT alabama FROM table_name_76 WHERE mississippi_st = "walt harris" | sql_create_context |
CREATE TABLE employee (
eid number,
name text,
salary number
)
CREATE TABLE certificate (
eid number,
aid number
)
CREATE TABLE flight (
flno number,
origin text,
destination text,
distance number,
departure_date time,
arrival_date time,
price number,
aid number
)
... | SELECT T1.name, T1.salary FROM employee AS T1 JOIN certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE student (
fname VARCHAR,
lname VARCHAR,
age INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the first and last name of students whose age is younger than the average age.
| SELECT fname, lname FROM student WHERE age < (SELECT AVG(age) FROM student) | sql_create_context |
CREATE TABLE table_22369 (
"Institution" text,
"Location" text,
"Founded" real,
"Years in IIAC (approx.)" text,
"Team Nickname" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List all institutions with a team name of the Cardinals.
| SELECT "Institution" FROM table_22369 WHERE "Team Nickname" = 'Cardinals' | wikisql |
CREATE TABLE table_77568 (
"Locomotive" text,
"Type" text,
"Builder" text,
"Builder's No." real,
"Built" real,
"Entered service" real,
"Withdrawn" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which locomotive had a 2-8-2t type, entered ser... | SELECT "Locomotive" FROM table_77568 WHERE "Type" = '2-8-2t' AND "Entered service" < '1915' AND "Built" > '1911' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.