instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_48 (
heat INTEGER,
time VARCHAR,
nationality VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the highest heat with a time slower than 48.87 from sweden?
| SELECT MAX(heat) FROM table_name_48 WHERE time > 48.87 AND nationality = "sweden" | sql_create_context |
CREATE TABLE table_name_26 (
country VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Country, when Score is 71-71-69=211?
| SELECT country FROM table_name_26 WHERE score = 71 - 71 - 69 = 211 | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperio... | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-200601')) AND intakeoutput.cellpath LIKE '%i... | eicu |
CREATE TABLE table_1198175_1 (
name VARCHAR,
born VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name when born is december 30, 1957 detroit, mi?
| SELECT name FROM table_1198175_1 WHERE born = "December 30, 1957 Detroit, MI" | sql_create_context |
CREATE TABLE table_203_646 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- where was the last competition held according to this chart ?
| SELECT "venue" FROM table_203_646 ORDER BY "year" DESC LIMIT 1 | squall |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate n... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hematological effect of infection - leukocytosis' AND STRFTIME('%y', diag... | eicu |
CREATE TABLE table_53782 (
"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 low was the attendance at the game that ende... | SELECT MIN("Crowd") FROM table_53782 WHERE "Home team score" = '16.13 (109)' | wikisql |
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 department, name, number FROM course WHERE (description LIKE '%Scandinavian Civilization%' OR name LIKE '%Scandinavian Civilization%') AND credits = 5 | advising |
CREATE TABLE table_name_48 (
version VARCHAR,
length VARCHAR,
remixed_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the version shown for the Length of 5:20, and shows Remixed by ?
| SELECT version FROM table_name_48 WHERE length = "5:20" AND remixed_by = "—" | sql_create_context |
CREATE TABLE table_26621 (
"Reference" text,
"Author" text,
"Section Size" text,
"Violins" real,
"Violas" real,
"Celli" real,
"Basses" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many cellos are suggested in the reference with section... | SELECT "Celli" FROM table_26621 WHERE "Section Size" = '20 players' | wikisql |
CREATE TABLE table_72079 (
"Entered office as Head of State or Government" text,
"Began time as senior G8 leader" text,
"Ended time as senior G8 leader" text,
"Person" text,
"Office" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did the Prime ... | SELECT "Entered office as Head of State or Government" FROM table_72079 WHERE "Office" = 'Prime Minister of Italy' | wikisql |
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 jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '沈雅懿' AND NOT ... | css |
CREATE TABLE table_name_13 (
venue VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was South Melbourne played?
| SELECT venue FROM table_name_13 WHERE home_team = "south melbourne" | sql_create_context |
CREATE TABLE table_204_662 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"attendance" number,
"bye" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total number of points scored against the opponents for... | SELECT SUM("result") FROM table_204_662 WHERE "date" = 9 | squall |
CREATE TABLE table_name_59 (
to_par VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Justin Leonard's To par?
| SELECT to_par FROM table_name_59 WHERE player = "justin leonard" | sql_create_context |
CREATE TABLE table_train_104 (
"id" int,
"migraines" bool,
"depression" bool,
"mini_mental_state_examination_mmse" int,
"systolic_blood_pressure_sbp" int,
"renal_disease" bool,
"alzheimer" bool,
"estimated_glomerular_filtration_rate_egfr" int,
"diastolic_blood_pressure_dbp" int,
... | SELECT * FROM table_train_104 WHERE systolic_blood_pressure_sbp >= 160 OR diastolic_blood_pressure_dbp >= 100 | criteria2sql |
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 T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Code DESC | nvbench |
CREATE TABLE table_name_48 (
venue VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Venue of the 2002 World Cup Qualification?
| SELECT venue FROM table_name_48 WHERE competition = "2002 world cup qualification" | sql_create_context |
CREATE TABLE table_30813 (
"Series #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the episode series number of 'St. Joan'?
| SELECT "Series #" FROM table_30813 WHERE "Title" = 'St. Joan' | 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 * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '6291859' AND gwyjzb.IN_HOSP_DATE BETWEEN '2004-06-24' AND '2014-06-10' UNION SELECT * FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '6291859' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2004-06-24' AND '2014-06-10' EXCEPT SELECT * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '629185... | css |
CREATE TABLE table_name_92 (
the_winner VARCHAR,
the_presenter VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won when the presenter was Tatiana Stefanidou?
| SELECT the_winner FROM table_name_92 WHERE the_presenter = "tatiana stefanidou" | sql_create_context |
CREATE TABLE table_204_707 (
id number,
"year" number,
"english title" text,
"chinese title" text,
"director" text,
"role" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the first film zhao dan starred in ?
| SELECT "english title" FROM table_204_707 ORDER BY "year" LIMIT 1 | squall |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
g... | SELECT COUNT(*) > 0 FROM course AS COURSE_0, course AS COURSE_1, program_course AS PROGRAM_COURSE_0, program_course AS PROGRAM_COURSE_1 WHERE COURSE_0.department = 'PSYCH' AND COURSE_0.number = 405 AND COURSE_1.department = 'PSYCH' AND COURSE_1.number = 619 AND PROGRAM_COURSE_0.course_id = COURSE_0.course_id AND PROGRA... | advising |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostFeedback (
Id number,
PostId numb... | SELECT Posts.Id AS "post_link", PostTypes.Name AS "type", LENGTH(Body) AS Length, OwnerUserId AS "userlink", CreationDate, Score FROM Posts JOIN PostTypes ON PostTypeId = PostTypes.Id ORDER BY Length DESC LIMIT 100 | sede |
CREATE TABLE dorm (
dormid number,
dorm_name text,
student_capacity number,
gender text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE lives_in (
stuid number,
dorm... | SELECT COUNT(*), city_code FROM student GROUP BY city_code HAVING COUNT(*) > 1 | spider |
CREATE TABLE table_6520 (
"Nation" text,
"Removal treaty (year signed)" text,
"Years of major emigration" text,
"Total number emigrated or forcibly removed" text,
"Number stayed in Southeast" text,
"Deaths from warfare" text
)
-- Using valid SQLite, answer the following questions for the table... | SELECT "Number stayed in Southeast" FROM table_6520 WHERE "Total number emigrated or forcibly removed" = '19,600' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '施弘益' AND t_kc22.STA_DATE BETWEEN '2001-01-09' AND '2013-11-22' AND t_kc22.SOC_SRT_DIRE_NM = '右佐匹克隆片' | css |
CREATE TABLE table_name_67 (
home VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What home has February 10 as the date?
| SELECT home FROM table_name_67 WHERE date = "february 10" | sql_create_context |
CREATE TABLE company (
Market_Value_in_Billion INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum and minimum market value of companies?
| SELECT MAX(Market_Value_in_Billion), MIN(Market_Value_in_Billion) FROM company | sql_create_context |
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 SUM(QTY), SUM(AMOUNT) FROM t_kc22 WHERE SOC_SRT_DIRE_NM = '谷维素片' AND STA_DATE BETWEEN '2013-07-30' AND '2020-10-01' | css |
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 Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Dorm (
dormid INTEGER,
dor... | SELECT gender, SUM(student_capacity) FROM Dorm GROUP BY gender | nvbench |
CREATE TABLE table_17763 (
"Model Number" text,
"Clock Speed" text,
"L2" text,
"L3" text,
"FSB Speed" text,
"Multiplier" text,
"Cores" real,
"Threads per core" real,
"Voltage" text,
"TDP (W)" text,
"Socket" text,
"Release Date" text,
"Price ( USD )" text
)
-- Using ... | SELECT "Price ( USD )" FROM table_17763 WHERE "L3" = '18 MB' | 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 procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "VERA120SR" | mimicsql_data |
CREATE TABLE table_name_99 (
attendance INTEGER,
venue VARCHAR,
series VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most that attendend when the venue was td banknorth garden and the series of montreal leads 3-1
| SELECT MAX(attendance) FROM table_name_99 WHERE venue = "td banknorth garden" AND series = "montreal leads 3-1" | sql_create_context |
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
date_account_opened DATETIME,
account_name VARCHAR(50),
other_account_details VARCHAR(255)
)
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
account_id INTEGER,
invoice_number INTEGER,
transaction_type VA... | SELECT date_account_opened, COUNT(date_account_opened) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' | nvbench |
CREATE TABLE table_name_67 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2008 result when 2012 and 2005 are both QF?
| SELECT 2008 FROM table_name_67 WHERE 2012 = "qf" AND 2005 = "qf" | sql_create_context |
CREATE TABLE table_32849 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average total when gold is 0, bronze is 0, and silver is smaller than 1?
| SELECT AVG("Total") FROM table_32849 WHERE "Gold" = '0' AND "Bronze" = '0' AND "Silver" < '1' | wikisql |
CREATE TABLE table_204_360 (
id number,
"year" number,
"host" text,
"gold" text,
"silver" text,
"bronze" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which country has brought home the most gold ?
| SELECT "gold" FROM table_204_360 GROUP BY "gold" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_29395291_2 (
subscribers__2006___thousands_ INTEGER,
provider VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum number of 2006 subscribers for Glo Mobile?
| SELECT MAX(subscribers__2006___thousands_) FROM table_29395291_2 WHERE provider = "Glo Mobile" | sql_create_context |
CREATE TABLE team (
name VARCHAR,
team_id VARCHAR
)
CREATE TABLE salary (
team_id VARCHAR,
salary INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the name and id of the team offering the lowest average salary?
| SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY AVG(T2.salary) LIMIT 1 | sql_create_context |
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | SELECT COUNT(*) FROM zyjzjlb WHERE YLJGDM = '4013101' AND JZKSMC = '肾内科' AND RYDJSJ BETWEEN '2000-02-29' AND '2018-09-12' | css |
CREATE TABLE table_67775 (
"Year" real,
"Role" text,
"Author" text,
"Radio Station/Production Company" text,
"Release/Air Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Role of narrator, and a Year larger than 2009, and a Release/Air Date of 7... | SELECT "Author" FROM table_67775 WHERE "Role" = 'narrator' AND "Year" > '2009' AND "Release/Air Date" = '7 october 2010' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.diagnosis = "GUILLAIN BARRE SYNDROME" | mimicsql_data |
CREATE TABLE table_29598261_1 (
hometown VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the hometown for mike ladd?
| SELECT hometown FROM table_29598261_1 WHERE name = "Mike Ladd" | sql_create_context |
CREATE TABLE table_57911 (
"Year" real,
"Title" text,
"Original channel" text,
"Role" text,
"Note" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the title when the year is after 2011 and the original channel is nhk?
| SELECT "Title" FROM table_57911 WHERE "Year" > '2011' AND "Original channel" = 'nhk' | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2175" AND diagnoses.short_title = "Chronic liver dis NEC" | mimicsql_data |
CREATE TABLE accounts (
account_id number,
customer_id number,
account_name text,
other_account_details text
)
CREATE TABLE financial_transactions (
transaction_id number,
previous_transaction_id number,
account_id number,
card_id number,
transaction_type text,
transaction_date ... | SELECT customer_id, COUNT(*) FROM accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE airport_aircraft (
id number,
airport_id number,
aircraft_id number
)
CREATE TABLE airport (
airport_id number,
airport_name text,
total_passengers number,
%_change_2007 text,
international_passengers number,
domestic_passengers number,
transit_passengers number,
... | SELECT T1.aircraft FROM aircraft AS T1 JOIN match AS T2 ON T1.aircraft_id = T2.winning_aircraft GROUP BY T2.winning_aircraft ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE table_name_12 (
finishes VARCHAR,
stage_wins VARCHAR,
starts VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of finishes associated with 13 starts, more than 169 points, and 96 stage wins?
| SELECT finishes FROM table_name_12 WHERE starts = 13 AND points > 169 AND stage_wins = 96 | sql_create_context |
CREATE TABLE table_66641 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the game where stafford rangers was the away team?
| SELECT "Score" FROM table_66641 WHERE "Away team" = 'stafford rangers' | wikisql |
CREATE TABLE Ref_Incident_Type (
incident_type_code VARCHAR(10),
incident_type_description VARCHAR(80)
)
CREATE TABLE Students (
student_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(40),
last_name VARCHAR(40),
cell_mobile_number VARCHAR(40),
email_addr... | SELECT date_address_from, SUM(monthly_rental) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE table_36185 (
"Game" real,
"February" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the lowest February for less than 57 points?
| SELECT MIN("February") FROM table_36185 WHERE "Points" < '57' | wikisql |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT Name, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 | nvbench |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX 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,
JSB... | SELECT mzjzjlb.YLJGDM 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_info.KLX AND per... | css |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE table_32025 (
"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.
-- When there was a draw, what was the time?
| SELECT "Time" FROM table_32025 WHERE "Res." = 'draw' | wikisql |
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%Core%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_co... | advising |
CREATE TABLE table_name_32 (
away_team VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team was the away team when the home team was Hereford United?
| SELECT away_team FROM table_name_32 WHERE home_team = "hereford united" | sql_create_context |
CREATE TABLE table_name_36 (
crowd INTEGER,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the average crowd attendance for the Junction Oval venue?
| SELECT AVG(crowd) FROM table_name_36 WHERE venue = "junction oval" | sql_create_context |
CREATE TABLE exhibition_record (
Exhibition_ID int,
Date text,
Attendance int
)
CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int
)
CREATE TABLE exhibition (
Exhibition_ID int,
Year int,
Theme text,
Artist_ID int,
Ticket_Price real... | SELECT Country, AVG(Age) FROM artist GROUP BY Country | nvbench |
CREATE TABLE table_24910733_2 (
episode VARCHAR,
rating VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many episodes received rating of 8.2?
| SELECT COUNT(episode) FROM table_24910733_2 WHERE rating = "8.2" | sql_create_context |
CREATE TABLE table_68677 (
"Year" text,
"Title" text,
"( Title in English )" text,
"Director" text,
"Character" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the year of the TV series directed by Soroush Sehat?
| SELECT "Year" FROM table_68677 WHERE "Director" = 'soroush sehat' | wikisql |
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE swimme... | SELECT meter_600, meter_100 FROM swimmer ORDER BY meter_600 DESC | nvbench |
CREATE TABLE table_33062 (
"Year" text,
"League" text,
"Reg. Season" text,
"Playoffs" text,
"Attendance Average" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average attendance of the team that had a regular season result of 2nd aisa, ... | SELECT "Attendance Average" FROM table_33062 WHERE "Reg. Season" = '2nd aisa, 24-16' | wikisql |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
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_i... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_i... | mimic_iii |
CREATE TABLE table_77133 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home team with scarborough as the away team?
| SELECT "Home team" FROM table_77133 WHERE "Away team" = 'scarborough' | wikisql |
CREATE TABLE table_name_75 (
rank INTEGER,
name VARCHAR,
birth VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What rank is He Yingqin who was born before 1890?
| SELECT AVG(rank) FROM table_name_75 WHERE name = "he yingqin" AND birth < 1890 | sql_create_context |
CREATE TABLE table_name_1 (
score VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Score with a Team that is @ portland?
| SELECT score FROM table_name_1 WHERE team = "@ portland" | sql_create_context |
CREATE TABLE table_76096 (
"Week of" text,
"Tier" text,
"Winner" text,
"Runner-up" text,
"Semi finalists" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who are the semi finalists on the week of 12 june, when the runner-up is listed as Lori McNeil?
| SELECT "Semi finalists" FROM table_76096 WHERE "Week of" = '12 june' AND "Runner-up" = 'lori mcneil' | wikisql |
CREATE TABLE table_30720 (
"Athens XI" text,
"PIFA Colaba FC u-17" text,
"Tata Power" text,
"Dadar XI \u2018B\u2019" text,
"IDBI" text,
"World Network Services" text,
"United FC" text,
"Good Shepherd" text
)
-- Using valid SQLite, answer the following questions for the tables provided ... | SELECT "Dadar XI \u2018B\u2019" FROM table_30720 WHERE "PIFA Colaba FC u-17" = 'Sporting Options' | wikisql |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE Comments (
Id number,
PostId num... | SELECT c.Id AS "comment_link", c.Text, c.UserId AS "user_link", c.CreationDate FROM Comments AS c INNER JOIN Posts AS p ON c.PostId = p.Id WHERE (p.OwnerUserId = '##UserId?8297##') AND (c.Text LIKE '%##Word1?chat##%' COLLATE Latin1_General_CI_AI) AND (c.Text LIKE '%##Word2?here##%' COLLATE Latin1_General_CI_AI) | sede |
CREATE TABLE customer_orders (
order_date VARCHAR,
customer_id VARCHAR
)
CREATE TABLE customers (
customer_name VARCHAR,
customer_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the customer name and date of the orders that have the status 'D... | SELECT t1.customer_name, t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = "Delivered" | sql_create_context |
CREATE TABLE table_77602 (
"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.
-- What was the score of the away team while playin... | SELECT "Away team score" FROM table_77602 WHERE "Venue" = 'arden street oval' | wikisql |
CREATE TABLE txmzjzjlb (
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,
MZZYZDZ... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZ... | css |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "61" AND lab.label = "Monocytes" | mimicsql_data |
CREATE TABLE table_24574 (
"Train No." text,
"Train Name" text,
"Destination" text,
"Category" text,
"Frequency" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the frequency of trains numbered 12671/12672?
| SELECT "Frequency" FROM table_24574 WHERE "Train No." = '12671/12672' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT gwyjzb.OUT_DIAG_DIS_CD, gwyjzb.OUT_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_NM = '葛映波' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6981.35) UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, fgwyjzb.OUT_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '葛映波' AND fgwyjzb.... | css |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId numb... | SELECT Id AS "post_link", ViewCount FROM Posts AS p WHERE Score = 0 ORDER BY ViewCount DESC LIMIT 10 | sede |
CREATE TABLE table_204_858 (
id number,
"date" text,
"time" text,
"opponent#" text,
"rank#" text,
"site" text,
"tv" text,
"result" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the different between the ... | SELECT ABS((SELECT "attendance" FROM table_204_858 WHERE "date" = 'august 30') - (SELECT "attendance" FROM table_204_858 WHERE "date" = 'november 1')) | squall |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "M" AND lab.itemid = "51148" | mimicsql_data |
CREATE TABLE table_203_157 (
id number,
"year" number,
"film" text,
"role" text,
"language" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many films has neha sharma been in ?
| SELECT COUNT("film") FROM table_203_157 | squall |
CREATE TABLE table_70538 (
"Frame size" text,
"Width" real,
"Height" real,
"Mpix" real,
"Aspect Ratio" text,
"Maximum fps" real,
"Maximum fps HDRx" real,
"least compression at 24 fps" text,
"least compression at maximum fps" text
)
-- Using valid SQLite, answer the following questi... | SELECT MIN("Maximum fps") FROM table_70538 WHERE "Width" = '3072' AND "Height" < '1620' | wikisql |
CREATE TABLE table_26998135_2 (
replaced_by VARCHAR,
date_of_vacancy VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the replaced by when the date of vacancy is 27 december 2010?
| SELECT replaced_by FROM table_26998135_2 WHERE date_of_vacancy = "27 December 2010" | sql_create_context |
CREATE TABLE table_204_29 (
id number,
"rank" number,
"lane" number,
"name" text,
"nationality" text,
"time" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total number of names ?
| SELECT COUNT("name") FROM table_204_29 | squall |
CREATE TABLE table_name_50 (
visitor VARCHAR,
series VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Visitor with a Series with 3 2?
| SELECT visitor FROM table_name_50 WHERE series = "3 – 2" | sql_create_context |
CREATE TABLE table_20212 (
"#" real,
"Season" real,
"Bowl game" text,
"Result" text,
"Opponent" text,
"Stadium" text,
"Location" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest # in Atlanta, GA with t... | SELECT MIN("#") FROM table_20212 WHERE "Location" = 'Atlanta, GA' AND "Opponent" = 'Georgia Bulldogs' | wikisql |
CREATE TABLE table_name_41 (
team VARCHAR,
circuit VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the team features at Oran Park Raceway?
| SELECT team FROM table_name_41 WHERE circuit = "oran park raceway" | sql_create_context |
CREATE TABLE table_10959 (
"Year" real,
"Result" text,
"Award" text,
"Category" text,
"Film or series" text,
"Character" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What character won the best dramatic performance award?
| SELECT "Character" FROM table_10959 WHERE "Category" = 'best dramatic performance' | wikisql |
CREATE TABLE table_29612224_1 (
colors VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many different combinations of team colors are there in all the schools in Maroa, Illinois?
| SELECT COUNT(colors) FROM table_29612224_1 WHERE location = "Maroa, Illinois" | sql_create_context |
CREATE TABLE table_24419 (
"Year" real,
"Song Title" text,
"Artist" text,
"Genre" text,
"Original Game" text,
"Band Tier/Venue" text,
"Exportable to GH5/BH" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every song title for 2007?
| SELECT "Song Title" FROM table_24419 WHERE "Year" = '2007' | wikisql |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "OVERDOSE" AND lab.flag = "delta" | mimicsql_data |
CREATE TABLE races (
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the names of all distinct races in reversed lexicographic order?
| SELECT DISTINCT name FROM races ORDER BY name DESC | sql_create_context |
CREATE TABLE table_60816 (
"Year" real,
"Grand Slam" text,
"Round" text,
"Winner" text,
"Loser" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which year is Nerida Gregory listed as the loser?
| SELECT AVG("Year") FROM table_60816 WHERE "Loser" = 'nerida gregory' | wikisql |
CREATE TABLE table_6224 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Game site of candlestick park had what opponent?
| SELECT "Opponent" FROM table_6224 WHERE "Game site" = 'candlestick park' | 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 SOC_SRT_DIRE_NM, EACH_DOSAGE, USE_FRE FROM t_kc22 WHERE MED_CLINIC_ID = '14468972682' | 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 COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '1577129' AND t_kc21.IN_HOSP_DATE BETWEEN '2001-12-14' AND '2004-04-11' AND t_kc21.INSU_TYPE = '儿童' | css |
CREATE TABLE table_2105 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Nickname" text,
"Joined" real,
"Division" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many teams have skyhawks as a ni... | SELECT COUNT("Division") FROM table_2105 WHERE "Nickname" = 'Skyhawks' | wikisql |
CREATE TABLE table_204_937 (
id number,
"rank" number,
"lane" number,
"athlete" text,
"time" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- name the only athlete from sri lanka .
| SELECT "athlete" FROM table_204_937 WHERE "athlete" = 'sri' | squall |
CREATE TABLE Things (
thing_id INTEGER,
organization_id INTEGER,
Type_of_Thing_Code CHAR(15),
service_type_code CHAR(10),
service_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_details VARCHAR(255)
)
CREATE TABLE Services (
service_id INTEGER,
organiz... | SELECT date_moved_in, COUNT(date_moved_in) FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY date_moved_in ORDER BY COUNT(date_moved_in) | nvbench |
CREATE TABLE table_name_87 (
date VARCHAR,
opponent VARCHAR,
result VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of the match with a result of ud 12/12 between Pernell Whitaker and James Mcgirt?
| SELECT date FROM table_name_87 WHERE result = "ud 12/12" AND name = "pernell whitaker" AND opponent = "james mcgirt" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.