instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_61726 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Week has Attendance of 51,558?
| SELECT MIN("Week") FROM table_61726 WHERE "Attendance" = '51,558' | wikisql |
CREATE TABLE railway (
Railway_ID int,
Railway text,
Builder text,
Built text,
Wheels text,
Location text,
ObjectNumber text
)
CREATE TABLE manager (
Manager_ID int,
Name text,
Country text,
Working_year_starts text,
Age int,
Level int
)
CREATE TABLE railway_manage ... | SELECT Builder, COUNT(*) FROM railway GROUP BY Builder ORDER BY Builder | nvbench |
CREATE TABLE table_63358 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average rank for 57.05 time?
| SELECT AVG("Rank") FROM table_63358 WHERE "Time" < '57.05' | wikisql |
CREATE TABLE table_name_29 (
score VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Score, when Attendance is 3,416?
| SELECT score FROM table_name_29 WHERE attendance = "3,416" | sql_create_context |
CREATE TABLE table_76004 (
"Rank" real,
"Republic" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average total for teams with more than 1 gold, ranked over 3 and more than 3 b... | SELECT AVG("Total") FROM table_76004 WHERE "Gold" > '1' AND "Rank" > '3' AND "Bronze" > '3' | wikisql |
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
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,
meter_700 text,
Time text
)
CREATE... | SELECT meter_200, SUM(ID) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 | nvbench |
CREATE TABLE region (
Region_id int,
Region_code text,
Region_name text
)
CREATE TABLE storm (
Storm_ID int,
Name text,
Dates_active text,
Max_speed int,
Damage_millions_USD real,
Number_Deaths int
)
CREATE TABLE affected_region (
Region_id int,
Storm_ID int,
Number_cit... | SELECT Region_name, COUNT(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.Region_id = T2.Region_id GROUP BY T1.Region_id | nvbench |
CREATE TABLE table_18354 (
"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.
-- List all candidates in elections where the incumbent politician is Goodl... | SELECT "Candidates" FROM table_18354 WHERE "Incumbent" = 'Goodloe Byron' | wikisql |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT Headquarter, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY AVG(Price) DESC | nvbench |
CREATE TABLE table_58636 (
"Year" real,
"Binibining Pilipinas-Universe" text,
"Binibining Pilipinas-International" text,
"Miss Maja Pilipinas" text,
"First runner-up" text,
"Second runner-up" text,
"Third runner-up" text,
"Fourth runner-up" text
)
-- Using valid SQLite, answer the foll... | SELECT "Third runner-up" FROM table_58636 WHERE "Year" = '1969' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "DEAD/EXPIRED" AND procedures.icd9_code = "3722" | mimicsql_data |
CREATE TABLE table_24257833_4 (
webkit_version VARCHAR,
major_version VARCHAR,
minor_version VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List all webkit versions when the major version was Safari 3, and the minor version was 3.1.2.
| SELECT webkit_version FROM table_24257833_4 WHERE major_version = "Safari 3" AND minor_version = "3.1.2" | sql_create_context |
CREATE TABLE table_18202 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Status" text,
"Opponent" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's Georgia5's first elected year?
| SELECT MAX("First elected") FROM table_18202 WHERE "District" = 'Georgia5' | wikisql |
CREATE TABLE table_name_21 (
result VARCHAR,
streak VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the result with streak of won 6?
| SELECT result FROM table_name_21 WHERE streak = "won 6" | sql_create_context |
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE flight_fare ... | 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 (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND date_day.day_number = 26 AND date_day.month_number = 7 AND da... | atis |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CRE... | SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-19271')) AND microlab.culturesite = 'urine, voided specimen' AND DATETIME(... | eicu |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN program_course WHERE ((course.number < 400 + 100 AND course.number >= 400) OR (course.number < 500 + 100 AND course.number >= 500)) AND course.department = 'GREEKMOD' AND program_course.workload = (SELECT MIN(P... | advising |
CREATE TABLE table_2181798_1 (
wins VARCHAR,
starts VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of wins for 30 starts
| SELECT COUNT(wins) FROM table_2181798_1 WHERE starts = 30 | sql_create_context |
CREATE TABLE table_26733129_1 (
three_darts_challenge VARCHAR,
air_date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was in the three darts challenge that aired on 10 may 2010?
| SELECT three_darts_challenge FROM table_26733129_1 WHERE air_date = "10 May 2010" | sql_create_context |
CREATE TABLE table_name_57 (
competition VARCHAR,
position VARCHAR,
notes VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Competition was 1st Position with 57.03 in Notes?
| SELECT competition FROM table_name_57 WHERE position = "1st" AND notes = "57.03" | sql_create_context |
CREATE TABLE table_24115349_6 (
turnout__percentage VARCHAR,
brown__percentage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the turnout percentage in the place that had 44.6% vote for brown?
| SELECT turnout__percentage FROM table_24115349_6 WHERE brown__percentage = "44.6%" | sql_create_context |
CREATE TABLE table_1140099_6 (
report VARCHAR,
winning_driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the report for the race that Mike Spence won.
| SELECT report FROM table_1140099_6 WHERE winning_driver = "Mike Spence" | sql_create_context |
CREATE TABLE table_name_9 (
fastest_laps INTEGER,
podiums VARCHAR,
poles VARCHAR,
races VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest number of the fastest laps when there were 0 poles, more than 2 podiums, and more than 15 races... | SELECT MAX(fastest_laps) FROM table_name_9 WHERE poles = 0 AND races > 15 AND podiums > 2 | sql_create_context |
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
mean_dew_point_f INTEGER,
min_dew_point_f INTEGER,
max_humidity INTEGER,
mean_humidity INTEGER,
min_humidity INTEGER,
max_sea_level_pre... | SELECT name, id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12 ORDER BY id DESC | nvbench |
CREATE TABLE table_21709 (
"Class" text,
"Part 1" text,
"Part 2" text,
"Part 3" text,
"Part 4" text,
"Verb meaning" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the part 3 of the verb whose class is 4?
| SELECT "Part 3" FROM table_21709 WHERE "Class" = '4' | wikisql |
CREATE TABLE table_name_5 (
losses VARCHAR,
no_result INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of losses with number result less than 0
| SELECT COUNT(losses) FROM table_name_5 WHERE no_result < 0 | sql_create_context |
CREATE TABLE table_name_97 (
sitalsasthi_carnival VARCHAR,
kosal VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sitalsasthi carnival with sonepur as kosal?
| SELECT sitalsasthi_carnival FROM table_name_97 WHERE kosal = "sonepur" | sql_create_context |
CREATE TABLE table_dev_49 (
"id" int,
"gender" string,
"systolic_blood_pressure_sbp" int,
"renal_disease" bool,
"diastolic_blood_pressure_dbp" int,
"high_density_lipoprotein_cholesterol_hdl_c" int,
"serum_creatinine" float,
"waist_circumference" int,
"triglyceride_tg" float,
"hyp... | SELECT * FROM table_dev_49 WHERE hypertension = 1 OR systolic_blood_pressure_sbp > 160 OR diastolic_blood_pressure_dbp > 95 | criteria2sql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.label = "Polys" | mimicsql_data |
CREATE TABLE table_12755786_8 (
league INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the least amount in the tournament?
| SELECT MIN(league) AS Cup FROM table_12755786_8 | sql_create_context |
CREATE TABLE table_237757_9 (
nasl_years VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What years did Bobby Moore play?
| SELECT nasl_years FROM table_237757_9 WHERE player = "Bobby Moore" | sql_create_context |
CREATE TABLE table_27571406_1 (
f_laps VARCHAR,
podiums VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the f/laps count for the team with 8 podiums?
| SELECT f_laps FROM table_27571406_1 WHERE podiums = 8 | sql_create_context |
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 WHERE demographic.admission_type = "NEWBORN" AND demographic.days_stay > "8" | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.dob_year < "2031" | mimicsql_data |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '曹和光' AND t_kc22.STA_DATE BETWEEN '2001-03-24' AND '2009-09-17' AND t_kc22.SOC_SRT_DIRE_CD = '331112449-3' | css |
CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int
)
CREATE TABLE exhibition_record (
Exhibition_ID int,
Date text,
Attendance int
)
CREATE TABLE exhibition (
Exhibition_ID int,
Year int,
Theme text,
Artist_ID int,
Ticket_Price real... | SELECT Name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.Artist_ID = T2.Artist_ID GROUP BY T1.Artist_ID | nvbench |
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 AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_AGE >= 25) | css |
CREATE TABLE table_9939 (
"Tournament" text,
"Surface" text,
"Week" text,
"Winner" text,
"Finalist" text,
"Semifinalists" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Tournament, on the Week of May 5?
| SELECT "Tournament" FROM table_9939 WHERE "Week" = 'may 5' | wikisql |
CREATE TABLE table_69709 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- for milan and the iata of lin what is the airport?
| SELECT "Airport" FROM table_69709 WHERE "City" = 'milan' AND "IATA" = 'lin' | wikisql |
CREATE TABLE table_name_88 (
team_classification VARCHAR,
general_classification VARCHAR,
mountains_classification VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Team classification has a General classification of Vladimir Karpets and a Mountains c... | SELECT team_classification FROM table_name_88 WHERE general_classification = "vladimir karpets" AND mountains_classification = "no award" | sql_create_context |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
... | 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 (((flight.departure_time BETWEEN 0 AND 1200) AND date_day.day_number = 20 AND date_day.month_number = 9 AND date_day.year = 1991 AND days.day_nam... | atis |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE (LOWER(Location) LIKE ('%indonesia%')) AND NOT (LOWER(Location) LIKE '%bali%') AND LENGTH(Location) > 1 ORDER BY Location LIMIT 100 | sede |
CREATE TABLE table_24094 (
"Episode" text,
"Broadcast date" text,
"Run time" text,
"Viewers (in millions)" text,
"Archive" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total episode for runtime of 24:11
| SELECT COUNT("Episode") FROM table_24094 WHERE "Run time" = '24:11' | wikisql |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT SOC_SRT_DIRE_NM, EACH_DOSAGE, USE_FRE FROM t_kc22 WHERE MED_CLINIC_ID = '50417387220' | css |
CREATE TABLE table_26069 (
"Period" text,
"Live births per year" text,
"Deaths per year" text,
"Natural change per year" text,
"CBR*" text,
"CDR*" text,
"NC*" text,
"TFR*" text,
"IMR*" real,
"Life expectancy total" text,
"Life expectancy males" text,
"Life expectancy fema... | SELECT "IMR*" FROM table_26069 WHERE "TFR*" = '4.31' | wikisql |
CREATE TABLE table_20228 (
"Date" text,
"Cover model" text,
"Centerfold model" text,
"Interview subject" text,
"20 Questions" text,
"Pictorials" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many centerfold models were there when the cover ... | SELECT COUNT("Centerfold model") FROM table_20228 WHERE "Cover model" = 'Torrie Wilson' | wikisql |
CREATE TABLE table_name_40 (
opened INTEGER,
line_name VARCHAR,
last_extension VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average opened year of line e, which had their last extension before 2003?
| SELECT AVG(opened) FROM table_name_40 WHERE line_name = "line e" AND last_extension < 2003 | sql_create_context |
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 locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(... | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(EMPLOYEE_ID) DESC | nvbench |
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 MIN(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.days_stay = "30" | mimicsql_data |
CREATE TABLE table_66596 (
"Name" text,
"Labour" real,
"Conservative" real,
"Political party" text,
"Electorate" real,
"Constituency" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest electorate for the Conservative party in So... | SELECT MIN("Electorate") FROM table_66596 WHERE "Political party" = 'conservative' AND "Constituency" = 'south west devon' AND "Conservative" > '2' AND "Name" = 'plymstock radford' | wikisql |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
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 cos... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 20 AND 29) GROUP BY labevents.itemid) AS ... | mimic_iii |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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,... | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY AVG(SALARY) | nvbench |
CREATE TABLE table_name_62 (
date VARCHAR,
runner_s__up VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what Date was Patty Sheehan Runner(s)-up?
| SELECT date FROM table_name_62 WHERE runner_s__up = "patty sheehan" | sql_create_context |
CREATE TABLE table_69816 (
"Country" text,
"Chart" text,
"Period" text,
"Peak position" text,
"Sales" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the sales with peak position of #24
| SELECT "Sales" FROM table_69816 WHERE "Peak position" = '#24' | wikisql |
CREATE TABLE table_59147 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Surface of the match against Yaroslava Shved... | SELECT "Surface" FROM table_59147 WHERE "Opponent in the final" = 'yaroslava shvedova' | wikisql |
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 jybgb.SQRGH, jybgb.SQRXM FROM jybgb WHERE jybgb.BGDH = '38029039376' | css |
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 diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'simp exc ly... | mimic_iii |
CREATE TABLE Ref_locations (
location_name VARCHAR,
location_code VARCHAR
)
CREATE TABLE Document_locations (
location_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show the location name and code with the least documents.
| SELECT T2.location_name, T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code ORDER BY COUNT(*) LIMIT 1 | sql_create_context |
CREATE TABLE table_name_24 (
game INTEGER,
march VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- March of 26 has what lowest game?
| SELECT MIN(game) FROM table_name_24 WHERE march = 26 | sql_create_context |
CREATE TABLE table_train_271 (
"id" int,
"renal_disease" bool,
"hepatic_disease" bool,
"smoking" bool,
"coronary_artery_disease_cad" bool,
"serum_creatinine" float,
"body_mass_index_bmi" float,
"myocardial_infarction" bool,
"NOUSE" float
)
-- Using valid SQLite, answer the followin... | SELECT * FROM table_train_271 WHERE renal_disease = 1 OR serum_creatinine > 1.5 | criteria2sql |
CREATE TABLE table_name_84 (
place VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What place did player mark brooks take?
| SELECT place FROM table_name_84 WHERE player = "mark brooks" | sql_create_context |
CREATE TABLE table_name_25 (
wins INTEGER,
scored VARCHAR,
conceded VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of wins when scored was less than 26, and conceded was larger than 23?
| SELECT SUM(wins) FROM table_name_25 WHERE scored < 26 AND conceded > 23 | sql_create_context |
CREATE TABLE table_57054 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Visitor played on January 17?
| SELECT "Visitor" FROM table_57054 WHERE "Date" = 'january 17' | wikisql |
CREATE TABLE table_28859177_2 (
directed_by VARCHAR,
original_air_date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who directed the episode that aired November 21, 2003?
| SELECT directed_by FROM table_28859177_2 WHERE original_air_date = "November 21, 2003" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text,
person_info_CSD text,
person_info_CSRQ time,
person_info_GJDM text,
person_info_GJMC text,
person_info_JGDM text,
person_info_JGMC text,
person_info_MZDM text,
person_info_MZMC text,
person_info_XBDM ... | SELECT * FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.person_info_XM = '章雅柔' AND hz_info.YLJGDM = '0809864' AND zyjzjlb.CYKSMC LIKE '%肝胆科%' | css |
CREATE TABLE classroom (
building text,
room_number text,
capacity number
)
CREATE TABLE department (
dept_name text,
building text,
budget number
)
CREATE TABLE section (
course_id text,
sec_id text,
semester text,
year number,
building text,
room_number text,
time... | SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History' | spider |
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | SELECT YEAR(Date), SUM(CASE WHEN Name = 'Scholar' THEN 1 ELSE 0 END) AS Scholars, SUM(CASE WHEN Name = 'Tumbleweed' THEN 1 ELSE 0 END) AS Tumbleweeds, SUM(CASE WHEN Name = 'Lifejacket' THEN 1 ELSE 0 END) AS LJ, SUM(CASE WHEN Name = 'Lifeboat' THEN 1 ELSE 0 END) AS LB FROM Badges WHERE YEAR(Date) < YEAR(CURRENT_TIMESTAM... | sede |
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Course (
CID VARCHAR(7),
CName VARCHAR(40),
Credits INTEGER,
Instructor INTEGER,
Days VARCHAR(... | SELECT Credits, Instructor FROM Course ORDER BY Credits | nvbench |
CREATE TABLE table_53037 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was South Melbourne's score as the away tea... | SELECT "Away team score" FROM table_53037 WHERE "Away team" = 'south melbourne' | wikisql |
CREATE TABLE table_train_260 (
"id" int,
"leukocyte_deficiencies" bool,
"bleeding" int,
"hemoglobin_a1c_hba1c" float,
"leukocyte_dysfunction" bool,
"renal_disease" bool,
"hba1c" float,
"serum_creatinine" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions f... | SELECT * FROM table_train_260 WHERE renal_disease = 1 | criteria2sql |
CREATE TABLE table_28723146_2 (
category_wise VARCHAR,
multi_lane VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every category wise when the multi lane is 677?
| SELECT category_wise FROM table_28723146_2 WHERE multi_lane = 677 | sql_create_context |
CREATE TABLE table_19948664_1 (
world_ranking__1_ VARCHAR,
author___editor___source VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the wold ranking of the index by Transparency International?
| SELECT world_ranking__1_ FROM table_19948664_1 WHERE author___editor___source = "Transparency International" | sql_create_context |
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate re... | SELECT Sex, AVG(Weight) FROM people GROUP BY Sex ORDER BY AVG(Weight) DESC | nvbench |
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_AMOUT FROM qtb WHERE qtb.MED_CLINIC_ID = '88534904844' UNION SELECT gyb.MED_AMOUT FROM gyb WHERE gyb.MED_CLINIC_ID = '88534904844' UNION SELECT zyb.MED_AMOUT FROM zyb WHERE zyb.MED_CLINIC_ID = '88534904844' UNION SELECT mzb.MED_AMOUT FROM mzb WHERE mzb.MED_CLINIC_ID = '88534904844' | css |
CREATE TABLE table_1529260_2 (
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest year listed?
| SELECT MIN(year) FROM table_1529260_2 | sql_create_context |
CREATE TABLE table_58540 (
"Candidate" text,
"Party" text,
"Votes #" real,
"Votes %" text,
"Ballots %" text,
"Elected" text,
"Appointed" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the vote % for Cliff Breitkreuz?
| SELECT "Votes %" FROM table_58540 WHERE "Candidate" = 'cliff breitkreuz' | wikisql |
CREATE TABLE table_191105_4 (
music_by VARCHAR,
episode_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the music by for episode the Elbow Room?
| SELECT music_by FROM table_191105_4 WHERE episode_title = "Elbow Room" | sql_create_context |
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 WHERE demographic.language = "ENGL" AND demographic.dob_year < "2111" | mimicsql_data |
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 * FROM hz_info JOIN zyjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND person_info_hz_i... | css |
CREATE TABLE table_name_82 (
classification VARCHAR,
dennis_kucinich VARCHAR,
_percentage_of_all VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Classification, when Dennis Kucinich is '3%', and when % of All is '53%'?
| SELECT classification FROM table_name_82 WHERE dennis_kucinich = "3%" AND _percentage_of_all = "53%" | sql_create_context |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT demographic.days_stay FROM demographic WHERE demographic.name = "Stephanie Suchan" | mimicsql_data |
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,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | 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 <= '2006-07-0... | css |
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 patient (
uniquep... | SELECT COUNT(*) FROM medication WHERE medication.drugname = 'assess pneumococcal vaccine' AND STRFTIME('%y', medication.drugstarttime) <= '2104' | eicu |
CREATE TABLE table_13595 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the to par of player hunter mahan?
| SELECT "To par" FROM table_13595 WHERE "Player" = 'hunter mahan' | wikisql |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE... | SELECT 'text' FROM SuggestedEdits WHERE Id = (SELECT SuggestedEditId FROM ReviewTasks WHERE Id = '##SuggestedEditId##') | sede |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_typ... | SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11779) AND prescriptions.drug = 'ibuprofen' AND STRFTIME('%y', prescriptions.startdate) = '2104' | mimic_iii |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
... | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '姜承运' AND t_kc22.STA_DATE BETWEEN '2008-03-30' AND '2021-02-01' AND t_kc22.SOC_SRT_DIRE_CD = '4940' | css |
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 demographic.insurance, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "17595" | mimicsql_data |
CREATE TABLE table_203_281 (
id number,
"season" number,
"pitcher" text,
"decision" text,
"final\nscore" text,
"opponent" text,
"location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who was the first astro to be the opening day pitcher i... | SELECT "pitcher" FROM table_203_281 WHERE "location" = 'astrodome' ORDER BY "season" LIMIT 1 | squall |
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE Apartment_Bookings (
apt_bookin... | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = "Female" ORDER BY COUNT(booking_start_date) DESC | nvbench |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T2.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC | nvbench |
CREATE TABLE table_79472 (
"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 opposing team in the game attended by 65,554?
| SELECT "Opponent" FROM table_79472 WHERE "Attendance" = '65,554' | wikisql |
CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Dorm_amenity (
ameni... | SELECT dorm_name, COUNT(*) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.Age > 20 GROUP BY T3.dorm_name | nvbench |
CREATE TABLE table_name_68 (
engine VARCHAR,
year VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the engine used before 1996 with 5 points?
| SELECT engine FROM table_name_68 WHERE year < 1996 AND points = 5 | sql_create_context |
CREATE TABLE table_name_42 (
comp VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the comp for the year 1989?
| SELECT comp FROM table_name_42 WHERE year = "1989" | sql_create_context |
CREATE TABLE table_name_13 (
main_cast_seasons VARCHAR,
portrayed_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which main cast seasons were portrayed by Joe Jonas?
| SELECT main_cast_seasons FROM table_name_13 WHERE portrayed_by = "joe jonas" | sql_create_context |
CREATE TABLE table_name_44 (
issue_price VARCHAR,
theme VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the issue price for the Trumpeter Swan set?
| SELECT issue_price FROM table_name_44 WHERE theme = "trumpeter swan" | sql_create_context |
CREATE TABLE table_41664 (
"20 years" text,
"2400 kWh/kW p y" real,
"2200 kWh/kW p y" real,
"2000 kWh/kW p y" real,
"1800 kWh/kW p y" real,
"1600 kWh/kW p y" real,
"1400 kWh/kW p y" real,
"1200 kWh/kW p y" real,
"1000 kWh/kW p y" real,
"800 kWh/kW p y" real
)
-- Using valid SQL... | SELECT AVG("800 kWh/kW p y") FROM table_41664 WHERE "1600 kWh/kW p y" < '6.3' AND "2000 kWh/kW p y" < '1' | wikisql |
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),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
... | SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID DESC | nvbench |
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 COUNT(t_kc21.MED_SER_ORG_NO) FROM t_kc21 WHERE t_kc21.PERSON_NM = '秦君浩' AND t_kc21.IN_HOSP_DATE BETWEEN '2000-09-01' AND '2016-09-21' | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.