instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnon... | SELECT t.TagName, COUNT(p.Id) AS question_count, SUM(CASE WHEN u.Reputation <= 10 THEN 1.000 ELSE 0.000 END) AS low_rep, AVG(CASE WHEN u.Reputation <= 10 THEN 1.000 ELSE 0.000 END) AS low_rep_pct FROM Posts AS p INNER JOIN Users AS u ON u.Id = p.OwnerUserId INNER JOIN PostTags AS pt ON p.Id = pt.PostId INNER JOIN Tags ... | sede |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org... | SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7112) AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 m... | mimic_iii |
CREATE TABLE table_57881 (
"Season" text,
"Match" text,
"Result" text,
"League" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What match was on 30 january 1938?
| SELECT "Match" FROM table_57881 WHERE "Date" = '30 january 1938' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_NM = '潘向荣' AND t_kc21.IN_HOSP_DATE BETWEEN '2011-03-13' AND '2013-06-11' GROUP BY t_kc21.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE table_12294557_3 (
canadian_airdate VARCHAR,
us_airdate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what are all the Canadian air dates where the u.s. air date is may 1, 2009
| SELECT canadian_airdate FROM table_12294557_3 WHERE us_airdate = "May 1, 2009" | sql_create_context |
CREATE TABLE table_2668243_18 (
district VARCHAR,
party VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the district for anti-jacksonian
| SELECT district FROM table_2668243_18 WHERE party = "Anti-Jacksonian" | sql_create_context |
CREATE TABLE table_name_76 (
representative VARCHAR,
party VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the representative for party of whig
| SELECT representative FROM table_name_76 WHERE party = "whig" | sql_create_context |
CREATE TABLE table_23793770_2 (
rating VARCHAR,
total_viewers__in_millions_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the reating share when the total viewers was 11.49 million?
| SELECT rating / SHARE(18 AS –49) FROM table_23793770_2 WHERE total_viewers__in_millions_ = "11.49" | sql_create_context |
CREATE TABLE table_name_88 (
name VARCHAR,
cerclis_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which site has the CERCLIS ID fld004092532?
| SELECT name FROM table_name_88 WHERE cerclis_id = "fld004092532" | sql_create_context |
CREATE TABLE table_7110 (
"Year" real,
"Conventional plans" text,
"HMOs" text,
"PPOs" text,
"POS plans" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many years have HMOs been 27% and POS plans 18%?
| SELECT COUNT("Year") FROM table_7110 WHERE "HMOs" = '27%' AND "POS plans" = '18%' | wikisql |
CREATE TABLE table_69840 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Rank" text,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team had fewer than 167 points in the 250cc class?
| SELECT "Team" FROM table_69840 WHERE "Points" < '167' AND "Class" = '250cc' | wikisql |
CREATE TABLE table_65492 (
"Team" text,
"Played" real,
"Highest" real,
"Lowest" real,
"Total" real,
"Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average for the team with highest less than 13,500 and games played are fewe... | SELECT MIN("Average") FROM table_65492 WHERE "Highest" < '13,500' AND "Played" < '5' | wikisql |
CREATE TABLE Products (
product_id INTEGER,
product_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
payment_method VARCHAR(15),
customer_name VARCHAR(80),
date_became_customer DATETIME,
other_customer_details VARCHAR(255)
)
CREATE TABLE Addresses (
address_id INTEG... | SELECT date_became_customer, COUNT(date_became_customer) FROM Customers WHERE customer_id BETWEEN 10 AND 20 | nvbench |
CREATE TABLE catalog_contents_additional_attributes (
catalog_entry_id number,
catalog_level_number number,
attribute_id number,
attribute_value text
)
CREATE TABLE attribute_definitions (
attribute_id number,
attribute_name text,
attribute_data_type text
)
CREATE TABLE catalog_contents (
... | SELECT attribute_data_type FROM attribute_definitions WHERE attribute_name = "Green" | spider |
CREATE TABLE table_69934 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent on December 17, 1995?
| SELECT "Opponent" FROM table_69934 WHERE "Date" = 'december 17, 1995' | 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_DIRE_CD text,
MED_DIRE_NM text,... | SELECT t_kc22.SOC_SRT_DIRE_NM, t_kc22.EACH_DOSAGE, t_kc22.USE_FRE 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 = '84336968126' | css |
CREATE TABLE table_name_42 (
COUNT VARCHAR,
winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many events did clay win?
| SELECT NOT COUNT AS event FROM table_name_42 WHERE winner = "clay" | sql_create_context |
CREATE TABLE table_name_74 (
decile INTEGER,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the avererage decile of Francis Douglas Memorial College?
| SELECT AVG(decile) FROM table_name_74 WHERE name = "francis douglas memorial college" | sql_create_context |
CREATE TABLE table_name_56 (
cover_model VARCHAR,
pictorials VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Cover model has a Pictorials of brande roderick-pmoy, naked news?
| SELECT cover_model FROM table_name_56 WHERE pictorials = "brande roderick-pmoy, naked news" | sql_create_context |
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 (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT demographic.dob FROM demographic WHERE demographic.name = "Kelly Gallardo" | mimicsql_data |
CREATE TABLE table_63511 (
"Total fat" text,
"Saturated fat" text,
"Monounsaturated fat" text,
"Polyunsaturated fat" text,
"Smoke point" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the monounsaturated fat with a smoke point of c (), a tot... | SELECT "Monounsaturated fat" FROM table_63511 WHERE "Smoke point" = '°c ()' AND "Total fat" = '100g' AND "Polyunsaturated fat" = '11g' AND "Saturated fat" = '14g' | wikisql |
CREATE TABLE table_51951 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is his record for fights that went over 2 roun... | SELECT "Record" FROM table_51951 WHERE "Round" > '2' AND "Event" = 'raging wolf 6: mayhem in the mist' | wikisql |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE medication (
medi... | SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-19622')) AND microlab.culturesite = 'bronchial lavage' AND ST... | eicu |
CREATE TABLE zyjzjlb_jybgb (
YLJGDM_ZYJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW te... | SELECT * FROM jybgb WHERE jybgb.JZLSH = '35405343075' | css |
CREATE TABLE table_17013 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Nickname" text,
"Joined" real,
"Left" real,
"Current Conference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many... | SELECT COUNT("Left") FROM table_17013 WHERE "Institution" = 'Anderson University' | wikisql |
CREATE TABLE Invoices (
Invoice_ID INTEGER,
Order_ID INTEGER,
payment_method_code CHAR(15),
Product_ID INTEGER,
Order_Quantity VARCHAR(288),
Other_Item_Details VARCHAR(255),
Order_Item_ID INTEGER
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15),
Workshop_... | SELECT Store_Name, COUNT(Store_Name) FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = "stop" GROUP BY Store_Name | nvbench |
CREATE TABLE table_1697190_2 (
money_list_rank VARCHAR,
best_finish VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- when Casey Martin's best finish was t-65, where did he land in the money list rankings?
| SELECT money_list_rank FROM table_1697190_2 WHERE best_finish = "T-65" | sql_create_context |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
cha... | SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27591)) AND DATETIME(inputevents_cv.charttime) <= DATETIME(CURRENT_TIME(), '-1567 day') | mimic_iii |
CREATE TABLE table_name_79 (
record VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Record, when Game is '36'?
| SELECT record FROM table_name_79 WHERE game = 36 | sql_create_context |
CREATE TABLE table_dev_53 (
"id" int,
"anemia" bool,
"gender" string,
"hemoglobin_a1c_hba1c" float,
"dyslipidemia" bool,
"hct" int,
"hematocrit_hct" float,
"persistent_macroalbuminuria" bool,
"urine_albumin" int,
"high_density_lipoprotein_cholesterol_hdl_c" int,
"coagulopathy... | SELECT * FROM table_dev_53 WHERE anemia = 1 OR (hemoglobin_a1c_hba1c < 11 AND gender = 'female') OR (hemoglobin_a1c_hba1c < 12 AND gender = 'male') OR coagulopathy = 1 | criteria2sql |
CREATE TABLE table_name_96 (
date_withdrawn VARCHAR,
fleet_numbers VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What day withdrawn is associated with fleet numbers of 12, 25, 42 46, 50, 70 71, 74 77, 106 107, 129?
| SELECT date_withdrawn FROM table_name_96 WHERE fleet_numbers = "12, 25, 42–46, 50, 70–71, 74–77, 106–107, 129" | sql_create_context |
CREATE TABLE table_203_497 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many countries have one more than 10 gold medals ?
| SELECT COUNT("nation") FROM table_203_497 WHERE "gold" > 10 | squall |
CREATE TABLE Residents_Services (
resident_id INTEGER,
service_id INTEGER,
date_moved_in DATETIME,
property_id INTEGER,
date_requested DATETIME,
date_provided DATETIME,
other_details VARCHAR(255)
)
CREATE TABLE Residents (
resident_id INTEGER,
property_id INTEGER,
date_moved_in ... | SELECT other_details, resident_id FROM Residents ORDER BY other_details | nvbench |
CREATE TABLE table_name_86 (
year VARCHAR,
location VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Year has a Location of dinas on 13 january?
| SELECT year FROM table_name_86 WHERE location = "dinas" AND date = "13 january" | sql_create_context |
CREATE TABLE table_34648 (
"Date" text,
"Tournament Name" text,
"Location" text,
"Partner" text,
"Score in Final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Score in Final on February 19, 1989?
| SELECT "Score in Final" FROM table_34648 WHERE "Date" = 'february 19, 1989' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
... | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb 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.JZLSH_MZJZJLB WHERE person_info.XM = '潘... | css |
CREATE TABLE table_28945 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the latest first elected?
| SELECT MAX("First elected") FROM table_28945 | wikisql |
CREATE TABLE document_functional_areas (
document_code text,
functional_area_code text
)
CREATE TABLE images (
image_id number,
image_alt_text text,
image_name text,
image_url text
)
CREATE TABLE document_sections_images (
section_id number,
image_id number
)
CREATE TABLE functional_a... | SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000 | spider |
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 SUM(t_kc22.AMOUNT) FROM t_kc22 JOIN mzb ON mzb.MED_ORG_DEPT_CD = t_kc22.MED_CLINIC_ID WHERE mzb.PERSON_SEX = '许文德' AND t_kc22.STA_DATE BETWEEN '2000-05-22' AND '2007-09-06' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE table_14071 (
"Gothic Letter" text,
"Roman" text,
"Sound (phoneme)" text,
"Sound (allophone)" text,
"Proto-Germanic origin" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Gothic Letter has Proto-Germanic origin of / /; /b/?
| SELECT "Gothic Letter" FROM table_14071 WHERE "Proto-Germanic origin" = '/ɸ/; /b/' | wikisql |
CREATE TABLE table_name_87 (
round VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- During which round was a Hawkeyes player selected for the defensive back position?
| SELECT round FROM table_name_87 WHERE position = "defensive back" | sql_create_context |
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, AVG(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder | nvbench |
CREATE TABLE table_name_98 (
rank INTEGER,
react VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Rank has a Reaction time larger than 0.20400000000000001, and a Time larger than 45.56?
| SELECT MAX(rank) FROM table_name_98 WHERE react > 0.20400000000000001 AND time > 45.56 | sql_create_context |
CREATE TABLE table_69287 (
"D 41" text,
"D 42" text,
"D 43" text,
"D 44" text,
"D 45" text,
"D 46" text,
"D 47" text,
"D 48" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the D44 when D43 is R 14?
| SELECT "D 44" FROM table_69287 WHERE "D 43" = 'r 14' | wikisql |
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 (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.admityear < "2176" | mimicsql_data |
CREATE TABLE table_24975 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which position is player bernie doan?
| SELECT "Position" FROM table_24975 WHERE "Player" = 'Bernie Doan' | wikisql |
CREATE TABLE table_20328 (
"Year" real,
"Matches" real,
"Wins" real,
"Losses" real,
"No Result" real,
"Tied" real,
"Success Rate" text,
"Position" text,
"Summary" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least tied
| SELECT MIN("Tied") FROM table_20328 | wikisql |
CREATE TABLE table_name_39 (
position INTEGER,
draws INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of the position with less than 0 draws?
| SELECT SUM(position) FROM table_name_39 WHERE draws < 0 | sql_create_context |
CREATE TABLE table_name_41 (
loss VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who lost the game with a record of 20-13?
| SELECT loss FROM table_name_41 WHERE record = "20-13" | sql_create_context |
CREATE TABLE table_71133 (
"Season" text,
"Club" text,
"Country" text,
"Competition" text,
"Apps." real,
"Goals" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What season did he have 7 appearances?
| SELECT "Season" FROM table_71133 WHERE "Apps." = '7' | wikisql |
CREATE TABLE table_17304621_14 (
bandwidth VARCHAR,
downstream VARCHAR,
price_tl VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the bandwidth for downstream of 20 mbit/s for 69 tl?
| SELECT bandwidth FROM table_17304621_14 WHERE downstream = "20 Mbit/s" AND price_tl = "69 TL" | sql_create_context |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc21.MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY) FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.MED_SER_ORG_NO = '7883638' GROUP BY t_kc21.MED_ORG_DEPT_CD | css |
CREATE TABLE table_name_71 (
losses VARCHAR,
goals_for VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Hiw many losses have 30 for the goals with points greater than 24?
| SELECT COUNT(losses) FROM table_name_71 WHERE goals_for = 30 AND points > 24 | sql_create_context |
CREATE TABLE table_53617 (
"Subframe #" real,
"Page #" text,
"Name" text,
"Word #" real,
"Bits" text,
"Scale" text,
"Signed" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the scale of sv_health with a word number smaller than 4?
| SELECT "Scale" FROM table_53617 WHERE "Word #" < '4' AND "Name" = 'sv_health' | 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 course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Readings%' OR course.description LIKE '%Readings%' OR course.name LIKE '%Readings%') AND program... | advising |
CREATE TABLE table_45975 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What college did the player who had the position of OT come from who was pick number les... | SELECT "College" FROM table_45975 WHERE "Overall" > '226' AND "Pick" < '12' AND "Position" = 'ot' | 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 prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicare" AND diagnoses.short_title = "Preterm NEC 2500+g" | mimicsql_data |
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(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 = '2024496' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2006-11-13' AND '2018-05-18' | css |
CREATE TABLE table_50693 (
"Tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE 2011 PERFORMANCE AT THE MIAMI MASTERS?
| SELECT "2011" FROM table_50693 WHERE "Tournament" = 'miami masters' | wikisql |
CREATE TABLE table_9888 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of appointment for Chr... | SELECT "Date of appointment" FROM table_9888 WHERE "Team" = 'aek' AND "Replaced by" = 'christos kassianos' | wikisql |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_i... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'paroxetine hcl') AS t1 JOIN (SELECT admissions.subject_id, prescr... | mimic_iii |
CREATE TABLE program (
Program_ID int,
Name text,
Origin text,
Launch real,
Owner text
)
CREATE TABLE broadcast (
Channel_ID int,
Program_ID int,
Time_of_day text
)
CREATE TABLE channel (
Channel_ID int,
Name text,
Owner text,
Share_in_percent real,
Rating_in_percen... | SELECT Owner, SUM(Rating_in_percent) FROM channel GROUP BY Owner ORDER BY Owner DESC | nvbench |
CREATE TABLE table_9083 (
"City" text,
"Chinese" text,
"Pinyin" text,
"County" text,
"Population (2010)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is taipei's lowest 2010 population?
| SELECT MIN("Population (2010)") FROM table_9083 WHERE "City" = 'taipei' | wikisql |
CREATE TABLE table_26591434_1 (
original_airdate VARCHAR,
writer VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the original air date for the writer tanaka shinichi?
| SELECT original_airdate FROM table_26591434_1 WHERE writer = "Tanaka Shinichi" | sql_create_context |
CREATE TABLE table_25818630_2 (
votes__cast VARCHAR,
constituency VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many votes were cast when the constituency was midlothian?
| SELECT votes__cast FROM table_25818630_2 WHERE constituency = "Midlothian" | sql_create_context |
CREATE TABLE table_name_52 (
season INTEGER,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Seasonhas a Score of 3 3 aet , 4 3 pen?
| SELECT MAX(season) FROM table_name_52 WHERE score = "3 – 3 aet , 4–3 pen" | sql_create_context |
CREATE TABLE table_45960 (
"Tournament" text,
"Surface" text,
"Week" text,
"Winner and score" text,
"Finalist" text,
"Semifinalists" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the tournament for the week of August 4?
| SELECT "Tournament" FROM table_45960 WHERE "Week" = 'august 4' | 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_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '55722979' AND t_kc22.STA_DATE BETWEEN '2001-09-01' AND '2015-06-25' AND t_kc21.MED_SER_ORG_NO = '5394717' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE table_name_68 (
green_rating VARCHAR,
engine_capacity VARCHAR,
manufacturer VARCHAR,
l_100km_urban__cold_ VARCHAR,
mpg_us_urban VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the green rating for the vehicle with L/100km urba... | SELECT green_rating FROM table_name_68 WHERE l_100km_urban__cold_ > 10.9 AND mpg_us_urban > 14.1 AND manufacturer = "volkswagen" AND engine_capacity < 3189 | sql_create_context |
CREATE TABLE projects (
project_id number,
project_details text
)
CREATE TABLE documents (
document_id number,
document_type_code text,
project_id number,
document_date time,
document_name text,
document_description text,
other_details text
)
CREATE TABLE ref_document_types (
d... | SELECT account_id, account_details FROM accounts | spider |
CREATE TABLE table_name_68 (
division VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which division is the Derbyshire Falcons in?
| SELECT division FROM table_name_68 WHERE team = "derbyshire falcons" | sql_create_context |
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_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '81164300' AND qtb.MED_SER_ORG_NO = '3140285' AND qtb.IN_HOSP_DATE BETWEEN '2004-06-12' AND '2008-03-03' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = ... | css |
CREATE TABLE table_24322 (
"Draw" real,
"Song" text,
"Artist" text,
"Panel Points" real,
"Televotes" real,
"Televote Points" real,
"Score" real,
"Placing" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the artist for 1595 televotes
| SELECT "Artist" FROM table_24322 WHERE "Televotes" = '1595' | wikisql |
CREATE TABLE table_name_74 (
title VARCHAR,
doctor VARCHAR,
published VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title of the 8th doctor published in January 2003?
| SELECT title FROM table_name_74 WHERE doctor = "8th" AND published = "january 2003" | sql_create_context |
CREATE TABLE table_72477 (
"Locale" text,
"Skip" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot Pct." real
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT "PA" FROM table_72477 WHERE "PF" = '77' | wikisql |
CREATE TABLE table_name_26 (
rank VARCHAR,
nation VARCHAR,
total VARCHAR,
bronze VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which rank has a total less than 9, less than 2 bronze, and from France?
| SELECT rank FROM table_name_26 WHERE total < 9 AND bronze < 2 AND nation = "france" | sql_create_context |
CREATE TABLE table_name_80 (
branding VARCHAR,
owner VARCHAR,
frequency VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the branding of the FM 97.7 station owned by the Canadian Broadcasting Corporation?
| SELECT branding FROM table_name_80 WHERE owner = "canadian broadcasting corporation" AND frequency = "fm 97.7" | sql_create_context |
CREATE TABLE table_name_72 (
country VARCHAR,
to_par VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Country of the Player with a To par of 4?
| SELECT country FROM table_name_72 WHERE to_par = "–4" | 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 SHRGH, SHRXM FROM jybgb WHERE JZLSH = '03617073061' | css |
CREATE TABLE table_204_599 (
id number,
"party" text,
"first duma" text,
"second duma" text,
"third duma" text,
"fourth duma" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how long was the first duma on rigtists
| SELECT "first duma" FROM table_204_599 WHERE "party" = 'rightists' | squall |
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 (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND prescriptions.drug = "Amiodarone" | mimicsql_data |
CREATE TABLE table_name_15 (
draws VARCHAR,
wins VARCHAR,
byes VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the draws when wins are fwewer than 9 and byes fewer than 2?
| SELECT COUNT(draws) FROM table_name_15 WHERE wins < 9 AND byes < 2 | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospit... | SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-151182') AND NOT patient.unitdischargetime IS NULL ORDER BY pati... | eicu |
CREATE TABLE table_1602620_1 (
location VARCHAR,
term_ended VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location for the office whose term ended December 2, 1976
| SELECT location FROM table_1602620_1 WHERE term_ended = "December 2, 1976" | sql_create_context |
CREATE TABLE table_11656 (
"Series #" real,
"Season #" 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 was the original air date of a ... | SELECT "Original air date" FROM table_11656 WHERE "Series #" > '78' AND "Written by" = 'jenee v. giles' | wikisql |
CREATE TABLE table_73336 (
"Administrative division" text,
"Area (km\u00b2) 2005" text,
"Population 2010 Census" real,
"Population 2011 SIAK Database" text,
"Population density (/km\u00b2 2010)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is... | SELECT "Population density (/km\u00b2 2010)" FROM table_73336 WHERE "Population 2010 Census" = '264170' | wikisql |
CREATE TABLE table_44778 (
"1950" real,
"General 1950" text,
"Senate 1950" text,
"House 1950" text,
"Governors 1950" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What shows for House 1950 with a 1950 less than 1980, and Governors 1950 of governors... | SELECT "House 1950" FROM table_44778 WHERE "1950" < '1980' AND "Governors 1950" = 'governors 1970' | wikisql |
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE STUDENT (
STU_NUM... | SELECT CRS_CODE, COUNT(*) FROM CLASS GROUP BY CRS_CODE | nvbench |
CREATE TABLE trip (
start_station_id VARCHAR
)
CREATE TABLE station (
lat INTEGER,
long INTEGER,
id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average latitude and longitude of the starting points of all trips?
| SELECT AVG(T1.lat), AVG(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id | sql_create_context |
CREATE TABLE table_73589 (
"Year" real,
"Starts" real,
"Wins" real,
"Top 5" real,
"Top 10" real,
"Poles" real,
"Avg. Start" text,
"Avg. Finish" text,
"Winnings" text,
"Position" text,
"Team(s)" text
)
-- Using valid SQLite, answer the following questions for the tables prov... | SELECT "Position" FROM table_73589 WHERE "Year" = '1987' | wikisql |
CREATE TABLE table_8971 (
"Name" text,
"Seat" text,
"Population (2011)" real,
"Area (km 2 )" real,
"Density (inhabitants/km 2 )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest population (2011) for the community with an Area of 12... | SELECT MIN("Population (2011)") FROM table_8971 WHERE "Area (km 2 )" = '12,241' AND "Density (inhabitants/km 2 )" < '21.1' | 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 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.ethnicity = "WHITE - RUSSIAN" AND demographic.dob_year < "1846" | 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 AVG(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.dod_year < "2173.0" | mimicsql_data |
CREATE TABLE table_78923 (
"Opposing Teams" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the status when the against is 11?
| SELECT "Status" FROM table_78923 WHERE "Against" = '11' | wikisql |
CREATE TABLE table_30590 (
"Version" text,
"Release" text,
"Release date" text,
"End of maintenance" text,
"Requirement" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the release date in the 1.1.10 release?
| SELECT "Release date" FROM table_30590 WHERE "Release" = '1.1.10' | wikisql |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
... | SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31088 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND chartevents.itemid IN (... | mimic_iii |
CREATE TABLE table_51468 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many people came to the game at Victoria Par... | SELECT COUNT("Crowd") FROM table_51468 WHERE "Venue" = 'victoria park' | wikisql |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text... | SELECT Comments.Id AS "comment_link", Comments.Score, Comments.CreationDate AS CommentDate, Posts.CreationDate AS PostDate, DATEDIFF(day, Posts.CreationDate, CreationDate) AS Diff, Comments.Text FROM Comments JOIN Posts ON Comments.PostId = Posts.Id WHERE DATEDIFF(day, Posts.CreationDate, CreationDate) > 365 ORDER BY C... | sede |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT OUT_DIAG_DIS_CD, OUT_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '78487358' AND MED_SER_ORG_NO = '4050783' AND OUT_DIAG_DOC_NM LIKE '韦%' | css |
CREATE TABLE table_1342292_45 (
result VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In how many districts is the incumbent Dave E. Satterfield, Jr.
| SELECT COUNT(result) FROM table_1342292_45 WHERE incumbent = "Dave E. Satterfield, Jr." | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.