instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
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.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.dob_year < "2064" | mimicsql_data |
CREATE TABLE table_24915874_1 (
placing VARCHAR,
weight__kg_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the placing when the weight in kg was 58.0?
| SELECT placing FROM table_24915874_1 WHERE weight__kg_ = "58.0" | sql_create_context |
CREATE TABLE table_80005 (
"Name" text,
"Years" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name with a Decile less than 10, and a Roll of 297?
| SELECT "Name" FROM table_80005 WHERE "Decile" < '10' AND "Roll" = '297' | 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 demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.language = "ENGL" AND diagnoses.short_title = "Bipol I cur depres NOS" | mimicsql_data |
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 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 = '41547321' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2014-11-21' AND '2016-07-07' AND t_kc22.MED_INV_ITEM_TYPE = '手术费' | css |
CREATE TABLE table_19754 (
"Result" text,
"Date" text,
"Race" text,
"Venue" text,
"Group" text,
"Distance" text,
"Weight (kg)" text,
"Jockey" text,
"Winner/2nd" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many venues were used... | SELECT "Venue" FROM table_19754 WHERE "Date" = '10 Mar 2007' | wikisql |
CREATE TABLE table_name_37 (
president VARCHAR,
head_coach VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the President of the team that has the Head Coach Mark Wakeling?
| SELECT president FROM table_name_37 WHERE head_coach = "mark wakeling" | sql_create_context |
CREATE TABLE table_30258 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every CFL team with the player Mark Farraway?
| SELECT "CFL Team" FROM table_30258 WHERE "Player" = 'Mark Farraway' | wikisql |
CREATE TABLE table_58260 (
"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.
-- How many people attended the home game for South... | SELECT SUM("Crowd") FROM table_58260 WHERE "Home team" = 'south melbourne' | wikisql |
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 jyjgzbb.JYZBLSH 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... | css |
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 BGDH FROM jybgb WHERE JZLSH = '99506528136' AND NOT KSMC LIKE '%管镜%' | css |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT ACC_Road, SUM(Team_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY SUM(Team_ID) | nvbench |
CREATE TABLE table_name_59 (
third VARCHAR,
lead VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did holger h hne come in third?
| SELECT third FROM table_name_59 WHERE lead = "holger höhne" | sql_create_context |
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE COURSE (
CRS_CODE... | SELECT DEPT_CODE, COUNT(*) FROM STUDENT GROUP BY DEPT_CODE | nvbench |
CREATE TABLE table_name_43 (
arena VARCHAR,
runner_up VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what arena was the North Dakota the runner-up?
| SELECT arena FROM table_name_43 WHERE runner_up = "north dakota" | 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_ID = '29536209' AND t_kc22.STA_DATE BETWEEN '2016-09-15' AND '2019-01-13' AND gwyjzb.MED_SER_ORG_NO = '8557813' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CL... | css |
CREATE TABLE table_9052 (
"Date" text,
"Venue" text,
"Score" text,
"Competition" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Score on November 10, 2007?
| SELECT "Score" FROM table_9052 WHERE "Date" = 'november 10, 2007' | wikisql |
CREATE TABLE table_30435 (
"Club name" text,
"Name of team song" text,
"Basis for team song" text,
"First used as team song" text,
"Writer/composer" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the team song written by ken walt... | SELECT "Basis for team song" FROM table_30435 WHERE "Writer/composer" = 'Ken Walther' | wikisql |
CREATE TABLE fzzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZD... | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE zzmzjzjlb.JZZDSM = '阿尔茨海默病' AND jyjgzbb.JCZBDM = '273122' UNION SELECT jyjgzbb.CKZFWXX... | css |
CREATE TABLE program (
name VARCHAR,
origin VARCHAR,
OWNER VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the name, origin and owner of each program.
| SELECT name, origin, OWNER FROM program | sql_create_context |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jo... | SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course, course_offering, semester WHERE course.course_id = course_offe... | advising |
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | SELECT ROW_NUMBER() OVER (ORDER BY u.Reputation DESC) AS "#", u.Id AS "user_link", u.Reputation FROM Users AS u JOIN Posts AS a ON a.OwnerUserId = u.Id AND a.PostTypeId = 2 JOIN Posts AS q ON q.Id = a.ParentId AND q.Tags LIKE LOWER('%##Tag##%') WHERE LOWER(Location) LIKE LOWER('%##Location##%') AND Reputation >= 1000 G... | sede |
CREATE TABLE table_name_35 (
position VARCHAR,
speed VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which position has a speed of 123.220?
| SELECT position FROM table_name_35 WHERE speed = "123.220" | sql_create_context |
CREATE TABLE table_name_28 (
score VARCHAR,
opponent VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score against the phillies on may 24?
| SELECT score FROM table_name_28 WHERE opponent = "phillies" AND date = "may 24" | sql_create_context |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost numb... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'potassium') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 53176 AND admissio... | mimic_iii |
CREATE TABLE table_27153 (
"Rnd." real,
"Circuit" text,
"LMP1 Winning Team" text,
"LMP2 Winning Team" text,
"FLM Winning Team" text,
"GT1 Winning Team" text,
"GT2 Winning Team" text,
"Results" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "Rnd." FROM table_27153 WHERE "LMP2 Winning Team" = 'Mike Newton Thomas Erdos Ben Collins' | wikisql |
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
... | 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 (((((flight.arrival_time < flight.departure_time) AND date_day.day_number = 22 AND date_day.month_number = 3 AND date_day.year = 1991 AND days.da... | atis |
CREATE TABLE table_32839 (
"Player" text,
"Span" text,
"Start" text,
"Tries" text,
"Conv" text,
"Pens" text,
"Drop" text,
"Lost" text,
"Draw" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What drop had a start of 40?
| SELECT "Drop" FROM table_32839 WHERE "Start" = '40' | wikisql |
CREATE TABLE parties (
payment_method_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many distinct payment methods are used by parties?
| SELECT COUNT(DISTINCT payment_method_code) FROM parties | sql_create_context |
CREATE TABLE table_71586 (
"Member" text,
"Party" text,
"Electorate" text,
"State" text,
"Term in office" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What term did an Electorate of indi have in office?
| SELECT "Term in office" FROM table_71586 WHERE "Electorate" = 'indi' | wikisql |
CREATE TABLE people (
People_ID int,
Age int,
Name text,
Nationality text,
Graduation_College text
)
CREATE TABLE employment (
Company_ID int,
People_ID int,
Year_working int
)
CREATE TABLE company (
Company_ID real,
Name text,
Headquarters text,
Industry text,
Sale... | SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters | nvbench |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'BOSTON' AND ground_service.city_code = city.city_code | atis |
CREATE TABLE fgwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT SUM(t_kc24.OVE_PAY) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '孙沛珊' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2005-05-10' AND '2011-02-17' UNION SELECT SUM(t_kc24.OVE_PAY) FROM fgwyjzb JOIN t_kc24 ON fgwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE fgwyjzb.PERSON... | css |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
... | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE table_name_94 (
pick__number INTEGER,
position VARCHAR,
team_from VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total pick # for the D position from a team from Chilliwack Bruins?
| SELECT SUM(pick__number) FROM table_name_94 WHERE position = "d" AND team_from = "chilliwack bruins" | sql_create_context |
CREATE TABLE useracct (
u_id integer,
name varchar(128)
)
CREATE TABLE trust (
source_u_id integer,
target_u_id integer,
trust integer
)
CREATE TABLE review (
a_id integer,
u_id integer,
i_id integer,
rating integer,
rank integer
)
CREATE TABLE item (
i_id integer,
tit... | SELECT name, AVG(trust) FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id GROUP BY T2.target_u_id ORDER BY AVG(trust) | nvbench |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | SELECT jybgb.JYKSBM, jybgb.JYKSMC FROM jybgb WHERE jybgb.BGDH = '27876710324' | css |
CREATE TABLE table_name_41 (
founded VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the Balayan, Batangas campus founded?
| SELECT founded FROM table_name_41 WHERE location = "balayan, batangas" | sql_create_context |
CREATE TABLE table_203_91 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- does arasay thondike have more/less than 4 1st place tournament fin... | SELECT (SELECT COUNT(*) FROM table_203_91 WHERE "position" = 1) > 4 | squall |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "NEWBORN" AND prescriptions.drug_type = "ADDITIVE" | mimicsql_data |
CREATE TABLE table_name_44 (
goals_against VARCHAR,
losses VARCHAR,
goal_difference VARCHAR,
wins VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of goals against when the goal difference was less than 43, the Wins less than 13, and... | SELECT goals_against FROM table_name_44 WHERE goal_difference < 43 AND wins < 13 AND losses > 14 | sql_create_context |
CREATE TABLE table_name_20 (
location VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the location of game 4?
| SELECT location FROM table_name_20 WHERE game = 4 | sql_create_context |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE requirement (
... | SELECT DISTINCT course.department, course.name, course.number, instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.name LIKE '%Birds of the World%' AND NOT instructor.name LIKE '%Nardis%' AND offering_instructor.instructor_id = inst... | advising |
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResults (
Id number,
... | SELECT STR_TO_TIME(v.CreationDate, '%Y%m%d') AS "day", COUNT(*) AS "late_votes" FROM Votes AS v, Posts AS p WHERE v.PostId = p.Id AND CAST((JULIANDAY(v.CreationDate) - JULIANDAY(p.CreationDate)) * 86400.0 AS INT) > 7 * 24 * 3600 AND p.OwnerUserId = '##User##' GROUP BY STR_TO_TIME(v.CreationDate, '%Y%m%d') ORDER BY STR_... | sede |
CREATE TABLE table_58091 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which rank has a total less than 9, less than 2 bronze, and from France?
| SELECT "Rank" FROM table_58091 WHERE "Total" < '9' AND "Bronze" < '2' AND "Nation" = 'france' | wikisql |
CREATE TABLE table_371 (
"Rank" real,
"English title" text,
"Chinese title" text,
"Average" real,
"Peak" real,
"Premiere" real,
"Finale" real,
"HK viewers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many premier episodes were the... | SELECT COUNT("Premiere") FROM table_371 WHERE "English title" = 'Survivor''s Law II' | wikisql |
CREATE TABLE table_name_7 (
home_captain VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the Home Captain for 23,24,25,26 july 1992?
| SELECT home_captain FROM table_name_7 WHERE date = "23,24,25,26 july 1992" | sql_create_context |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
... | SELECT chartevents.charttime 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 = 4401) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHE... | mimic_iii |
CREATE TABLE table_name_31 (
score VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What score had a record of 17 18 6?
| SELECT score FROM table_name_31 WHERE record = "17–18–6" | sql_create_context |
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_ORG_DEPT_NM, qtb.OUT_DIAG_DIS_CD, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '3166992' GROUP BY qtb.MED_ORG_DEPT_NM, qtb.OUT_DIAG_DIS_CD UNION SELECT gyb.MED_ORG_DEPT_NM, gyb.OUT_DIAG_DIS_CD, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '3166992' GROUP BY gyb.MED_ORG_DEPT_NM, gyb.... | css |
CREATE TABLE table_16394 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum number of picks for the CFL team Calgary Stampeders?
| SELECT MAX("Pick #") FROM table_16394 WHERE "CFL Team" = 'Calgary Stampeders' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND lab.label = "LD, Body Fluid" | mimicsql_data |
CREATE TABLE table_name_60 (
series_1 VARCHAR,
series_5 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who in series 1 corresponds with Peter Jones in series 5?
| SELECT series_1 FROM table_name_60 WHERE series_5 = "peter jones" | sql_create_context |
CREATE TABLE table_103084_4 (
broadcast_date VARCHAR,
bbc_one_total_viewing INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was BBC One total viewing greater then 11616996.338225884?
| SELECT broadcast_date FROM table_103084_4 WHERE bbc_one_total_viewing > 11616996.338225884 | sql_create_context |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'benicar' AND DATETIME(prescriptions.startdate) >= DATETIME(CURREN... | mimic_iii |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
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 ... | SELECT DISTINCT flight_id FROM flight WHERE ((((flight_days IN (SELECT DAYSalias0.days_code FROM days AS DAYSalias0 WHERE DAYSalias0.day_name IN (SELECT DATE_DAYalias0.day_name FROM date_day AS DATE_DAYalias0 WHERE DATE_DAYalias0.day_number = 10 AND DATE_DAYalias0.month_number = 6 AND DATE_DAYalias0.year = 1993)) AND f... | atis |
CREATE TABLE table_name_56 (
margin_of_victory VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the margin of victory on Apr 23, 1967?
| SELECT margin_of_victory FROM table_name_56 WHERE date = "apr 23, 1967" | sql_create_context |
CREATE TABLE table_69522 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was t... | SELECT "Try bonus" FROM table_69522 WHERE "Tries for" = '25' | wikisql |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate ti... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'aortocor bypas-3 cor ... | mimic_iii |
CREATE TABLE table_10071 (
"City" text,
"Province" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Province has a City of hiroshima?
| SELECT "Province" FROM table_10071 WHERE "City" = 'hiroshima' | wikisql |
CREATE TABLE table_name_91 (
target_version VARCHAR,
last_release VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Target Version, when Last Release is 2009-08-09, 1.2.9?
| SELECT target_version FROM table_name_91 WHERE last_release = "2009-08-09, 1.2.9" | sql_create_context |
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 zyjybgb (
BBCJBW text,
BBDM t... | SELECT zyjybgb.BBCJBW 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 table_71168 (
"Rider" text,
"Year" real,
"Final Position - Giro" real,
"Final Position - Tour" real,
"Final Position - Vuelta" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average year that has a final Tour position of 54 ... | SELECT AVG("Year") FROM table_71168 WHERE "Final Position - Tour" = '54' AND "Final Position - Vuelta" > '55' | wikisql |
CREATE TABLE gwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT gwyjzb.OUT_DIAG_DOC_CD, gwyjzb.OUT_DIAG_DOC_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '46443043' GROUP BY gwyjzb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT fgwyjzb.OUT_DIAG_DOC_CD, fgwyjzb.OUT_DIAG_DOC_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '46443043' GROUP BY fgwyjzb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) ... | css |
CREATE TABLE table_204_882 (
id number,
"number" number,
"builder" text,
"entered service" text,
"withdrawn" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the last number on the list ?
| SELECT "number" FROM table_204_882 ORDER BY id DESC LIMIT 1 | squall |
CREATE TABLE table_name_55 (
joined INTEGER,
nickname VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average Joined with a Nickname of wildcats in longmeadow, massachusetts?
| SELECT AVG(joined) FROM table_name_55 WHERE nickname = "wildcats" AND location = "longmeadow, massachusetts" | sql_create_context |
CREATE TABLE table_298883_5 (
reverse VARCHAR,
value VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is on the reverse side of the 500 coin?
| SELECT reverse FROM table_298883_5 WHERE value = "₩500" | sql_create_context |
CREATE TABLE table_2856898_1 (
dividend_per_share__p_ VARCHAR,
turnover__£m_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many items appear in the dividend per share when the turnover is 0.42?
| SELECT COUNT(dividend_per_share__p_) FROM table_2856898_1 WHERE turnover__£m_ = "0.42" | sql_create_context |
CREATE TABLE table_14960 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the record for 9-4 score
| SELECT "Record" FROM table_14960 WHERE "Score" = '9-4' | wikisql |
CREATE TABLE table_25817 (
"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 "Score" FROM table_25817 WHERE "Date" = 'April 9' | wikisql |
CREATE TABLE table_20365 (
"Residence Hall" text,
"Sex" text,
"Established" real,
"Rector" text,
"Campus" text,
"Capacity" real,
"Colors" text,
"Mascot" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the colors of Howard Hall?
| SELECT "Colors" FROM table_20365 WHERE "Residence Hall" = 'Howard Hall' | 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 prescription... | SELECT prescriptions.drug, prescriptions.drug_dose FROM prescriptions WHERE prescriptions.formulary_drug_cd = "PANT40" | mimicsql_data |
CREATE TABLE table_19080 (
"Rd." real,
"Race Title" text,
"Circuit" text,
"City / State" text,
"Date" text,
"Winner" text,
"Team" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What round was held at the Queensland Raceway... | SELECT "Rd." FROM table_19080 WHERE "Circuit" = 'Queensland Raceway' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2164" AND procedures.long_title = "Cardiac mapping" | mimicsql_data |
CREATE TABLE writes (
aid int,
pid int
)
CREATE TABLE author (
aid int,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE domain_keyword (
did int,
kid int
)
CREATE TABLE domain_journal (
did int,
jid int
)
CREATE TABLE publication (
abstract varchar,
cid int,
... | SELECT journal.name FROM journal, keyword, publication, publication_keyword WHERE keyword.keyword = 'Relational Database' AND publication_keyword.kid = keyword.kid AND publication.jid = journal.jid AND publication.pid = publication_keyword.pid GROUP BY journal.name HAVING COUNT(DISTINCT (publication.title)) > 60 | academic |
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 mzjzjlb.JZZDBM, mzjzjlb.JZZDSM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_... | css |
CREATE TABLE table_1805191_10 (
first_elected VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When is the first elected in the Florida 19 district?
| SELECT first_elected FROM table_1805191_10 WHERE district = "Florida 19" | sql_create_context |
CREATE TABLE table_1246208_5 (
goals_for VARCHAR,
club VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the goals for when the club is new england revolution?
| SELECT goals_for FROM table_1246208_5 WHERE club = "New England Revolution" | sql_create_context |
CREATE TABLE table_name_14 (
match INTEGER,
runs VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Match has Runs of 100, and a Year larger than 1994?
| SELECT SUM(match) FROM table_name_14 WHERE runs = 100 AND year > 1994 | sql_create_context |
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Ag... | SELECT Rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.Advisor GROUP BY T1.Rank ORDER BY COUNT(*) | nvbench |
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 jybgb.KSBM, jybgb.KSMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE Staff (
staff_id INTEGER,
staff_gender VARCHAR(1),
staff_name VARCHAR(80)
)
CREATE TABLE Customers (
customer_id INTEGER,
payment_method_code VARCHAR(10),
customer_code VARCHAR(20),
customer_name VARCHAR(80),
customer_address VARCHAR(255),
customer_phone VARCHAR(80),
... | SELECT payment_method_code, COUNT(*) FROM Customers GROUP BY payment_method_code ORDER BY payment_method_code | nvbench |
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 demographic.diagnosis, lab.label FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE table_17675675_2 (
points VARCHAR,
won VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total amount of points when the given won is 9?
| SELECT points FROM table_17675675_2 WHERE won = "9" | sql_create_context |
CREATE TABLE table_203_392 (
id number,
"rank" text,
"belt alternate 1" text,
"belt alternate 2" text,
"belt alternate 3" text,
"belt alternate 4" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which kyu levels have only one color belt ?
| SELECT "rank" FROM table_203_392 WHERE "belt alternate 2" IS NULL | squall |
CREATE TABLE table_4936 (
"Name" text,
"Vertices V" real,
"Edges E" real,
"Faces F" real,
"Euler characteristic: V \u2212 E + F" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of E edges of the polyhedra with vertices V grea... | SELECT COUNT("Edges E") FROM table_4936 WHERE "Vertices V" > '20' | wikisql |
CREATE TABLE table_name_11 (
home VARCHAR,
league VARCHAR,
away VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home for league 3rd liga, and an away of 4-0?
| SELECT home FROM table_name_11 WHERE league = "3rd liga" AND away = "4-0" | sql_create_context |
CREATE TABLE table_name_22 (
name VARCHAR,
field VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Name of the power station in the Field of Mokai?
| SELECT name FROM table_name_22 WHERE field = "mokai" | sql_create_context |
CREATE TABLE table_63985 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest points for a time/retired of +30.7 secs, and laps smaller than 165?
| SELECT MIN("Points") FROM table_63985 WHERE "Time/Retired" = '+30.7 secs' AND "Laps" < '165' | 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 treatment (
treatmentid number... | SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-10559')) AND diagnosis.diagnosisname = 'anemia - anemia of ch... | eicu |
CREATE TABLE table_name_77 (
location VARCHAR,
date VARCHAR,
winner VARCHAR,
fastest_lap VARCHAR,
pole_position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Location, when Fastest Lap is Ben Spies, when Pole Position is Ben Spies, when ... | SELECT location FROM table_name_77 WHERE fastest_lap = "ben spies" AND pole_position = "ben spies" AND winner = "ben spies" AND date = "tooele, utah" | sql_create_context |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH ... | SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '王飞燕' AND NOT mzjzjlb.JZLSH IN (SELECT JZLSH FROM jybgb WHERE BGRQ <= '2020-10-11') | css |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE chartevents (
... | SELECT transfers.careunit FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 40707) AND NOT transfers.careunit IS NULL AND STRFTIME('%y', transfers.intime) >= '2105' ORDER BY transfers.intime LIMIT 1 | mimic_iii |
CREATE TABLE department (
Department_ID int,
Name text,
Creation text,
Ranking int,
Budget_in_Billions real,
Num_Employees real
)
CREATE TABLE head (
head_ID int,
name text,
born_state text,
age real
)
CREATE TABLE management (
department_ID int,
head_ID int,
tempor... | SELECT Creation, SUM(Budget_in_Billions) FROM department ORDER BY Creation | nvbench |
CREATE TABLE table_77708 (
"Name" text,
"Bodyweight" real,
"Snatch" real,
"Clean & jerk" real,
"Total (kg)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the highest snatch for 68.63 bodyweight and total kg less than 290
| SELECT MAX("Snatch") FROM table_77708 WHERE "Bodyweight" = '68.63' AND "Total (kg)" < '290' | wikisql |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
... | 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 = 'MONTREAL' AND date_day.day_number = 25 AND date_day.month_number = 6 AND... | atis |
CREATE TABLE table_9211 (
"Model Number" text,
"sSpec Number" text,
"Frequency" text,
"L2 Cache" text,
"Mult" text,
"Voltage" text,
"Socket" text,
"Release Date" text,
"Part Number(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- w... | SELECT "Part Number(s)" FROM table_9211 WHERE "L2 Cache" = '512 kb' AND "Release Date" = 'june 2001' AND "sSpec Number" = 'sl5lv, sl5pu, sl6bw, sl6jm' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid n... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '007-15837' AND patient.unitdischargetime IS NULL | eicu |
CREATE TABLE table_203_69 (
id number,
"representative" text,
"title" text,
"from" number,
"to" number,
"appointed by" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- at least what number of people have the title minister
| SELECT COUNT("representative") FROM table_203_69 WHERE "title" = 'minister' | squall |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
... | SELECT * FROM jyjgzbb WHERE JCZBMC = (SELECT JCZBMC FROM jyjgzbb WHERE JYZBLSH = '71061886378') AND JCZBJGDW = (SELECT JCZBJGDW FROM jyjgzbb WHERE JYZBLSH = '71061886378') AND JCZBJGDL >= (SELECT JCZBJGDL FROM jyjgzbb WHERE JYZBLSH = '71061886378') | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.