instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_161 (
"Year" real,
"Title" text,
"Format" text,
"Studio" text,
"Release Date" text,
"Copyright Information" text,
"Catalog Number" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the catalog number named callanetics... | SELECT "Catalog Number" FROM table_161 WHERE "Title" = 'Callanetics: 10 Years Younger In 10 Hours' | wikisql |
CREATE TABLE table_22235 (
"Location" text,
"Partner" text,
"Construction Start" text,
"Inauguration Date" text,
"Population Served" real,
"Design flow (LPM)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who's the partner at Tamara, Hon?
| SELECT "Partner" FROM table_22235 WHERE "Location" = 'Tamara, HON' | wikisql |
CREATE TABLE table_name_48 (
rounds VARCHAR,
entrant VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what rounds did Scuderia Milano participate?
| SELECT rounds FROM table_name_48 WHERE entrant = "scuderia milano" | sql_create_context |
CREATE TABLE table_33271 (
"Dance" text,
"Best dancer" text,
"Best score" real,
"Worst dancer" text,
"Worst score" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest Best score for the Dance Mambo?
| SELECT MAX("Best score") FROM table_33271 WHERE "Dance" = 'mambo' | wikisql |
CREATE TABLE table_16754 (
"#" real,
"Race Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Constructor" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date is listed at place 13
| SELECT "Date" FROM table_16754 WHERE "#" = '13' | wikisql |
CREATE TABLE table_58538 (
"Conference" text,
"# of Bids" real,
"Record" text,
"Win %" text,
"Round of 32" text,
"Sweet Sixteen" text,
"Elite Eight" text,
"Final Four" text,
"Championship Game" text
)
-- Using valid SQLite, answer the following questions for the tables provided abo... | SELECT "Elite Eight" FROM table_58538 WHERE "Conference" = 'big west' | wikisql |
CREATE TABLE teaches (
id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many different instructors have taught some course?
| SELECT COUNT(DISTINCT id) FROM teaches | sql_create_context |
CREATE TABLE member (
Member_ID text,
Name text,
Nationality text,
Role text
)
CREATE TABLE performance (
Performance_ID real,
Date text,
Host text,
Location text,
Attendance int
)
CREATE TABLE member_attendance (
Member_ID int,
Performance_ID int,
Num_of_Pieces int
)
... | SELECT Date, COUNT(Date) FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID WHERE T2.Role = "Violin" GROUP BY Date ORDER BY Date | nvbench |
CREATE TABLE table_16796625_1 (
urban_area__locality_ VARCHAR,
code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which urban area has the code 4870?
| SELECT urban_area__locality_ FROM table_16796625_1 WHERE code = 4870 | sql_create_context |
CREATE TABLE table_800 (
"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.
-- Who were... | SELECT "High points" FROM table_800 WHERE "Game" = '7' | wikisql |
CREATE TABLE table_73494 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every year where opponent in the final is John... | SELECT "Year" FROM table_73494 WHERE "Opponent in the final" = 'John McEnroe' AND "Championship" = 'Wimbledon' | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "MORBID OBESITY/SDA" | mimicsql_data |
CREATE TABLE table_202_283 (
id number,
"year" text,
"title" text,
"role" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- mag ruffman 's role as alice lawson , who she first played in anne of green gables in 1985 , was renewed in what m... | SELECT "title" FROM table_202_283 WHERE "role" = 'alice lawson' AND "year" <> 1985 AND "title" <> 'anne of green gables' | squall |
CREATE TABLE table_name_32 (
home_team VARCHAR,
tie_no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home team when the Tie no is 1?
| SELECT home_team FROM table_name_32 WHERE tie_no = "1" | sql_create_context |
CREATE TABLE table_23560 (
"#" real,
"Sanskrit" text,
"Malayalam name \u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02" text,
"Tamil name \u0ba4\u0bae\u0bbf\u0bb4\u0bcd" text,
"Telugu name \u0c24\u0c46\u0c32\u0c41\u0c17\u0c41" text,
"Kannada name \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" text,
"Western star name"... | SELECT "Telugu name \u0c24\u0c46\u0c32\u0c41\u0c17\u0c41" FROM table_23560 WHERE "Kannada name \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" = 'Utthara ಉತ್ತರ' | wikisql |
CREATE TABLE table_name_65 (
aggregate VARCHAR,
opponents VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the aggregate with opponents of tauras
| SELECT aggregate FROM table_name_65 WHERE opponents = "tauras" | sql_create_context |
CREATE TABLE table_name_60 (
attendance VARCHAR,
points INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Attendance has more than 90 points?
| SELECT attendance FROM table_name_60 WHERE points > 90 | sql_create_context |
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 microlab (
microl... | SELECT COUNT(DISTINCT patient.patienthealthsystemstayid) FROM patient WHERE patient.uniquepid = '010-21105' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') | eicu |
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, fare, flight, flight_fare, flight_stop WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'AT... | atis |
CREATE TABLE table_name_7 (
against INTEGER,
opposing_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest Against for a game against Bristol City?
| SELECT MAX(against) FROM table_name_7 WHERE opposing_team = "bristol city" | sql_create_context |
CREATE TABLE Catalogs (
catalog_id INTEGER,
catalog_name VARCHAR(50),
catalog_publisher VARCHAR(80),
date_of_publication DATETIME,
date_of_latest_revision DATETIME
)
CREATE TABLE Catalog_Structure (
catalog_level_number INTEGER,
catalog_id INTEGER,
catalog_level_name VARCHAR(50)
)
CREA... | SELECT catalog_entry_name, capacity FROM Catalog_Contents WHERE price_in_dollars > 700 ORDER BY capacity DESC | nvbench |
CREATE TABLE table_name_82 (
model VARCHAR,
number_built VARCHAR,
chassis_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What model has a number built smaller than 6.526, and the Chassis code w109.015?
| SELECT model FROM table_name_82 WHERE number_built < 6.526 AND chassis_code = "w109.015" | sql_create_context |
CREATE TABLE table_name_80 (
launcher VARCHAR,
spacecraft VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the launcher vehicle for Apollo-Soyuz?
| SELECT launcher FROM table_name_80 WHERE spacecraft = "apollo-soyuz" | sql_create_context |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
C... | SELECT p.Id, p.CreationDate, u.DisplayName, p.Score, p.Id AS "post_link", pP.AcceptedAnswerId FROM Posts AS p, Users AS u, Posts AS pP WHERE p.PostTypeId = 2 AND (p.OwnerUserId = 5937420 OR p.OwnerUserId = 9498806 OR p.OwnerUserId = 9485673 OR p.OwnerUserId = 9524052 OR p.OwnerUserId = 9521610 OR p.OwnerUserId = 992904... | sede |
CREATE TABLE table_11718 (
"Version" text,
"Year" text,
"Bore x stroke" text,
"Displacement" text,
"Power" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the power for 1935-45
| SELECT "Power" FROM table_11718 WHERE "Year" = '1935-45' | wikisql |
CREATE TABLE table_21918 (
"Year" real,
"Date" text,
"Driver" text,
"Manufacturer" text,
"Laps" real,
"Miles (km)" text,
"Race Time" text,
"Average Speed (mph)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For races with an average spe... | SELECT "Race Time" FROM table_21918 WHERE "Average Speed (mph)" = '113.835' | wikisql |
CREATE TABLE table_20898 (
"Player" text,
"Team" text,
"Matches" real,
"Wickets" real,
"Average" text,
"Best Bowling" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many wickets did Alec bedser have?
| SELECT MAX("Wickets") FROM table_20898 WHERE "Player" = 'Alec Bedser' | wikisql |
CREATE TABLE table_16561 (
"#" real,
"Episode" text,
"Air Date" text,
"Time slot (EST)" text,
"Rating" text,
"Share" real,
"18-49 (Rating/Share)" text,
"Viewers (m)" text,
"Rank (Overall)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "Time slot (EST)" FROM table_16561 WHERE "Episode" = 'Who''s Your Daddy' | wikisql |
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8... | SELECT CRS_CODE, COUNT(*) FROM CLASS GROUP BY CRS_CODE ORDER BY CRS_CODE | nvbench |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "LEFT COLON CANCER" AND demographic.dod_year <= "2133.0" | mimicsql_data |
CREATE TABLE table_23371 (
"Branding" text,
"Callsign" text,
"Frequency" text,
"Power (kW)" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- From brand Yes! FM 101.1, what was the frequency?
| SELECT "Frequency" FROM table_23371 WHERE "Branding" = 'YES! FM 101.1' | wikisql |
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 jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'E21.594' AND jyjgzbb.JCZBMC = '降钙素原' | css |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar... | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN cou... | advising |
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | SELECT People_ID, Height FROM people GROUP BY Sex | nvbench |
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 * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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 = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BG... | css |
CREATE TABLE table_33970 (
"Season" real,
"Team" text,
"Wins" real,
"Losses" real,
"Draws" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Draws have a Team of annandale, and Losses smaller than 13?
| SELECT SUM("Draws") FROM table_33970 WHERE "Team" = 'annandale' AND "Losses" < '13' | wikisql |
CREATE TABLE zyjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
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,
... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb JOIN 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 = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZ... | css |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.diagnosis = "LEFT COLON CANCER" | mimicsql_data |
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Reviewer (
rID int,
name text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Pleas... | SELECT title, SUM(stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title ORDER BY title DESC | nvbench |
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 AVG(t_kc24.PER_ACC_PAY / t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '8739090' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2003-04-09' AND '2019-11-24' | css |
CREATE TABLE zyjzjlb_jybgb (
YLJGDM_ZYJZJLB text,
BGDH number,
YLJGDM number
)
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 COUNT(*) FROM jybgb WHERE jybgb.JZLSH = '98503395870' | css |
CREATE TABLE Documents (
project_id VARCHAR
)
CREATE TABLE Projects (
project_id VARCHAR,
project_details VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the project id and detail for the project with at least two documents?
| SELECT T1.project_id, T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id HAVING COUNT(*) > 2 | sql_create_context |
CREATE TABLE table_name_96 (
city VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the city for the country of netherlands?
| SELECT city FROM table_name_96 WHERE country = "netherlands" | 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 person_info.XM FROM person_info JOIN hz_info JOIN zyjzjlb JOIN jybgb 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 AND zyjzjlb.YLJGDM = jybgb.YLJGDM_ZYJZJLB AND zyjzjlb.JZLSH = jybgb.JZLSH_ZYJZJLB WHERE jybgb.BGDH = '70434114659' | css |
CREATE TABLE table_name_90 (
player VARCHAR,
country VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What player is from Scotland and has a score of 74-70=144?
| SELECT player FROM table_name_90 WHERE score = 74 - 70 = 144 AND country = "scotland" | sql_create_context |
CREATE TABLE table_10911 (
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Tyre" text,
"Driver" text,
"Rounds" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which driver has a G tyre, rounds of 2-12 and a M7A chassis?
| SELECT "Driver" FROM table_10911 WHERE "Tyre" = 'g' AND "Rounds" = '2-12' AND "Chassis" = 'm7a' | wikisql |
CREATE TABLE table_18600760_19 (
geo_id VARCHAR,
latitude VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many geo id with 48.578664 are
| SELECT COUNT(geo_id) FROM table_18600760_19 WHERE latitude = "48.578664" | sql_create_context |
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 procedures.short_title = "Opn lft hemicolectmy NEC" | mimicsql_data |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
... | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) DESC | nvbench |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'PHIL' AND course.number = 406 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.o... | advising |
CREATE TABLE table_70712 (
"Dance" text,
"Best dancer(s)" text,
"Best score" real,
"Worst dancer(s)" text,
"Worst score" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the worst score for the worst dancer(s) john barnes, with a best score of ... | SELECT "Worst score" FROM table_70712 WHERE "Best score" = '36' AND "Worst dancer(s)" = 'john barnes' | wikisql |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemics... | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-80884')) AND DATETIME(medication.drugstarttime, 'start of year'... | eicu |
CREATE TABLE table_name_98 (
agg VARCHAR,
team_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the aggregate for the match with a team 2 of Hafia FC?
| SELECT agg FROM table_name_98 WHERE team_2 = "hafia fc" | sql_create_context |
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | SELECT Date_of_Birth, Height FROM people | nvbench |
CREATE TABLE products (
product_id number,
product_type_code text,
product_name text,
product_price number
)
CREATE TABLE supplier_addresses (
supplier_id number,
address_id number,
date_from time,
date_to time
)
CREATE TABLE order_items (
order_item_id number,
order_id number,... | SELECT T2.product_type_code, T2.product_name, T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3 | spider |
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 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 <= '2016-01-24') | css |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational... | SELECT COUNT(DISTINCT instructor.instructor_id) FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'CONDUCT' AND course.number = 501 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.of... | advising |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TA... | SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-46307')) AND DATETIME(allergy.allergytime) >= DATETIME(CURRENT_TIME(), '... | eicu |
CREATE TABLE table_52262 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the date when the venue is junction oval?
| SELECT "Date" FROM table_52262 WHERE "Venue" = 'junction oval' | wikisql |
CREATE TABLE table_name_30 (
away_team VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What did the away team score at Junction oval?
| SELECT away_team AS score FROM table_name_30 WHERE venue = "junction oval" | sql_create_context |
CREATE TABLE table_5035 (
"Make" text,
"Model" text,
"Production Run" text,
"Engine" text,
"Power" text,
"Wheelbase" text,
"Body Styles" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What body styles have 6/75 as the model?
| SELECT "Body Styles" FROM table_5035 WHERE "Model" = '6/75' | wikisql |
CREATE TABLE table_22050544_1 (
event__number VARCHAR,
winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the event # when the winner is what is 7x6?
| SELECT event__number FROM table_22050544_1 WHERE winner = "what is 7x6" | sql_create_context |
CREATE TABLE table_21899 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the game site against the Dallas Texans?
| SELECT "Game site" FROM table_21899 WHERE "Opponent" = 'Dallas Texans' | wikisql |
CREATE TABLE table_name_3 (
wins INTEGER,
pos VARCHAR,
poles VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Wins is the highest one that has a Pos of 2nd, and Poles larger than 2?
| SELECT MAX(wins) FROM table_name_3 WHERE pos = "2nd" AND poles > 2 | sql_create_context |
CREATE TABLE table_78854 (
"Rank" real,
"Mountain Peak" text,
"Subrange" text,
"Elevation" text,
"Prominence" text,
"Isolation" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the Prominence of the Mountain Peak of matchless mountain pb?
| SELECT "Prominence" FROM table_78854 WHERE "Mountain Peak" = 'matchless mountain pb' | wikisql |
CREATE TABLE table_21535453_1 (
dates_administered VARCHAR,
terry_mcauliffe VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date when Terry McAuliffe won 19%?
| SELECT dates_administered FROM table_21535453_1 WHERE terry_mcauliffe = "19%" | sql_create_context |
CREATE TABLE table_name_15 (
away_team VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the VFL played at Junction Oval what was the away score?
| SELECT away_team AS score FROM table_name_15 WHERE venue = "junction oval" | sql_create_context |
CREATE TABLE product_categories (
production_type_code text,
product_type_description text,
vat_rating number
)
CREATE TABLE products (
product_id number,
parent_product_id number,
production_type_code text,
unit_price number,
product_name text,
product_color text,
product_size ... | SELECT T2.customer_first_name, T2.customer_last_name FROM accounts AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "900" | spider |
CREATE TABLE table_17896 (
"No" real,
"Player" text,
"Height" text,
"Position" text,
"Year born" real,
"Current Club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the current club with player being felipe reyes
| SELECT "Current Club" FROM table_17896 WHERE "Player" = 'Felipe Reyes' | wikisql |
CREATE TABLE table_name_36 (
average INTEGER,
peak VARCHAR,
finale VARCHAR,
hk_viewers VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the high average that has a Finale larger than 35, a HK viewers of 2.12 million, and a Peak larger than 40?
| SELECT MAX(average) FROM table_name_36 WHERE finale > 35 AND hk_viewers = "2.12 million" AND peak > 40 | sql_create_context |
CREATE TABLE table_37882 (
"States" text,
"Fall 05" real,
"Fall 06" real,
"Fall 07" real,
"Fall 08" real,
"Fall 09" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number is Fall 08 from the state with 57 in Fall 06 and 74 or less in Fall 05... | SELECT COUNT("Fall 08") FROM table_37882 WHERE "Fall 06" = '57' AND "Fall 05" < '74' | wikisql |
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_kc21 WHERE PERSON_NM = '方语诗' AND MED_SER_ORG_NO = '8013694' AND MED_ORG_DEPT_NM LIKE '%全科%' | css |
CREATE TABLE table_13643320_2 (
gto_winning_team VARCHAR,
gtu_winning_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the GTO winner of the round that ended with Chris Cord becoming the GTU winner?
| SELECT gto_winning_team FROM table_13643320_2 WHERE gtu_winning_team = "Chris Cord" | sql_create_context |
CREATE TABLE table_name_5 (
event VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- At what event did he fight takaharu murahama?
| SELECT event FROM table_name_5 WHERE opponent = "takaharu murahama" | sql_create_context |
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.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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... | 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 jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDW, AVG(jyjgzbb.JCZBJGDL) FROM jyjgzbb JOIN jybgb_jyjgzbb JOIN jybgb ON jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JYZBLSH AND jybgb_jyjgzbb.jyjgzbb_id = jyjgzbb.jyjgzbb_id AND jybgb_jyjgzbb.YLJGDM = jybgb.YLJGDM WHERE jybgb.YLJGDM = '2634197' AND jyjgzbb.BGRQ BETWEEN '2001-06-14' AND '2007-01... | css |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "86" AND demographic.days_stay > "34" | mimicsql_data |
CREATE TABLE table_29482 (
"Pos" real,
"Grid" real,
"Car" real,
"Driver" text,
"Constructor" text,
"Manufacturer" text,
"Laps" real,
"Laps Led" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For the #19 car, what was t... | SELECT MAX("Pos") FROM table_29482 WHERE "Car" = '19' | wikisql |
CREATE TABLE table_56648 (
"Race" text,
"Date" text,
"Location" text,
"Pole Position" text,
"Fastest Lap" text,
"Race Winner" text,
"Constructor" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the Long Beach constr... | SELECT "Constructor" FROM table_56648 WHERE "Location" = 'long beach' | wikisql |
CREATE TABLE table_19860361_4 (
huckleberry_hound VARCHAR,
air_date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Huckleberry Hound episodes were aired on 1960.09.18?
| SELECT COUNT(huckleberry_hound) FROM table_19860361_4 WHERE air_date = "1960.09.18" | sql_create_context |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code te... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'chr kidney dis stage iii') AND DATETIME(diagnoses_icd.char... | mimic_iii |
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "HOME" AND procedures.icd9_code = "14" | mimicsql_data |
CREATE TABLE table_80091 (
"Index" text,
"Name" text,
"Talent Segment" text,
"Acting Segment" text,
"Overall Ranking" real,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For the event with index f7, what is the status?
| SELECT "Status" FROM table_80091 WHERE "Index" = 'f7' | wikisql |
CREATE TABLE table_name_78 (
result VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result of the Competition of euro 2000 qualifier?
| SELECT result FROM table_name_78 WHERE competition = "euro 2000 qualifier" | sql_create_context |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
C... | SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_NM = '郑阳荣' AND t_kc21.IN_HOSP_DATE BETWEEN '2009-09-03' AND '2010-03-27' GROUP BY t_kc21.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE table_9865 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Round" real,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which round lasted 2:32?
| SELECT "Round" FROM table_9865 WHERE "Time" = '2:32' | wikisql |
CREATE TABLE table_name_58 (
opponent VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent in the match that lasted 4:17?
| SELECT opponent FROM table_name_58 WHERE time = "4:17" | sql_create_context |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistoryTypes (
Id numb... | SELECT b.UserId AS "user_link" FROM Badges AS b LEFT JOIN Posts AS p ON p.OwnerUserId = b.UserId WHERE b.Name = 'Marshal' AND p.Id IS NULL | sede |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
... | SELECT TagName, COUNT(*) AS TagCount FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id WHERE PostTags.PostId IN (398378, 452902, 2027397, 4368857, 4619735, 2178303, 6747316, 686231, 4121678, 6011345, 8654257, 8664705, 303053, 3221008, 5697717, 6451232, 136168, 2301789, 754494, 3024372) GROUP BY TagName ORDER BY... | sede |
CREATE TABLE table_77849 (
"Episode" text,
"Air Date" text,
"Timeslot" text,
"Rating" text,
"Share" text,
"18\u201349 (Rating/Share)" text,
"Viewers (m)" real,
"Rank (#)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rating ... | SELECT "Rating" FROM table_77849 WHERE "Rank (#)" = 'tba' AND "Air Date" = 'april 21, 2009' | wikisql |
CREATE TABLE table_203_17 (
id number,
"name" text,
"date of death" text,
"ceremony" text,
"year" text,
"academy award" text,
"film" text,
"winner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who 's date of death was after 1990 but be... | SELECT "name" FROM table_203_17 WHERE "date of death" > 1990 AND "date of death" < 1992 | squall |
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_DIAG_DOC_CD, t_kc21.OUT_DIAG_DOC_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '窦清润' GROUP BY t_kc21.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC | css |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND procedures.short_title = "Procedure-two vessels" | mimicsql_data |
CREATE TABLE table_39915 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Points difference" text,
"Tries For" text,
"Tries Against" text,
"Try Bonus" text,
"Losing Bonus" text,
"Points" text
)
-- Using valid SQLite, an... | SELECT "Lost" FROM table_39915 WHERE "Losing Bonus" = '4' | wikisql |
CREATE TABLE table_name_93 (
d_47 VARCHAR,
d_41 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the D 47 when it has a D 41 of r 36
| SELECT d_47 FROM table_name_93 WHERE d_41 = "r 36" | sql_create_context |
CREATE TABLE table_255812_1 (
population__2010_ VARCHAR,
area__km²_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total quantity of populace (2010) where location (km ) is 134.51
| SELECT COUNT(population__2010_) FROM table_255812_1 WHERE area__km²_ = "134.51" | sql_create_context |
CREATE TABLE table_name_36 (
friday VARCHAR,
monday VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is shown on Friday when Monday is Fox Sports Primetime?
| SELECT friday FROM table_name_36 WHERE monday = "fox sports primetime" | sql_create_context |
CREATE TABLE table_68111 (
"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 highest decile of Tarras school, which had a state authority... | SELECT MAX("Decile") FROM table_68111 WHERE "Authority" = 'state' AND "Name" = 'tarras school' | wikisql |
CREATE TABLE table_name_29 (
section VARCHAR,
position VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the section for position of 8th and season of 2003
| SELECT section FROM table_name_29 WHERE position = "8th" AND season = "2003" | sql_create_context |
CREATE TABLE table_17929 (
"Position" real,
"Club" text,
"Played" real,
"Won" real,
"Drawn" real,
"Lost" real,
"Pts For" real,
"Pts Agst" real,
"Bonus Points" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many... | SELECT COUNT("Lost") FROM table_17929 WHERE "Club" = 'Keighley Cougars' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.