instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 25723 AND DATETIME(admissions.admittime) <= DATETIME(CURRENT_TIME(), '-3 year') ORDER BY admissions.admittime DESC LIMIT 1 | 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 demographic.admission_type, diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Marilyn Norvell" | mimicsql_data |
CREATE TABLE table_name_55 (
jockey VARCHAR,
odds VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who has 5/1 odds?
| SELECT jockey FROM table_name_55 WHERE odds = "5/1" | sql_create_context |
CREATE TABLE table_name_60 (
catalog VARCHAR,
label VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which catalog did Village Records have on February 14, 2002?
| SELECT catalog FROM table_name_60 WHERE label = "village records" AND date = "february 14, 2002" | sql_create_context |
CREATE TABLE table_26139378_1 (
original_airdate VARCHAR,
viewers__in_millions_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the original airdate of the episode that had 8.23 million viewers?
| SELECT original_airdate FROM table_26139378_1 WHERE viewers__in_millions_ = "8.23" | sql_create_context |
CREATE TABLE savings (
custid number,
balance number
)
CREATE TABLE accounts (
custid number,
name text
)
CREATE TABLE checking (
custid number,
balance number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the name, checking balance and savin... | SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid | spider |
CREATE TABLE table_24130 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Black Knights points" real,
"Opponents" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the opponents for record being 2-0
| SELECT MAX("Opponents") FROM table_24130 WHERE "Record" = '2-0' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypoxemia' AND STRFTIME('%y', diagnosis.diagnosistime) >= '2102') AS t1 JOIN (SELECT patient.uniquepid, trea... | eicu |
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 SUM(t_kc22.AMOUNT) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '23868941' AND t_kc22.t_kc21_CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2002-01-22' AND '2003-03-01' AND t_kc22.MED_INV_ITEM_TYPE = '手术费' | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid... | SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-100528')) AND DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TIME()... | eicu |
CREATE TABLE table_name_57 (
location VARCHAR,
year VARCHAR,
gold VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location of the Asian Games after 2002 when Kim Hyun-soo won the gold?
| SELECT location FROM table_name_57 WHERE year > 2002 AND gold = "kim hyun-soo" | sql_create_context |
CREATE TABLE table_28136_15 (
english_word VARCHAR,
ukrainian VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How do you say the ukrainian word (diakuju) in English?
| SELECT english_word FROM table_28136_15 WHERE ukrainian = "Дякую (diakuju)" | 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 ReviewTaskTypes (
Id number,
Name tex... | SELECT *, COUNT(*) FROM (SELECT DATE(CAST(TIME_TO_STR(CreationDate, '%Y') AS TEXT) + '-' + CAST(TIME_TO_STR(CreationDate, '%m') AS TEXT) + '-01') AS Month, t.TagName FROM (SELECT p.Id, p.CreationDate FROM Posts AS p JOIN PostTags AS pt ON pt.PostId = p.Id JOIN Tags AS t ON t.Id = pt.TagId) AS pp JOIN PostTags AS pt ON ... | sede |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
Ta... | SELECT pf.PostId AS "post_link", pf.VoteTypeId AS Type, pf.CreationDate AS Date, p.LastActivityDate FROM PostFeedback AS pf JOIN Posts AS p ON p.Id = pf.PostId WHERE p.Id = '##PostId##' GROUP BY pf.PostId, pf.VoteTypeId, pf.CreationDate, p.LastActivityDate ORDER BY pf.CreationDate | sede |
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
time_slot_id varchar(4)
)
CREATE TABLE classroom (
building varchar(15),
room_number varchar(7),
capacity numeric(4,0)
)
CREATE ... | SELECT year, COUNT(year) FROM course AS T1 JOIN section AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY year DESC | nvbench |
CREATE TABLE table_80308 (
"Year" real,
"Winner" text,
"Country" text,
"Purse ( $ )" real,
"Score" text,
"First Prize ( $ )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the total purse in the years after 1996 with a score of 272 (-16... | SELECT SUM("Purse ( $ )") FROM table_80308 WHERE "Score" = '272 (-16)' AND "Winner" = 'frank nobilo' AND "Year" > '1996' | wikisql |
CREATE TABLE table_name_51 (
player VARCHAR,
place VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the player when the place is t5 and the score is 69-66-71=206?
| SELECT player FROM table_name_51 WHERE place = "t5" AND score = 69 - 66 - 71 = 206 | sql_create_context |
CREATE TABLE table_41670 (
"Model Number" text,
"Frequency" text,
"L2-Cache" text,
"Multiplier 1" text,
"Voltage" text,
"Socket" text,
"Release date" text,
"Order Part Number" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the fr... | SELECT "Frequency" FROM table_41670 WHERE "Model Number" = 'turion 64 x2 tl-62' | wikisql |
CREATE TABLE table_12128 (
"Opposing Teams" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the venue for 24/11/1979?
| SELECT "Venue" FROM table_12128 WHERE "Date" = '24/11/1979' | wikisql |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT IN_DIAG_DIS_CD, IN_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_NM = '范璇子' | css |
CREATE TABLE table_43436 (
"Locomotive number" text,
"Model" text,
"Type" text,
"Propulsion" text,
"Manufacturer" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What type is locomotive CTN 1364?
| SELECT "Type" FROM table_43436 WHERE "Locomotive number" = 'ctn 1364' | wikisql |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTy... | SELECT u.DisplayName AS "User Name", u.Reputation AS "User Reputation", u.CreationDate AS "Date" FROM Users AS u | sede |
CREATE TABLE customer (
customer_id number,
store_id number,
first_name text,
last_name text,
email text,
address_id number,
active boolean,
create_date time,
last_update time
)
CREATE TABLE category (
category_id number,
name text,
last_update time
)
CREATE TABLE store... | SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE table_67491 (
"Film" text,
"Director(s)" text,
"Writer(s)" text,
"Recipient" text,
"Date" text,
"Award" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the film for award of 3,386
| SELECT "Film" FROM table_67491 WHERE "Award" = '£3,386' | wikisql |
CREATE TABLE table_name_82 (
years_in_orlando VARCHAR,
nationality VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What years was Lebanon the nationality?
| SELECT years_in_orlando FROM table_name_82 WHERE nationality = "lebanon" | sql_create_context |
CREATE TABLE table_61978 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country won in 1977?
| SELECT "Country" FROM table_61978 WHERE "Year(s) won" = '1977' | wikisql |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT q.Id AS "post_link", 'http://stackoverflow.com/a/' + CAST(a.Id AS TEXT) AS "answer_link" FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id AND a.OwnerUserId = q.OwnerUserId AND a.Id != q.AcceptedAnswerId WHERE a.OwnerUserId = '##UserId##' | sede |
CREATE TABLE table_39787 (
"Stake" text,
"Organized" text,
"Number of Wards/ Branches in Arkansas" real,
"Stake President" text,
"Occupation" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the stake president when the organized date is Apri... | SELECT "Stake President" FROM table_39787 WHERE "Organized" = 'april 18, 1965' | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "WIDOWED" AND procedures.short_title = "Tonsil&adenoid biopsy" | mimicsql_data |
CREATE TABLE airport (
id int,
City text,
Country text,
IATA text,
ICAO text,
name text
)
CREATE TABLE operate_company (
id int,
name text,
Type text,
Principal_activities text,
Incorporated_in text,
Group_Equity_Shareholding real
)
CREATE TABLE flight (
id int,
... | SELECT T1.id, COUNT(*) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id JOIN airport AS T3 ON T2.airport_id = T3.id GROUP BY T3.id | 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 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.diagnosis = "ANGIOEDEMA" | mimicsql_data |
CREATE TABLE procedures (
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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "47" AND lab.fluid = "Joint Fluid" | mimicsql_data |
CREATE TABLE table_26728 (
"Season" text,
"Champions" text,
"Runner-up" text,
"Third Place" text,
"Top Goalscorer" text,
"Club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times was third place held by drnovice?
| SELECT COUNT("Club") FROM table_26728 WHERE "Third Place" = 'Drnovice' | wikisql |
CREATE TABLE table_204_886 (
id number,
"rank" number,
"swimmer" text,
"country" text,
"time" text,
"note" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what swimmer had the top or first rank ?
| SELECT "swimmer" FROM table_204_886 WHERE "rank" = 1 | squall |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
Li... | SELECT Id AS "user_link", AboutMe FROM Users WHERE AboutMe COLLATE SQL_Latin1_General_CP1_CS_AS LIKE '%' + '##query1:string##' + '%' OR AboutMe COLLATE SQL_Latin1_General_CP1_CS_AS LIKE '%' + '##query2:string##' + '%' ORDER BY 'displayname' | sede |
CREATE TABLE table_204_511 (
id number,
"number" number,
"driver" text,
"entrant" text,
"chassis" text,
"engine" text,
"tyre" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who was the last driver on the list ?
| SELECT "driver" FROM table_204_511 ORDER BY id DESC LIMIT 1 | squall |
CREATE TABLE table_1140117_5 (
winning_driver VARCHAR,
circuit VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the winning driver for the goodwood circuit?
| SELECT winning_driver FROM table_1140117_5 WHERE circuit = "Goodwood" | sql_create_context |
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.CYKSDM, zyjzjlb.CYKSMC FROM zyjzjlb WHERE zyjzjlb.JZLSH = '94947569717' | css |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | SELECT * FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb... | css |
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight (
aircraft_code_sequence... | SELECT DISTINCT airport_code FROM airport WHERE state_code IN (SELECT STATEalias0.state_code FROM state AS STATEalias0 WHERE STATEalias0.state_name = 'ARIZONA') | atis |
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2200" AND diagnoses.icd9_code = "E8791" | mimicsql_data |
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 demographic.discharge_location, demographic.dischtime FROM demographic WHERE demographic.subject_id = "17570" | mimicsql_data |
CREATE TABLE table_name_15 (
method VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What method has randy couture as the opponent?
| SELECT method FROM table_name_15 WHERE opponent = "randy couture" | sql_create_context |
CREATE TABLE table_72404 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List all candidates in the democratic party where the election had the i... | SELECT "Candidates" FROM table_72404 WHERE "Party" = 'Democratic' AND "Incumbent" = 'Frank Chelf' | wikisql |
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 lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2056" AND lab.fluid = "Urine" | mimicsql_data |
CREATE TABLE table_name_34 (
games VARCHAR,
goals_for VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games were recorded with Goals for number of 215?
| SELECT COUNT(games) FROM table_name_34 WHERE goals_for = 215 | 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 MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_NM = '陶云飞' GROUP BY MED_SER_ORG_NO ORDER BY COUNT(*) DESC | css |
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_... | 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, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.ci... | atis |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id | advising |
CREATE TABLE table_20618 (
"#" real,
"Series Sorted" text,
"Title" text,
"Author" text,
"Doctor" text,
"Featuring" text,
"Released" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the released for pat mills
| SELECT "Released" FROM table_20618 WHERE "Author" = 'Pat Mills' | wikisql |
CREATE TABLE table_29066 (
"Date" text,
"Time" text,
"Visiting team" text,
"Home team" text,
"Site" text,
"Broadcast" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the results of the tennessee... | SELECT "Result" FROM table_29066 WHERE "Visiting team" = 'Tennessee Tech' | wikisql |
CREATE TABLE table_26756 (
"Player" text,
"Group Legs won" real,
"Play-Off Legs won" real,
"Winners Group Legs won" real,
"Winners Play-Off Legs won" real,
"Final position money won*" text,
"Total money won" text
)
-- Using valid SQLite, answer the following questions for the tables provid... | SELECT MAX("Winners Play-Off Legs won") FROM table_26756 WHERE "Total money won" = '£2,350' | wikisql |
CREATE TABLE table_name_65 (
date VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date with a Score that is 46-77?
| SELECT date FROM table_name_65 WHERE score = "46-77" | sql_create_context |
CREATE TABLE table_24375 (
"Barangay" text,
"Population (2000)" real,
"Population (2007)" real,
"Population (2010)" real,
"Barangay Fiesta" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2010 population when the 2000 population is 5720?
| SELECT MAX("Population (2010)") FROM table_24375 WHERE "Population (2000)" = '5720' | wikisql |
CREATE TABLE table_name_53 (
race VARCHAR,
winning_driver VARCHAR,
fastest_lap VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which race had Jacky Ickx as the winner and Clay Regazzoni with the fastest lap?
| SELECT race FROM table_name_53 WHERE winning_driver = "jacky ickx" AND fastest_lap = "clay regazzoni" | sql_create_context |
CREATE TABLE table_38032 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What week ended in a result of w 30-3, and had an attendance less than 62,795?
| SELECT MIN("Week") FROM table_38032 WHERE "Result" = 'w 30-3' AND "Attendance" < '62,795' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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 ... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '85755686668' AND t_kc22.HOSP_DOC_NM LIKE '韦%' | css |
CREATE TABLE zyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '76364706' AND qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 3367.94) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '76364706' AND gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMO... | css |
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(20),
customer_last_name VARCHAR(20),
customer_address VARCHAR(255),
customer_phone VARCHAR(255),
customer_email VARCHAR(255),
other_customer_details VARCHAR(255)
)
CREATE TABLE Financial_Transactions (
transaction... | SELECT card_type_code, COUNT(*) FROM Customers_Cards GROUP BY card_type_code ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE procedures (
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Percutaneous aspiration of liver" | mimicsql_data |
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.PERSON_NM = '秦慧月' AND t_kc21.CLINIC_TYPE = '住院' AND MOD(t_kc21.MED_AMOUT, 1) = 0 | css |
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 employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL v... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' | nvbench |
CREATE TABLE journal (
Journal_ID int,
Date text,
Theme text,
Sales int
)
CREATE TABLE journal_committee (
Editor_ID int,
Journal_ID int,
Work_Type text
)
CREATE TABLE editor (
Editor_ID int,
Name text,
Age real
)
-- Using valid SQLite, answer the following questions for the ... | SELECT Name, COUNT(Name) FROM editor GROUP BY Name ORDER BY Name | nvbench |
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE key... | SELECT DISTINCT COUNT(DISTINCT writes.paperid) FROM author, writes WHERE author.authorname = 'Mirella Lapata' AND writes.authorid = author.authorid | scholar |
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight... | SELECT DISTINCT fare.fare_id FROM airport, airport_service, city, fare, flight, flight_fare WHERE (airport.airport_code = 'DFW' AND city.city_code = airport_service.city_code AND city.city_name = 'ATLANTA' AND flight.from_airport = airport_service.airport_code AND flight.to_airport = airport.airport_code) AND flight_fa... | atis |
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 name, number FROM course WHERE department = 'EECS' AND has_lab = 'N' AND number < 400 + 100 AND number >= 400 | advising |
CREATE TABLE qtb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_ID = '27804437' AND t_kc22.STA_DATE BETWEEN '2010-08-25' AND '2011-01-15' AND t_kc22.SELF_PAY_PRO < 0.31 UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_ID = '2780443... | css |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "MARRIED" AND lab.label = "WBC, Pleural" | mimicsql_data |
CREATE TABLE table_59900 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country was Jay Haas representing?
| SELECT "Country" FROM table_59900 WHERE "Player" = 'jay haas' | 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 WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.diagnosis = "LEFT FEMUR FRACTURE" | mimicsql_data |
CREATE TABLE table_74680 (
"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.
-- Which venue hosted a home team with a score of 1... | SELECT "Venue" FROM table_74680 WHERE "Home team score" = '13.15 (93)' | wikisql |
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... | SELECT p.Title, crt.Name FROM PendingFlags AS pf JOIN CloseReasonTypes AS crt ON pf.CloseReasonTypeId = crt.Id JOIN Posts AS p ON p.Id = pf.PostId LIMIT 20 | sede |
CREATE TABLE table_24839 (
"Episode number" real,
"Title" text,
"Original airing on Channel 4" text,
"Time of airing on Channel 4" text,
"Original airing on E4" text,
"Time of airing on E4" text,
"Position in Channel 4s ratings a" text,
"Position in E4s ratings b" text,
"Total viewer... | SELECT COUNT("Position in Channel 4s ratings a") FROM table_24839 WHERE "Original airing on Channel 4" = 'February 24, 2010' | wikisql |
CREATE TABLE table_76936 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the low score for TO par +2 in japan?
| SELECT MIN("Score") FROM table_76936 WHERE "To par" = '+2' AND "Country" = 'japan' | 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.BBCJBW FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.person_info_XM = '曹玉轩' AND jybgb.BGRQ BETWEEN '2005-11-22' AND '2012-07-06... | css |
CREATE TABLE table_55195 (
"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 did the away team score at corio oval?
| SELECT "Away team score" FROM table_55195 WHERE "Venue" = 'corio oval' | wikisql |
CREATE TABLE list (
lastname text,
firstname text,
grade number,
classroom number
)
CREATE TABLE teachers (
lastname text,
firstname text,
classroom number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the last names of the teachers that t... | SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5 | spider |
CREATE TABLE table_10233 (
"Date" text,
"Venue" text,
"Opponent" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which opponent is friendly and played on 15-08-2012?
| SELECT "Opponent" FROM table_10233 WHERE "Competition" = 'friendly' AND "Date" = '15-08-2012' | wikisql |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId n... | SELECT Id AS "post_link", CreationDate FROM Posts WHERE ClosedDate IS NULL AND PostTypeId = 1 AND DATEDIFF(month, CreationDate, GETDATE()) <= 3 AND Score < 2 AND (Title LIKE '%what is the best%' COLLATE Latin1_General_CI_AI OR Title LIKE '%what are the best%' COLLATE Latin1_General_CI_AI) ORDER BY LEN(Body) | sede |
CREATE TABLE table_44813 (
"Game" real,
"December" real,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the game against montreal canadiens after game 26?
| SELECT "Score" FROM table_44813 WHERE "Game" > '26' AND "Opponent" = 'montreal canadiens' | 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_kc22.SOC_SRT_DIRE_NM, t_kc22.AMOUNT, t_kc21.MED_CLINIC_ID FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '21250970698' OR t_kc21_t_kc22.MED_CLINIC_ID = '37406857624' AND t_kc2... | 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 treatment (
treatmenti... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-6 yea... | eicu |
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 Founder, SUM(Revenue) FROM Manufacturers GROUP BY Founder ORDER BY SUM(Revenue) DESC | nvbench |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE wdmzjzjlb (
CYBQDM text,
CYBQ... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jy... | css |
CREATE TABLE table_37523 (
"Camera" text,
"Sensor resolution" text,
"Sensor" text,
"Output" text,
"CPU usage" text,
"IR LEDs" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the output with no IR LEDs?
| SELECT "Output" FROM table_37523 WHERE "IR LEDs" = 'no' | wikisql |
CREATE TABLE table_15008 (
"Film" text,
"Year" real,
"Score composer" text,
"U.K. peak position" text,
"U.S. peak position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the US Peak position of the film that peaked at #21 in the UK?
| SELECT "U.S. peak position" FROM table_15008 WHERE "U.K. peak position" = '21' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
pa... | SELECT (SELECT vitalperiodic.heartrate FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-11182') AND NOT patient.unitdischargetime IS ... | eicu |
CREATE TABLE table_72157 (
"No." real,
"Date" text,
"Tournament" text,
"Winning score" text,
"To par" text,
"Margin of victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the to par dated may 4, 2003?
| SELECT "To par" FROM table_72157 WHERE "Date" = 'May 4, 2003' | wikisql |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT jyjgzbb.BGDH FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE hz_info.RYBH = '05865201' AND NOT jyjgzbb.BGDH IN (SELECT jyjgzb... | css |
CREATE TABLE table_5929 (
"Country" text,
"Project Name" text,
"Year startup" text,
"Operator" text,
"Peak" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the startup year for the Jackpine Mine (ph 2) project with an albian sands operator?
| SELECT "Year startup" FROM table_5929 WHERE "Operator" = 'albian sands' AND "Project Name" = 'jackpine mine (ph 2)' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
... | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE table_name_39 (
result VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the result on 29 September 2007?
| SELECT result FROM table_name_39 WHERE date = "29 september 2007" | sql_create_context |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId n... | SELECT Id, Score, Text, CreationDate FROM Comments WHERE UserId = @UserId ORDER BY Score DESC LIMIT 500 | sede |
CREATE TABLE table_80129 (
"Position" real,
"Club" text,
"Played" real,
"Points" text,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT COUNT("Position") FROM table_80129 WHERE "Wins" = '14' AND "Goals against" = '61' AND "Losses" < '19' | wikisql |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE ... | SELECT t.TagName, COUNT(q.Id) AS countofUnAnsweredQuestions FROM Posts AS q INNER JOIN PostTags AS pt ON pt.PostId = q.Id INNER JOIN Tags AS t ON pt.TagId = t.Id WHERE (SELECT COUNT(*) FROM Posts AS a WHERE a.ParentId = q.Id AND a.Score > 0) = 0 AND q.CommunityOwnedDate IS NULL AND q.ClosedDate IS NULL AND q.ParentId I... | sede |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varcha... | SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(MANAGER_ID) | nvbench |
CREATE TABLE table_57803 (
"Annual ridership (2012)" real,
"Rider. per mile" real,
"Opened" real,
"Stations" real,
"Lines" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of annual ridership with a station that has more than 13 sta... | SELECT SUM("Annual ridership (2012)") FROM table_57803 WHERE "Stations" = '13' AND "Lines" > '4' | wikisql |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT zyjybgb.BBDM, zyjybgb.BBMC, zyjybgb.BBZT FROM zyjybgb WHERE zyjybgb.BGDH = '83703766909' UNION SELECT mzjybgb.BBDM, mzjybgb.BBMC, mzjybgb.BBZT FROM mzjybgb WHERE mzjybgb.BGDH = '83703766909' | css |
CREATE TABLE table_name_92 (
record VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On May 26, what was the team's record?
| SELECT record FROM table_name_92 WHERE date = "may 26" | sql_create_context |
CREATE TABLE table_name_2 (
written_by VARCHAR,
episode__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the author of Episode 38 (16)?
| SELECT written_by FROM table_name_2 WHERE episode__number = "38 (16)" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.