instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT date1, COUNT(Id) AS cnt FROM (SELECT TIME_TO_STR(d.CreationDate, '%y-%m') AS "date1", (d.Id) AS id FROM Posts AS d LEFT JOIN PostHistory AS ph ON ph.PostId = d.Id LEFT JOIN PostLinks AS pl ON pl.PostId = d.Id LEFT JOIN Posts AS o ON o.Id = pl.RelatedPostId WHERE d.PostTypeId = 1 AND pl.LinkTypeId = 3 AND ph.Post... | sede |
CREATE TABLE table_name_22 (
goal_difference INTEGER,
points VARCHAR,
losses VARCHAR,
draws VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much Goal Difference has less than 9 Losses, and 8 Draws, and more than 40 points?
| SELECT SUM(goal_difference) FROM table_name_22 WHERE losses < 9 AND draws = 8 AND points > 40 | sql_create_context |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid numb... | SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-4 yea... | eicu |
CREATE TABLE table_27998152_1 (
date_of_birth VARCHAR,
no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- for the no. 7 what is the date of birth
| SELECT date_of_birth FROM table_27998152_1 WHERE no = 7 | sql_create_context |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
... | SELECT inputevents_cv.charttime FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7698)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label ... | mimic_iii |
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.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.admityear < "2120" | mimicsql_data |
CREATE TABLE table_name_20 (
date VARCHAR,
field VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What days were games played at Hofstra Stadium?
| SELECT date FROM table_name_20 WHERE field = "hofstra stadium" | sql_create_context |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | SELECT COUNT(*) FROM jybgb WHERE JZLSH = '50869027997' | css |
CREATE TABLE table_39902 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average number of top-10s for events under 57 and 0 ... | SELECT AVG("Top-10") FROM table_39902 WHERE "Events" < '57' AND "Top-5" < '0' | wikisql |
CREATE TABLE table_name_68 (
year INTEGER,
sport VARCHAR,
first VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the sum of year for swimming and first of mike
| SELECT SUM(year) FROM table_name_68 WHERE sport = "swimming" AND first = "mike" | sql_create_context |
CREATE TABLE table_name_42 (
location_attendance VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the location attendance when the score is w 86 77 (ot)?
| SELECT location_attendance FROM table_name_42 WHERE score = "w 86–77 (ot)" | sql_create_context |
CREATE TABLE table_22684 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When w 73-70 ... | SELECT "Location" FROM table_22684 WHERE "Score" = 'W 73-70' | wikisql |
CREATE TABLE table_name_73 (
series_sorted VARCHAR,
released VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the series sorted when the released is may 2012?
| SELECT series_sorted FROM table_name_73 WHERE released = "may 2012" | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospit... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-59552')) AND intakeoutput.cellpath LIKE '%output%' AND D... | eicu |
CREATE TABLE customer (
cust_ID varchar(3),
cust_name varchar(20),
acc_type char(1),
acc_bal int,
no_of_loans int,
credit_score int,
branch_ID int,
state varchar(20)
)
CREATE TABLE loan (
loan_ID varchar(3),
loan_type varchar(15),
cust_ID varchar(3),
branch_ID varchar(3)... | SELECT cust_name, credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_ID = T2.cust_ID ORDER BY credit_score | nvbench |
CREATE TABLE table_2417445_4 (
district VARCHAR,
reason_for_vacancy VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the person died May 22, 1895 is the reason for vacancy what is the district?
| SELECT district FROM table_2417445_4 WHERE reason_for_vacancy = "Died May 22, 1895" | sql_create_context |
CREATE TABLE table_4401 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average number of rounds when fighting a... | SELECT AVG("Round") FROM table_4401 WHERE "Opponent" = 'clay guida' | wikisql |
CREATE TABLE table_25346763_1 (
custody_level_s_ VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the custody level of the facility in Shelton?
| SELECT custody_level_s_ FROM table_25346763_1 WHERE location = "Shelton" | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.age < "47" | mimicsql_data |
CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
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 Has_amenity (
dormid... | SELECT Fname, COUNT(Fname) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' GROUP BY Fname ORDER BY COUNT(Fname) | nvbench |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9cod... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-2205')) AND intakeoutput.cellpath LIKE '%output%' AND DA... | eicu |
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,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | SELECT JYJSGH, JYJSQM FROM jybgb WHERE BGDH = '36444760543' | css |
CREATE TABLE table_train_31 (
"id" int,
"allergy_to_insulin" bool,
"active_infection" bool,
"periodic_paralysis" bool,
"receiving_continuous_intravenous_inotropic_support" bool,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above... | SELECT * FROM table_train_31 WHERE periodic_paralysis = 1 | criteria2sql |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '17949881' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2010-11-01') | css |
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.IN_DIAG_DIS_CD) FROM qtb WHERE qtb.PERSON_ID = '23539348' AND qtb.IN_HOSP_DATE BETWEEN '2016-10-28' AND '2017-09-19' UNION SELECT COUNT(gyb.IN_DIAG_DIS_CD) FROM gyb WHERE gyb.PERSON_ID = '23539348' AND gyb.IN_HOSP_DATE BETWEEN '2016-10-28' AND '2017-09-19' UNION SELECT COUNT(zyb.IN_DIAG_DIS_CD) FROM zy... | css |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info JOIN person_info 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 person_info_hz_info.KH = hz_info.KH AND pers... | css |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREAT... | SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-46398')) AND diagnosis.diagnosisname = 'hypertension' AND STRFTIME('%y',... | eicu |
CREATE TABLE table_75558 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" real,
"Height m ( ft )" text,
"FCC info" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest ERP W of w223bp?
| SELECT MIN("ERP W") FROM table_75558 WHERE "Call sign" = 'w223bp' | wikisql |
CREATE TABLE table_38493 (
"Number" real,
"Station" text,
"Japanese" text,
"Distance (km)" real,
"Stop" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the station with a number greater than 9 and a distance of 16.4 km?
| SELECT "Station" FROM table_38493 WHERE "Number" > '9' AND "Distance (km)" = '16.4' | wikisql |
CREATE TABLE table_name_44 (
record VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the home team's record on September 30?
| SELECT record FROM table_name_44 WHERE date = "september 30" | 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 diagnoses.short_title, diagnoses.long_title FROM diagnoses WHERE diagnoses.icd9_code = "V4364" | mimicsql_data |
CREATE TABLE table_32291 (
"Date" text,
"Time" text,
"Epicenter" text,
"Magnitude" text,
"Fatalities" text,
"Name" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number of Fatalities did the Epicenter M zandar n have?
| SELECT "Fatalities" FROM table_32291 WHERE "Epicenter" = 'māzandarān' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_CD, MIN(t_kc24.PER_EXP) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '3349404' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_CD ORDER BY MIN(t_kc24.PER_EXP / t_kc24.MED_AMOUT) | css |
CREATE TABLE table_name_54 (
heat VARCHAR,
rank VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Heat of the Player with a Rank of 18 or less and Result of 55.15?
| SELECT heat FROM table_name_54 WHERE rank < 18 AND result = "55.15" | sql_create_context |
CREATE TABLE table_24673888_1 (
ch__number VARCHAR,
branding VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the channel number that has a branding of PTV 4 Laoag?
| SELECT ch__number FROM table_24673888_1 WHERE branding = "PTV 4 Laoag" | sql_create_context |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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... | 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 = 28443) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_i... | mimic_iii |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT COUNT(hz_info.RYBH) FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE zyjzjlb.YLJGDM = '4226388' AND DATEDIFF(zyjzjlb.CYSJ, zyjzjlb.RYSJ) > 30 | css |
CREATE TABLE table_204_104 (
id number,
"title" text,
"genre" text,
"sub\u00addivisions" text,
"libretto" text,
"premiere date" text,
"place, theatre" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is next after ardeli... | SELECT "title" FROM table_204_104 WHERE "premiere date" > (SELECT "premiere date" FROM table_204_104 WHERE "title" = 'ardelinda') ORDER BY "premiere date" LIMIT 1 | squall |
CREATE TABLE table_74633 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the venue for the event on 12 November 2005?
| SELECT "Venue" FROM table_74633 WHERE "Date" = '12 november 2005' | wikisql |
CREATE TABLE table_203_356 (
id number,
"type" text,
"diagonal (mm)" text,
"width (mm)" text,
"height (mm)" text,
"area (mm2)" text,
"stops (area)" number,
"crop factor" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which is wider ; the... | SELECT "type" FROM table_203_356 WHERE "type" IN ('blackmagic pocket cinema camera', '1/2.7"') ORDER BY "width (mm)" DESC LIMIT 1 | squall |
CREATE TABLE table_23140 (
"County" text,
"Starky #" real,
"Starky %" text,
"Hancock #" real,
"Hancock %" text,
"McCain #" real,
"McCain %" text,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times was total considered ... | SELECT COUNT("Total") FROM table_23140 WHERE "Hancock #" = '1394' | wikisql |
CREATE TABLE table_1682026_6 (
market_value__billion_$_ VARCHAR,
sales__billion_$_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the market value of a company in billions that has 172.7 billion in sales?
| SELECT market_value__billion_$_ FROM table_1682026_6 WHERE sales__billion_$_ = "172.7" | sql_create_context |
CREATE TABLE table_name_33 (
road_numbers VARCHAR,
build_year VARCHAR,
railroad__quantity_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the road numbers when the build year is 1943, the railroad (quantity) is clinchfield railroad (12 new, 6 sec... | SELECT road_numbers FROM table_name_33 WHERE build_year = "1943" AND railroad__quantity_ = "clinchfield railroad (12 new, 6 secondhand)" | sql_create_context |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.department = 'NEUROSCI' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Fa... | advising |
CREATE TABLE table_22860698_8 (
carpet_w_l VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the carpet w-l in 1993?
| SELECT carpet_w_l FROM table_22860698_8 WHERE year = 1993 | sql_create_context |
CREATE TABLE table_204_880 (
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.
-- which was the first competition ?
| SELECT "competition" FROM table_204_880 ORDER BY "year" LIMIT 1 | squall |
CREATE TABLE table_3370 (
"Date (YYYY-MM-DD)" text,
"Time (UTC)" text,
"Latitude" text,
"Longitude" text,
"Depth" text,
"Magnitude" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On which date did the shock at latitude 08.909 s occur?
| SELECT "Date (YYYY-MM-DD)" FROM table_3370 WHERE "Latitude" = '08.909° S' | wikisql |
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 outputevents (
row_id number,
subject_id number,
ha... | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 62977) AND prescriptions.drug = '1/2 ns' AND STRFTIME('%y-%m', prescriptions.startdate) <= '2105-02' ORDER BY prescriptions.startdate LIMIT 1 | mimic_iii |
CREATE TABLE batting_postseason (
year INTEGER,
round TEXT,
player_id TEXT,
team_id TEXT,
league_id TEXT,
g INTEGER,
ab INTEGER,
r INTEGER,
h INTEGER,
double INTEGER,
triple INTEGER,
hr INTEGER,
rbi INTEGER,
sb INTEGER,
cs NUMERIC,
bb INTEGER,
so INTEG... | SELECT year, AVG(attendance) FROM home_game GROUP BY year | nvbench |
CREATE TABLE table_name_10 (
architecture_version VARCHAR,
model VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the architecture version of Model 1b?
| SELECT architecture_version FROM table_name_10 WHERE model = "1b" | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "James Sloan" | mimicsql_data |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description v... | SELECT COUNT(*) = 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course.department = 'TURK... | advising |
CREATE TABLE table_60718 (
"Greek Designation" text,
"Collegiate Institution" text,
"Charter Date" text,
"Status" text,
"City" text,
"U.S. State/District" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the greek designation of the new yor... | SELECT "Greek Designation" FROM table_60718 WHERE "U.S. State/District" = 'new york' AND "Charter Date" = 'april 23, 2005' | wikisql |
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases INTEGER,
Drink TEXT
)
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE appellations (
No... | SELECT County, COUNT(County) FROM appellations GROUP BY County ORDER BY County | nvbench |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE instructor (
instructo... | SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Selected Near and Middle Eastern Studies%' OR name LIKE '%Selected Near and Middle Eastern Studies%') AND credits = 14 | advising |
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 jyjgzbb.JCZBJGDX, jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '41797802328' | css |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc21.OUT_HOSP_DATE FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '08917686657' | css |
CREATE TABLE table_name_12 (
date VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which date was corio oval the venue?
| SELECT date FROM table_name_12 WHERE venue = "corio oval" | sql_create_context |
CREATE TABLE table_204_175 (
id number,
"pos" text,
"no." number,
"driver" text,
"team" text,
"laps" number,
"time/retired" text,
"grid" number,
"laps led" number,
"points" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how man... | SELECT "points" FROM table_204_175 WHERE "driver" = 'tony kanaan' | squall |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
... | 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, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE ((CITY_1.c... | atis |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TA... | WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON u.Id =... | sede |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT zzmzjzjlb.JZKSBM, zzmzjzjlb.JZKSMC FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '77683905641' UNION SELECT fzzmzjzjlb.JZKSBM, fzzmzjzjlb.JZKSMC FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZLSH = '77683905641' | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid ... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'enteral feeds - enteral formula' AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_T... | eicu |
CREATE TABLE table_name_56 (
wins INTEGER,
team VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Wins have a Team of winnipeg blue bombers, and a Season larger than 1964?
| SELECT AVG(wins) FROM table_name_56 WHERE team = "winnipeg blue bombers" AND season > 1964 | 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 COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT icustays.hadm_id FROM icustays WHERE icustays.icustay_id IN (SELECT inputevents_cv.icustay_id FROM inputevents_cv WHERE inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'nepro' AND d_items.... | mimic_iii |
CREATE TABLE table_22892217_4 (
nightly_rank INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest numbered nightly rank for any episode?
| SELECT MAX(nightly_rank) FROM table_22892217_4 | sql_create_context |
CREATE TABLE table_7379 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Region has a Catalog of magik muzik 806-5?
| SELECT "Region" FROM table_7379 WHERE "Catalog" = 'magik muzik 806-5' | wikisql |
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 zzmzjzjlb JOIN jybgb 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 WHERE person_... | css |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE icustays (
row... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.wardid = 14) | mimic_iii |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Price DESC | nvbench |
CREATE TABLE table_71594 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the Surface was Carpet (i), wh... | SELECT "Outcome" FROM table_71594 WHERE "Surface" = 'carpet (i)' | wikisql |
CREATE TABLE table_name_29 (
position VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Position has a Player of gibril wilson?
| SELECT position FROM table_name_29 WHERE player = "gibril wilson" | sql_create_context |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE requirement (
requiremen... | SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 470 AND semester.semester_id = course_offering.semester AND semester.year IN (2016, 2017) | advising |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,... | SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb 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 = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJ... | css |
CREATE TABLE Ref_Characteristic_Types (
characteristic_type_code VARCHAR(15),
characteristic_type_description VARCHAR(80)
)
CREATE TABLE Products (
product_id INTEGER,
color_code VARCHAR(15),
product_category_code VARCHAR(15),
product_name VARCHAR(80),
typical_buying_price VARCHAR(20),
... | SELECT product_category_description, COUNT(product_category_description) FROM Ref_Product_Categories AS T1 JOIN Products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' GROUP BY product_category_description ORDER BY COUNT(product_category_description) DESC | nvbench |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT * FROM t_kc22 WHERE MED_CLINIC_ID = '67802527746' AND MED_ORG_DEPT_NM LIKE '%病%' | css |
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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.name = "Brooke Coleman" | mimicsql_data |
CREATE TABLE table_18991 (
"Country/Region" text,
"Local title" text,
"Television network" text,
"Seasons and winners" text,
"Judges" text,
"Presenters" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the the judges with local title being ... | SELECT "Judges" FROM table_18991 WHERE "Local title" = 'X Factor' AND "Presenters" = 'Heikki Paasonen Jukka Rossi (Xtra Factor)' | wikisql |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Price | nvbench |
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 gwyjzb.MED_ORG_DEPT_CD, gwyjzb.MED_ORG_DEPT_NM FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '14427272423' UNION SELECT fgwyjzb.MED_ORG_DEPT_CD, fgwyjzb.MED_ORG_DEPT_NM FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '14427272423' | css |
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 OUT_DIAG_DIS_CD, OUT_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_NM = '葛晴画' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT >= 6196.22) | css |
CREATE TABLE table_25386974_1 (
podiums INTEGER,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the most podiums Pedro Nunes had when in 17th position?
| SELECT MAX(podiums) FROM table_25386974_1 WHERE position = "17th" | sql_create_context |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '秦鸿德' AND t_kc21.MED_SER_ORG_NO = '6682741' AND NOT t_kc21.OUT_DIAG_DIS_NM LIKE '%脑瘫%' | css |
CREATE TABLE table_36835 (
"Surname" text,
"First" text,
"D.O.B." text,
"Bats" text,
"Throws" text,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which First has Bats of r, and Throws of l, and a DOB of 12 october 1977?
| SELECT "First" FROM table_36835 WHERE "Bats" = 'r' AND "Throws" = 'l' AND "D.O.B." = '12 october 1977' | wikisql |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE patient (
uniquep... | SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-30817')) AND diagnosis.diagnosisname = 'anemia - acute blood loss anemia... | eicu |
CREATE TABLE table_56712 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the visiting team on December 17?
| SELECT "Visitor" FROM table_56712 WHERE "Date" = 'december 17' | wikisql |
CREATE TABLE table_39149 (
"Date" text,
"Race" text,
"Distance" text,
"Venue" text,
"Radio" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the distance of the race at the Atlanta Motor Speedway?
| SELECT "Distance" FROM table_39149 WHERE "Venue" = 'atlanta motor speedway' | wikisql |
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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "29281" AND lab.flag = "delta" | mimicsql_data |
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 Addresses (
addr... | SELECT date_address_from, SUM(monthly_rental) FROM Student_Addresses ORDER BY monthly_rental DESC | nvbench |
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.admityear < "2175" AND diagnoses.short_title = "Poison-psychotropic agt" | mimicsql_data |
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_required varchar
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_... | 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, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND days.day_name = 'WEDNESDAY' AND flight.flight_days = days.days_cod... | atis |
CREATE TABLE files (
f_id number(10),
artist_name varchar2(50),
file_size varchar2(20),
duration varchar2(20),
formats varchar2(20)
)
CREATE TABLE song (
song_name varchar2(50),
artist_name varchar2(50),
country varchar2(20),
f_id number(10),
genre_is varchar2(20),
rating nu... | SELECT languages, AVG(rating) FROM song GROUP BY languages ORDER BY languages | nvbench |
CREATE TABLE table_name_79 (
celebrity VARCHAR,
finished VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What celebrity finished 6th?
| SELECT celebrity FROM table_name_79 WHERE finished = "6th" | sql_create_context |
CREATE TABLE table_name_62 (
venue VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What venue featured fitzroy as the home squad?
| SELECT venue FROM table_name_62 WHERE home_team = "fitzroy" | sql_create_context |
CREATE TABLE table_203_717 (
id number,
"number" number,
"year built" number,
"livery" text,
"current status" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many cars were created before 1960 ?
| SELECT COUNT(*) FROM table_203_717 WHERE "year built" < 1960 | squall |
CREATE TABLE table_14345690_5 (
exited VARCHAR,
celebrity VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the exited day where the celebrity is vic reeves?
| SELECT exited FROM table_14345690_5 WHERE celebrity = "Vic Reeves" | sql_create_context |
CREATE TABLE table_204_293 (
id number,
"district" number,
"name" text,
"party" text,
"district office" text,
"first elected" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many total senators are there ?
| SELECT COUNT("name") FROM table_204_293 | squall |
CREATE TABLE table_77634 (
"YEAR" real,
"Seniors" text,
"Reserves" text,
"Thirds (Under 17's)" text,
"Fourths (Under 14's)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Seniors have YEAR before 2006, and Fourths (Under 14's) of kiewa-sandy c... | SELECT "Seniors" FROM table_77634 WHERE "YEAR" < '2006' AND "Fourths (Under 14's)" = 'kiewa-sandy creek' | wikisql |
CREATE TABLE table_name_19 (
round INTEGER,
name VARCHAR,
overall VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- With an Overall larger than 107, in what Round was Jim Duncan picked?
| SELECT SUM(round) FROM table_name_19 WHERE name = "jim duncan" AND overall > 107 | sql_create_context |
CREATE TABLE table_name_31 (
uni_number VARCHAR,
bats VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Uni numbers have Bats of s, and a Position of utl?
| SELECT COUNT(uni_number) FROM table_name_31 WHERE bats = "s" AND position = "utl" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.