instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_48151 (
"Missouri vs." text,
"Overall Record" text,
"at Columbia" text,
"at Opponent's Venue" text,
"at Neutral Site" text,
"Last 5 Meetings" text,
"Last 10 Meetings" text,
"Current Streak" text,
"Since Joining SEC" text
)
-- Using valid SQLite, answer the follow... | SELECT "Last 5 Meetings" FROM table_48151 WHERE "at Opponent's Venue" = 'vu, 2-0' | wikisql |
CREATE TABLE table_203_486 (
id number,
"place" number,
"team" text,
"matches" number,
"won" number,
"drawn" number,
"lost" number,
"difference" text,
"points" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which country finished b... | SELECT "team" FROM table_203_486 WHERE "place" > (SELECT "place" FROM table_203_486 WHERE "team" = 'united states') ORDER BY "place" DESC LIMIT 1 | squall |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE cost (
row_id number,
... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'septicemia nos') A... | mimic_iii |
CREATE TABLE table_name_65 (
high_rebounds VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had the highest rebounds against detroit?
| SELECT high_rebounds FROM table_name_65 WHERE team = "detroit" | sql_create_context |
CREATE TABLE table_51410 (
"Year" real,
"Film" text,
"Role" text,
"Leading Man" text,
"Director" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What film has a leading man of adolphe menjou in 1939?
| SELECT "Film" FROM table_51410 WHERE "Leading Man" = 'adolphe menjou' AND "Year" = '1939' | wikisql |
CREATE TABLE table_train_140 (
"id" int,
"gender" string,
"mini_mental_state_examination_mmse" int,
"allergy_to_quinidine" bool,
"systolic_blood_pressure_sbp" int,
"postural_syncope" bool,
"hypotension" bool,
"unexplained_syncope" bool,
"allergy_to_dextromethorphan" bool,
"allerg... | SELECT * FROM table_train_140 WHERE alcohol_abuse = 1 OR drug_abuse = 1 | criteria2sql |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT Affiliation, SUM(Enrollment) FROM university WHERE Founded > 1850 GROUP BY Affiliation | nvbench |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
sc... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id WHERE (area.area LIKE '%History of American Popular Music%' OR course.description LIKE '%History of American Popular Music%' OR course.name LIKE '%History of American Popular Music%') AND cours... | advising |
CREATE TABLE Products (
product_id INTEGER,
parent_product_id INTEGER,
production_type_code VARCHAR(15),
unit_price DECIMAL(19,4),
product_name VARCHAR(80),
product_color VARCHAR(20),
product_size VARCHAR(20)
)
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id INTEGER,
... | SELECT other_account_details, COUNT(other_account_details) FROM Accounts GROUP BY other_account_details ORDER BY COUNT(other_account_details) DESC | nvbench |
CREATE TABLE table_203_138 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- where was the first friendly competition held ?
| SELECT "venue" FROM table_203_138 WHERE "competition" = 'friendly' ORDER BY "#" LIMIT 1 | squall |
CREATE TABLE table_16799784_7 (
diameter__km_ VARCHAR,
latitude VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the diameter (km) of feature of latitude 40.5s
| SELECT diameter__km_ FROM table_16799784_7 WHERE latitude = "40.5S" | sql_create_context |
CREATE TABLE table_name_77 (
location VARCHAR,
distance__km_ VARCHAR,
rapid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What location is less than 7.1 km away, and has a Rapid of ?
| SELECT location FROM table_name_77 WHERE distance__km_ < 7.1 AND rapid = "●" | sql_create_context |
CREATE TABLE table_204_60 (
id number,
"sl no" number,
"constituency\nname" text,
"constituency\nnumber" number,
"member of legislative assembly" text,
"political party" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- between tingkhong and sonari... | SELECT "constituency\nname" FROM table_204_60 WHERE "constituency\nname" IN ('tingkhong', 'sonari') ORDER BY "constituency\nnumber" DESC LIMIT 1 | squall |
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_co... | SELECT DISTINCT airline.airline_code FROM aircraft, airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE (aircraft.basic_type = 'DC10' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND e... | atis |
CREATE TABLE table_175442_1 (
common_name VARCHAR,
scientific_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the common name for furcifer pardalis
| SELECT common_name FROM table_175442_1 WHERE scientific_name = "Furcifer pardalis" | sql_create_context |
CREATE TABLE table_24796 (
"Pilot" text,
"Organization" text,
"Total Flights" real,
"USAF space flights" real,
"FAI space flights" real,
"Max Mach" text,
"Max speed (mph)" real,
"Max altitude (miles)" text
)
-- Using valid SQLite, answer the following questions for the tables provided ... | SELECT "Max Mach" FROM table_24796 WHERE "Max speed (mph)" = '3887' | 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.IN_HOSP_DAYS FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '33468513439' UNION SELECT fgwyjzb.IN_HOSP_DAYS FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '33468513439' | css |
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,... | SELECT p.Id, p.Title, COUNT(answers.Id) AS answerCount, p.Score, COUNT(answers.Id) - p.Score AS subtraction FROM Posts AS p INNER JOIN Posts AS answers ON p.Id = answers.ParentId WHERE p.PostTypeId = '1' GROUP BY p.Score, p.Id, p.Title ORDER BY subtraction DESC | sede |
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Private" AND lab.label = "Bilirubin, Indirect" | mimicsql_data |
CREATE TABLE table_12191 (
"Rank 2014" real,
"Rank 2013" text,
"2009\u201310" text,
"2010\u201311" text,
"2011\u201312" text,
"2012\u201313" text,
"2013\u201314" text,
"Coeff." text,
"Teams" text,
"CL places" real,
"EL places" real,
"Total" real
)
-- Using valid SQLite,... | SELECT "Coeff." FROM table_12191 WHERE "2009\u201310" = '6.166' | wikisql |
CREATE TABLE table_36881 (
"Source" text,
"Date" text,
"MARTIN" text,
"GR\u00dcNE" text,
"Others" text,
"Undecided" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Undecided on 2009-05-24?
| SELECT "Undecided" FROM table_36881 WHERE "Date" = '2009-05-24' | wikisql |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id 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 tex... | SELECT jybgb.SHRGH, jybgb.SHRXM FROM jybgb WHERE jybgb.JZLSH = '36953184780' | css |
CREATE TABLE table_1887 (
"Seq." text,
"Name" text,
"Background" real,
"Party Leadership" real,
"Communication Ability" real,
"Relations with Congress" real,
"Court Appointments" real,
"Handling of Economy" real,
"Luck" real,
"Ability to Compromise" real,
"Willing to take Ris... | SELECT MAX("Leadership Ability") FROM table_1887 WHERE "Overall Ability" = '32' | 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 demographic.admission_location FROM demographic WHERE demographic.name = "Edward Schafer" | mimicsql_data |
CREATE TABLE table_name_93 (
stage VARCHAR,
winner VARCHAR,
mountains_classification VARCHAR,
points_classification VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which stage has a mountains classification of Mariano Piccoli, a points classification ... | SELECT stage FROM table_name_93 WHERE mountains_classification = "mariano piccoli" AND points_classification = "mario cipollini" AND winner = "laudelino cubino" | sql_create_context |
CREATE TABLE fgwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '方忆秋' AND gwyjzb.MED_SER_ORG_NO = '1559785' AND gwyjzb.OUT_DIAG_DIS_NM LIKE '%肺病%' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '方忆秋' AND fgwyjzb.MED_SER_ORG_NO = '1559785' AND fgwyjzb.OUT_DIAG_DIS_NM LIKE '%肺病%' | css |
CREATE TABLE table_64404 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text,
"Arena" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Loss has a Record of 20 16 9?
| SELECT "Loss" FROM table_64404 WHERE "Record" = '20–16–9' | wikisql |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttim... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.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, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_i... | mimic_iii |
CREATE TABLE table_23110 (
"SP" text,
"Number" real,
"Horse" text,
"Age" real,
"Handicap (st-lb)" text,
"Jockey" text,
"Trainer" text,
"Owner" text,
"Colours" text,
"Finishing position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "Horse" FROM table_23110 WHERE "Owner" = 'R. A. Scott' | wikisql |
CREATE TABLE table_name_71 (
surface VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the surface for score of 7 6(4), 6 1
| SELECT surface FROM table_name_71 WHERE score = "7–6(4), 6–1" | sql_create_context |
CREATE TABLE table_name_40 (
to_par VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the to par when the score is 73-69-67-74=283?
| SELECT to_par FROM table_name_40 WHERE score = 73 - 69 - 67 - 74 = 283 | sql_create_context |
CREATE TABLE table_52728 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Total has a Gold smaller than 0?
| SELECT SUM("Total") FROM table_52728 WHERE "Gold" < '0' | wikisql |
CREATE TABLE table_21994729_3 (
written_by VARCHAR,
directed_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- reginald hudlin directed how many written by.
| SELECT written_by FROM table_21994729_3 WHERE directed_by = "Reginald Hudlin" | sql_create_context |
CREATE TABLE table_71623 (
"Rank" text,
"Region" text,
"Total GDP (\u20ac bn )" text,
"% growth" text,
"Per capita" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Region that has a growth of 3.6%?
| SELECT "Region" FROM table_71623 WHERE "% growth" = '−3.6' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE bdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
K... | SELECT wdmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '鲁秀筠' AND NOT wdmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2002-02-2... | css |
CREATE TABLE table_433 (
"Rnd" real,
"Circuit" text,
"CA Winning Team" text,
"GT1 Winning Team" text,
"GT2 Winning Team" text,
"GT3 Winning Team" text,
"Results" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the gt1 winning team for #5... | SELECT "GT1 Winning Team" FROM table_433 WHERE "GT2 Winning Team" = '#54 Bell Motorsports' | wikisql |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT ACC_Percent, All_Games_Percent FROM basketball_match GROUP BY ACC_Home | nvbench |
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "15" AND prescriptions.drug = "Niacin" | mimicsql_data |
CREATE TABLE table_204_741 (
id number,
"rank" number,
"name" text,
"nationality" text,
"1,62" text,
"1,67" text,
"1,72" text,
"1,75" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many different nationality 's are ... | SELECT COUNT(DISTINCT "nationality") FROM table_204_741 | squall |
CREATE TABLE table_name_22 (
player VARCHAR,
jersey_number_s_ INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the player with a Jersey Number(s) greater than 30?
| SELECT player FROM table_name_22 WHERE jersey_number_s_ > 30 | sql_create_context |
CREATE TABLE table_76309 (
"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 is the average Pick, when Name is 'Lybrant Robinson', and when Overall is less than... | SELECT AVG("Pick") FROM table_76309 WHERE "Name" = 'lybrant robinson' AND "Overall" < '139' | wikisql |
CREATE TABLE table_name_52 (
height__cm_ VARCHAR,
birthplace VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Height (cm) has a Birthplace of new canaan, connecticut?
| SELECT COUNT(height__cm_) FROM table_name_52 WHERE birthplace = "new canaan, connecticut" | sql_create_context |
CREATE TABLE table_name_54 (
horse VARCHAR,
finished VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Horse finished in 8?
| SELECT horse FROM table_name_54 WHERE finished = "8" | sql_create_context |
CREATE TABLE table_name_91 (
name VARCHAR,
year_named VARCHAR,
longitude VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What name in a year after 1997 has a longitude of 213.0e?
| SELECT name FROM table_name_91 WHERE year_named > 1997 AND longitude = "213.0e" | sql_create_context |
CREATE TABLE table_3982 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date did 'sympathy' originally a... | SELECT "Original air date" FROM table_3982 WHERE "Title" = 'Sympathy' | wikisql |
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
... | SELECT Nationality, SUM(ID) FROM swimmer GROUP BY Nationality ORDER BY Nationality | nvbench |
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 (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "82" AND prescriptions.formulary_drug_cd = "BACTSS" | mimicsql_data |
CREATE TABLE table_name_37 (
termination_of_mission VARCHAR,
title VARCHAR,
representative VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Termination of Mission with a Title of Ambassador Extraordinary and Plenipotentiary with a Representativ... | SELECT termination_of_mission FROM table_name_37 WHERE title = "ambassador extraordinary and plenipotentiary" AND representative = "reynold e. carlson" | sql_create_context |
CREATE TABLE table_51317 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the outcome on 6 october 2013
| SELECT "Outcome" FROM table_51317 WHERE "Date" = '6 october 2013' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "64" AND demographic.days_stay > "11" | mimicsql_data |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0... | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY HIRE_DATE DESC | nvbench |
CREATE TABLE table_39235 (
"Nation" text,
"T Score" real,
"A Score" real,
"E Score" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total of Poland, which has an E score greater than 7.725?
| SELECT COUNT("Total") FROM table_39235 WHERE "Nation" = 'poland' AND "E Score" > '7.725' | wikisql |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE icust... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT procedures_icd.icd9_code FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14203) AND DATETIME(procedures_icd.charttime) >= DATETIME(CURRENT_TI... | mimic_iii |
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "WARF1" AND lab.fluid = "Pleural" | mimicsql_data |
CREATE TABLE table_60605 (
"Host city" text,
"Year" real,
"Winner" text,
"1st runner up" text,
"2nd runner up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the 2nd runner up in istanbul after 1994 when veronica laskaeva was the 1st runner ... | SELECT "2nd runner up" FROM table_60605 WHERE "Year" > '1994' AND "Host city" = 'istanbul' AND "1st runner up" = 'veronica laskaeva' | wikisql |
CREATE TABLE table_76973 (
"Result" text,
"Race" text,
"Distance" text,
"Weight" real,
"Winner or 2nd" text,
"Pos'n" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest weight wth a Result of , and a Distance of 7f?
| SELECT MAX("Weight") FROM table_76973 WHERE "Result" = '–' AND "Distance" = '7f' | wikisql |
CREATE TABLE table_name_56 (
score VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Fuzzy Zoeller's Score?
| SELECT score FROM table_name_56 WHERE player = "fuzzy zoeller" | sql_create_context |
CREATE TABLE table_15579 (
"Transmitter Site" text,
"Frequency" text,
"Power" text,
"RDS Name" text,
"PI Code" text,
"Area" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the PI code in the hindhead area?
| SELECT "PI Code" FROM table_15579 WHERE "Area" = 'hindhead' | wikisql |
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,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH te... | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjl... | css |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age te... | SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-5915')) AND STRFTIME('%y-%m', medication.drugstarttime) <= '2105-07' | eicu |
CREATE TABLE table_33157 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the competition on 23 November 2003?
| SELECT "Score" FROM table_33157 WHERE "Date" = '23 november 2003' | wikisql |
CREATE TABLE table_12346 (
"Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Winning constructor" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What day was the circuit Isle of Man?
| SELECT "Date" FROM table_12346 WHERE "Circuit" = 'isle of man' | wikisql |
CREATE TABLE table_name_20 (
plural_word VARCHAR,
singular_word VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The singular word of hand uses what plural word?
| SELECT plural_word FROM table_name_20 WHERE singular_word = "hand" | sql_create_context |
CREATE TABLE table_6379 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score on a clay surface on May 29, 2006?
| SELECT "Score" FROM table_6379 WHERE "Surface" = 'clay' AND "Date" = 'may 29, 2006' | wikisql |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varcha... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((date_day.day_number = 7 AND date_day.month_number = 7 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time ... | atis |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TA... | SELECT Ans.Id AS "post_link", * FROM Posts AS Ans INNER JOIN (SELECT ParentId, MAX(Score) AS Score FROM Posts GROUP BY ParentId) AS Highest ON Ans.ParentId = Highest.ParentId INNER JOIN Posts AS Parent ON Ans.ParentId = Parent.ParentId WHERE Ans.Id = Parent.AcceptedAnswerId AND Ans.Score <= Highest.Score AND Parent.Cre... | sede |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%belgium%' OR UPPER(Location) LIKE '%IND' ORDER BY Reputation DESC LIMIT 200 | sede |
CREATE TABLE table_48091 (
"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.
-- Which Round has an Opponent of jorge magalhaes?
| SELECT AVG("Round") FROM table_48091 WHERE "Opponent" = 'jorge magalhaes' | wikisql |
CREATE TABLE table_4306 (
"Sport" text,
"Years" text,
"Games" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the total number of bronze for silver being 0 and sport of wrestlin... | SELECT COUNT("Bronze") FROM table_4306 WHERE "Silver" = '0' AND "Sport" = 'wrestling' AND "Total" > '3' | wikisql |
CREATE TABLE table_47447 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Country has a Year(s) won of 1977?
| SELECT "Country" FROM table_47447 WHERE "Year(s) won" = '1977' | wikisql |
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "41031" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE table_18810 (
"Specification" text,
"Gender" text,
"Junior High School (12\u201315 yrs)" text,
"Senior High School (15\u201318 yrs)" text,
"University students and Adults (18yrs+)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is ... | SELECT "Gender" FROM table_18810 WHERE "Junior High School (12\u201315 yrs)" = '24mm' | wikisql |
CREATE TABLE browser (
id int,
name text,
market_share real
)
CREATE TABLE accelerator_compatible_browser (
accelerator_id int,
browser_id int,
compatible_since_year int
)
CREATE TABLE Web_client_accelerator (
id int,
name text,
Operating_system text,
Client text,
Connectio... | SELECT name, id FROM Web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id | nvbench |
CREATE TABLE table_204_232 (
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.
-- what 's the number of silver medals did chile win ?
| SELECT "silver" FROM table_204_232 WHERE "nation" = 'chile' | squall |
CREATE TABLE mzb (
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_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.MED_SER_ORG_NO = '2687252' AND qtb.MED_ORG_DEPT_NM = '小儿神经内科' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.MED_SER_ORG_NO = '2687252' AND gyb.MED_ORG_DEPT_NM = '小儿神经内科' UNION SELECT zyb.MED_CLINIC_ID... | css |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
... | SELECT JOB_TITLE, COUNT(JOB_TITLE) FROM employees AS T1 JOIN jobs AS T2 ON T1.JOB_ID = T2.JOB_ID WHERE T1.DEPARTMENT_ID = 80 GROUP BY JOB_TITLE ORDER BY COUNT(JOB_TITLE) DESC | nvbench |
CREATE TABLE table_51277 (
"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 is the sum of Crowd when the away team scor... | SELECT SUM("Crowd") FROM table_51277 WHERE "Away team score" = '8.12 (60)' | wikisql |
CREATE TABLE table_23537 (
"Year" text,
"Winner" text,
"First Runner Up" text,
"Third Place" text,
"Consolation Winner/4th" text,
"Finals Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the first runner up in the year when Mesa ... | SELECT "First Runner Up" FROM table_23537 WHERE "Consolation Winner/4th" = 'Mesa Mesa AZ' | 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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "MESENTERIC ISCHEMIA" AND demographic.dod_year <= "2138.0" | mimicsql_data |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,... | SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '031-23724' AND DATETIME(patient.hospitaladmittime) >= DATETIME(CURRENT_TIME(), '-5 year') ORDER BY patient.hospitaladmittime DESC LIMIT 1 | eicu |
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_ID = '59190525' AND t_kc22.STA_DATE BETWEEN '2003-08-11' AND '2014-07-07' AND t_kc22.t_kc21_MED_SER_ORG_NO = '2322054' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' | css |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPriv... | SELECT Reputation, DisplayName FROM Users WHERE NOT DisplayName LIKE '%,%' | sede |
CREATE TABLE table_204_124 (
id number,
"no." number,
"name" text,
"public access" number,
"location & map links" text,
"area\nha" number,
"area\nacres" number,
"references" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which woods has ... | SELECT "name" FROM table_204_124 WHERE "name" <> 'hardwick wood' AND "area\nacres" = (SELECT "area\nacres" FROM table_204_124 WHERE "name" = 'hardwick wood') | squall |
CREATE TABLE table_2618152_1 (
written_by VARCHAR,
original_air_date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The episode with original air date January 13, 1999 is written by who?
| SELECT written_by FROM table_2618152_1 WHERE original_air_date = "January 13, 1999" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM t... | SELECT COUNT(*) FROM mzjzjlb WHERE ZZYSGH = '83321772' AND JZKSRQ BETWEEN '2001-10-05' AND '2003-01-20' | css |
CREATE TABLE table_76136 (
"Rank" real,
"Name" text,
"Years" text,
"Matches" real,
"Goals" real,
"Goals/Matches" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What average goals have matches less than 228?
| SELECT AVG("Goals") FROM table_76136 WHERE "Matches" < '228' | wikisql |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT All_Games, School_ID FROM basketball_match ORDER BY School_ID DESC | nvbench |
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 flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_... | SELECT DISTINCT flight_id FROM flight WHERE (((((((arrival_time < 41 OR time_elapsed >= 60) AND departure_time > arrival_time) AND flight_days IN (SELECT DAYSalias1.days_code FROM days AS DAYSalias1 WHERE DAYSalias1.day_name IN (SELECT DATE_DAYalias1.day_name FROM date_day AS DATE_DAYalias1 WHERE DATE_DAYalias1.day_num... | atis |
CREATE TABLE table_1350350_2 (
place VARCHAR,
per_capita_income VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the the place with per capita income being $14,793
| SELECT place FROM table_1350350_2 WHERE per_capita_income = "$14,793" | sql_create_context |
CREATE TABLE table_name_79 (
listed VARCHAR,
county VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the historic place listed that's in canyon county?
| SELECT listed FROM table_name_79 WHERE county = "canyon" | sql_create_context |
CREATE TABLE table_24998088_1 (
points VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points did he have when he has in the 34th position?
| SELECT points FROM table_24998088_1 WHERE position = "34th" | sql_create_context |
CREATE TABLE table_13424 (
"Date" text,
"Tournament" text,
"Winning Score" text,
"Margin of Victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who were the runner(s)-up with a winning score of -7 (67-72-70=209)?
| SELECT "Runner(s)-up" FROM table_13424 WHERE "Winning Score" = '-7 (67-72-70=209)' | wikisql |
CREATE TABLE table_name_59 (
date VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What day does the team play at western oval?
| SELECT date FROM table_name_59 WHERE venue = "western oval" | sql_create_context |
CREATE TABLE table_35309 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Date has a Winning score of 9 (70-64-70=203)?
| SELECT "Date" FROM table_35309 WHERE "Winning score" = '−9 (70-64-70=203)' | wikisql |
CREATE TABLE table_16112 (
"Season" text,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" real,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the to... | SELECT COUNT("Poles") FROM table_16112 WHERE "Team" = 'Arden International' | wikisql |
CREATE TABLE table_45115 (
"Date(s) conducted" text,
"Polling organisation/client" text,
"Conservatives" text,
"Labour" text,
"Liberal Democrats" text,
"Others" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the others had a value of 7%, wh... | SELECT "Polling organisation/client" FROM table_45115 WHERE "Others" = '7%' | wikisql |
CREATE TABLE table_1013129_1 (
position VARCHAR,
nhl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What positions do the hartford whalers nhl team have?
| SELECT position FROM table_1013129_1 WHERE nhl_team = "Hartford Whalers" | sql_create_context |
CREATE TABLE table_204_197 (
id number,
"date" text,
"time" text,
"opponent#" text,
"site" text,
"tv" text,
"result" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the date of the first game played ?
| SELECT "date" FROM table_204_197 ORDER BY "date" LIMIT 1 | squall |
CREATE TABLE table_name_39 (
total VARCHAR,
years VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the total for the year of 1925?
| SELECT total FROM table_name_39 WHERE years = "1925" | sql_create_context |
CREATE TABLE membership_register_branch (
member_id number,
branch_id text,
register_year text
)
CREATE TABLE branch (
branch_id number,
name text,
open_year text,
address_road text,
city text,
membership_amount text
)
CREATE TABLE purchase (
member_id number,
branch_id tex... | SELECT T2.name, T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year = 2016 GROUP BY T2.branch_id ORDER BY COUNT(*) DESC LIMIT 1 | spider |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.