instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_4357 (
"Date" text,
"Tournament" text,
"Location" text,
"Score" text,
"Honduras scorers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What tournament took place on October 11, 2013?
| SELECT "Tournament" FROM table_4357 WHERE "Date" = 'october 11, 2013' | wikisql |
CREATE TABLE table_24919137_2 (
ladder_position VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the ladder position when the score was 15.9 (99) 14.6 (90)?
| SELECT ladder_position FROM table_24919137_2 WHERE score = "15.9 (99)–14.6 (90)" | sql_create_context |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE patients (
row_id number,
subject_id number,
... | SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20801)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'che... | mimic_iii |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABL... | 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 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissi... | mimic_iii |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL v... | SELECT JOB_ID, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMPLOYEE_ID DESC | nvbench |
CREATE TABLE table_name_82 (
venue VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the venue on 14 november 1998?
| SELECT venue FROM table_name_82 WHERE date = "14 november 1998" | sql_create_context |
CREATE TABLE table_203_737 (
id number,
"#" number,
"employer" text,
"# of employees" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which employer has the most employees ?
| SELECT "employer" FROM table_203_737 ORDER BY "# of employees" DESC LIMIT 1 | squall |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TA... | SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'LHSP' AND course.number = 130 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.o... | advising |
CREATE TABLE apartment_buildings (
building_id number,
building_short_name text,
building_full_name text,
building_description text,
building_address text,
building_manager text,
building_phone text
)
CREATE TABLE apartments (
apt_id number,
building_id number,
apt_type_code tex... | SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM apartment_bookings AS T1 JOIN guests AS T2 ON T1.guest_id = T2.guest_id | spider |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE food_service (
meal_... | 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 = 'LOS ANGELES' AND date_day.day_number = 24 AND date_day.month_number = 5 A... | atis |
CREATE TABLE happy_hour_member (
HH_ID int,
Member_ID int,
Total_amount real
)
CREATE TABLE member (
Member_ID int,
Name text,
Membership_card text,
Age int,
Time_of_purchase int,
Level_of_membership int,
Address text
)
CREATE TABLE happy_hour (
HH_ID int,
Shop_ID int,
... | SELECT Address, COUNT(*) FROM member GROUP BY Address | nvbench |
CREATE TABLE table_name_73 (
to_par VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the to par for the 68-72-73=213 score?
| SELECT to_par FROM table_name_73 WHERE score = 68 - 72 - 73 = 213 | sql_create_context |
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 t_kc24.PER_SOL FROM t_kc24 JOIN t_kc21_t_kc24 JOIN t_kc21 ON t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID AND t_kc21_t_kc24.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '18625680009' | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.ethnicity = "BLACK/HAITIAN" | mimicsql_data |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid 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 = 'end stage renal di... | mimic_iii |
CREATE TABLE table_name_1 (
reversal_symmetry VARCHAR,
clone_independence VARCHAR,
non_dictatorship VARCHAR,
consistency_ VARCHAR,
_participation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the reversal symmetry when non-dictatorship i... | SELECT reversal_symmetry FROM table_name_1 WHERE non_dictatorship = "yes" AND consistency_ & _participation = "no" AND clone_independence = "yes" | sql_create_context |
CREATE TABLE table_203_398 (
id number,
"year" number,
"vidhan sabha" text,
"members of legislative assembly" text,
"winning party" text,
"nearest contesting party" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the winning party the yea... | SELECT "winning party" FROM table_203_398 WHERE "members of legislative assembly" = 'shri durga prasad' | squall |
CREATE TABLE table_75544 (
"Longi- tude" text,
"Usual translation" text,
"Chinese name \u00b9" text,
"Japanese name" text,
"Korean name \u00b2" text,
"Vietnamese name" text,
"Date \u00b3" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHICH ... | SELECT "Usual translation" FROM table_75544 WHERE "Date \u00b3" = 'jun 21' | wikisql |
CREATE TABLE VISITORS (
Tourist_ID VARCHAR,
Tourist_Details VARCHAR
)
CREATE TABLE Tourist_Attractions (
Name VARCHAR,
Tourist_Attraction_ID VARCHAR
)
CREATE TABLE VISITS (
Visit_Date VARCHAR,
Tourist_Attraction_ID VARCHAR,
Tourist_ID VARCHAR
)
-- Using valid SQLite, answer the following... | SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Vincent" OR T2.Tourist_Details = "Vivian" | sql_create_context |
CREATE TABLE table_68034 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the Final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which tournament has hard as the surface and apr. 12, 1998 as the date?
| SELECT "Tournament" FROM table_68034 WHERE "Surface" = 'hard' AND "Date" = 'apr. 12, 1998' | wikisql |
CREATE TABLE table_70015 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Entrant has a vanwall straight-4 engine?
| SELECT "Entrant" FROM table_70015 WHERE "Engine" = 'vanwall straight-4' | wikisql |
CREATE TABLE table_39148 (
"Date" text,
"Race" text,
"Distance" text,
"Venue" text,
"Radio" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which race has a distance of 201.44 miles?
| SELECT "Race" FROM table_39148 WHERE "Distance" = '201.44 miles' | wikisql |
CREATE TABLE table_name_70 (
year INTEGER,
entrant VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the year when Spirit Tom's Racing had more than 3 points?
| SELECT SUM(year) FROM table_name_70 WHERE entrant = "spirit tom's racing" AND points > 3 | sql_create_context |
CREATE TABLE table_name_56 (
points VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which points has the driver Paul Tracy?
| SELECT points FROM table_name_56 WHERE driver = "paul tracy" | sql_create_context |
CREATE TABLE table_63540 (
"Draw" real,
"Language" text,
"Artist" text,
"Song" text,
"Place" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Luca Barbarossa song had a draw smaller than 20?
| SELECT "Song" FROM table_63540 WHERE "Draw" < '20' AND "Artist" = 'luca barbarossa' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND procedures.long_title = "Insertion of non-drug-eluting coronary artery stent(s)" | mimicsql_data |
CREATE TABLE table_53684 (
"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.
-- Tell me the home team for venue of mcg
| SELECT "Home team" FROM table_53684 WHERE "Venue" = 'mcg' | wikisql |
CREATE TABLE table_60662 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- From what country is the player with a score of 68-71-76=215?
| SELECT "Country" FROM table_60662 WHERE "Score" = '68-71-76=215' | wikisql |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
... | SELECT DISTINCT semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'MEDEDUC' AND course.number = 883 AND semester.semester_id = course_offering.semester ORDER BY semester.year LIMIT 1 | advising |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TA... | SELECT microlab.culturesite FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-24513')) AND DATETIME(microlab.culturetakentime) <= DATETIME(CURRE... | eicu |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE cost (
row_id number... | SELECT AVG(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 69289) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'mcv') AND STRFTIME('%y-%m', labevents.charttime) <= '2104-03' | mimic_iii |
CREATE TABLE table_194 (
"Round" real,
"Grand Prix" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Driver" text,
"Winning Constructor" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the winning driver of roun... | SELECT "Winning Driver" FROM table_194 WHERE "Round" = '7' | wikisql |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT 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.PERSON_NM = '柏向明' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2017-05-05' AND '2018-01-22' | css |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid num... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-37411') AND patient.unitdischargetime IS NULL) AND intak... | eicu |
CREATE TABLE table_name_31 (
song VARCHAR,
points VARCHAR,
artist VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the name of the song by afro-dite that had a points total greater than 100?
| SELECT song FROM table_name_31 WHERE points > 100 AND artist = "afro-dite" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-82318' AND patient.hospitaldischargetime IS NULL)) AND treatment.treatme... | eicu |
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 txmzjzjlb.JZZTDM, txmzjzjlb.JZZTMC FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '80538748012' UNION SELECT ftxmzjzjlb.JZZTDM, ftxmzjzjlb.JZZTMC FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZLSH = '80538748012' | css |
CREATE TABLE table_65691 (
"School" text,
"Location" text,
"Mascot" text,
"Enrollment" real,
"IHSAA Class" text,
"IHSAA Football Class" text,
"County" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the enrollment for the AAAA class i... | SELECT SUM("Enrollment") FROM table_65691 WHERE "IHSAA Football Class" = 'aaaa' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT demographic.admission_location FROM demographic WHERE demographic.subject_id = "3343" | mimicsql_data |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.language = "ENGL" AND lab."CATEGORY" = "Chemistry" | mimicsql_data |
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 Name, AVG(Price) FROM Products GROUP BY Name ORDER BY AVG(Price) DESC | nvbench |
CREATE TABLE table_22180353_1 (
type VARCHAR,
registration VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are all types where registration is HB-OPU?
| SELECT type FROM table_22180353_1 WHERE registration = "HB-OPU" | sql_create_context |
CREATE TABLE table_40098 (
"Year" real,
"Team" text,
"Co-Drivers" text,
"Class" text,
"Laps" real,
"Pos." text,
"Class Pos." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team had a class position of 5th?
| SELECT "Team" FROM table_40098 WHERE "Class Pos." = '5th' | wikisql |
CREATE TABLE table_73355 (
"Year" real,
"Starts" real,
"Wins" 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 provided above.
-- Ho... | SELECT COUNT("Top 10") FROM table_73355 WHERE "Avg. Finish" = '23.3' | wikisql |
CREATE TABLE Marketing_Regions (
Marketing_Region_Code CHAR(15),
Marketing_Region_Name VARCHAR(255),
Marketing_Region_Descriptrion VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Addresses (
Address_ID VARCHAR(100),
Line_1 VARCHAR(255),
Line_2 VARCHAR(255),
City_Town VARCHAR(255... | SELECT City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
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 tex... | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'oth extraoc mus-tend op') AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') | mimic_iii |
CREATE TABLE table_51852 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which away team has a home team score of 12.10 (... | SELECT "Away team" FROM table_51852 WHERE "Home team score" = '12.10 (82)' | wikisql |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'BIOLOGY' AND number = 241 | advising |
CREATE TABLE table_71932 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Ben Hogan with a score larger than 66 had a place listed of what?
| SELECT "Place" FROM table_71932 WHERE "Score" > '66' AND "Player" = 'ben hogan' | 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 diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE... | 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 = 'isosorbide mononitrate (extended release)' AND DATETIME(prescript... | mimic_iii |
CREATE TABLE Tourist_Attractions (
Tourist_Attraction_ID INTEGER,
Attraction_Type_Code CHAR(15),
Location_ID INTEGER,
How_to_Get_There VARCHAR(255),
Name VARCHAR(255),
Description VARCHAR(255),
Opening_Hours VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Royal_Family (
Roya... | SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_name_49 (
chassis VARCHAR,
engine VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the chassis for engine of brm v12
| SELECT chassis FROM table_name_49 WHERE engine = "brm v12" | sql_create_context |
CREATE TABLE table_name_91 (
theme VARCHAR,
mintage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What theme has a mintage of 3527?
| SELECT theme FROM table_name_91 WHERE mintage = "3527" | sql_create_context |
CREATE TABLE Video_games (
gname VARCHAR,
gtype VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show all video games and their types in the order of their names.
| SELECT gname, gtype FROM Video_games ORDER BY gname | sql_create_context |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | 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, fare, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND NOT fare.round_trip_cost IS NULL AND flight_fare.fare_... | atis |
CREATE TABLE table_name_80 (
gold INTEGER,
total VARCHAR,
silver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many gold medals when the total is more than 1 and 18 silver?
| SELECT MIN(gold) FROM table_name_80 WHERE total > 1 AND silver = 18 | sql_create_context |
CREATE TABLE table_67313 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What rank has a 25 finish?
| SELECT "Rank" FROM table_67313 WHERE "Finish" = '25' | wikisql |
CREATE TABLE table_name_38 (
school_club_team VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Roy Rogers play for what school/club team?
| SELECT school_club_team FROM table_name_38 WHERE player = "roy rogers" | sql_create_context |
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
)
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Display a pie chart for how... | SELECT job, AVG(age) FROM Person GROUP BY job | nvbench |
CREATE TABLE table_33188 (
"Team" text,
"Game" real,
"Draw" real,
"Loss" real,
"Goal Gain" real,
"Goal Loss" real,
"Goal Diff" real,
"Point" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points did Happy Valley score before gam... | SELECT COUNT("Point") FROM table_33188 WHERE "Team" = 'happy valley' AND "Game" < '14' | wikisql |
CREATE TABLE wdmzjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH number,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZD... | SELECT wdmzjzjlb.JZKSDM, wdmzjzjlb.JZKSMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '27490832854' UNION SELECT bdmzjzjlb.JZKSDM, bdmzjzjlb.JZKSMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '27490832854' | css |
CREATE TABLE table_9330 (
"Province" text,
"Area (km 2 )" real,
"Total population (2000 census)" text,
"Total population (2005 estimate)" real,
"Total population (2010 census)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Total population (2... | SELECT MAX("Total population (2010 census)") FROM table_9330 WHERE "Area (km 2 )" < '147,307.00' | wikisql |
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_req... | 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAK... | atis |
CREATE TABLE table_48056 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Bronze is the highest one that has a Rank of 26, and a Total larger than 1?
| SELECT MAX("Bronze") FROM table_48056 WHERE "Rank" = '26' AND "Total" > '1' | wikisql |
CREATE TABLE table_66265 (
"Event" text,
"Performance" text,
"Athlete" text,
"Nation" text,
"Place" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the event that had a performance of 14:11.15 by Ethiopia?
| SELECT "Event" FROM table_66265 WHERE "Nation" = 'ethiopia' AND "Performance" = '14:11.15' | wikisql |
CREATE TABLE table_203_237 (
id number,
"n" number,
"p" text,
"nat." text,
"name" text,
"age" number,
"moving from" text,
"type" text,
"transfer\nwindow" text,
"ends" number,
"transfer\nfee" text
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT "name" FROM table_203_237 WHERE "name" <> 'henning berg' AND "transfer\nwindow" = 'summer' AND "ends" = 2004 | 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 demographic.expire_flag, demographic.discharge_location FROM demographic WHERE demographic.name = "Kurt Buczek" | 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 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 '2009-01-20' AND '2018-02-07' AND t_kc22.SOC_SRT_DIRE_CD = '904255' | css |
CREATE TABLE table_641 (
"Episode #" real,
"Title" text,
"Part 1" text,
"Part 2" text,
"Part 3" text,
"Part 4" text,
"Part 5" text,
"Part 6" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the air date of part 2 of the episode wh... | SELECT "Part 2" FROM table_641 WHERE "Part 1" = 'January 31, 2008' | wikisql |
CREATE TABLE table_name_89 (
date VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was the score 2 4?
| SELECT date FROM table_name_89 WHERE score = "2–4" | sql_create_context |
CREATE TABLE gyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '67062634' AND qtb.MED_SER_ORG_NO = '7262008' AND qtb.OUT_DIAG_DIS_NM LIKE '%张力%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '67062634' AND gyb.MED_SER_ORG_NO = '7262008' AND gyb.OUT_DIAG_DIS_NM LIKE '%张力%' UNION SELECT zyb.MED_CLINIC_ID FROM zy... | css |
CREATE TABLE table_55882 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the record when the attendance was 22,713?
| SELECT "Record" FROM table_55882 WHERE "Attendance" = '22,713' | wikisql |
CREATE TABLE table_78038 (
"Full Name" text,
"Nickname" text,
"Gender" text,
"Weight at birth" text,
"Meaning" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What nickname has the meaning of God knows my journey?
| SELECT "Nickname" FROM table_78038 WHERE "Meaning" = 'god knows my journey' | wikisql |
CREATE TABLE table_name_17 (
date VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date of the Game with a Record of 46-22?
| SELECT date FROM table_name_17 WHERE record = "46-22" | sql_create_context |
CREATE TABLE table_name_33 (
state VARCHAR,
peak_population__year_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the state when the peak population (year) is 134995 (1950)?
| SELECT state FROM table_name_33 WHERE peak_population__year_ = "134995 (1950)" | sql_create_context |
CREATE TABLE table_73147 (
"Tournament" text,
"Also currently known as" text,
"City" text,
"Country" text,
"Court surface" text,
"Defending champion" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many defending champs from thailand?
| SELECT COUNT("Defending champion") FROM table_73147 WHERE "Country" = 'Thailand' | wikisql |
CREATE TABLE table_55310 (
"Village (German)" text,
"Village (Slovenian)" text,
"Number of peoople 1991" real,
"Percent of Slovenes 1991" text,
"Percent of Slovenes 1951" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What percentage of Slovenes liv... | SELECT "Percent of Slovenes 1951" FROM table_55310 WHERE "Village (German)" = 'roach' | wikisql |
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minu... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'OAKLAND' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city... | atis |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
... | SELECT * FROM jyjgzbb WHERE JCZBMC = (SELECT JCZBMC FROM jyjgzbb WHERE JYZBLSH = '37939837213') AND JCZBJGDW = (SELECT JCZBJGDW FROM jyjgzbb WHERE JYZBLSH = '37939837213') AND JCZBJGDL < (SELECT JCZBJGDL FROM jyjgzbb WHERE JYZBLSH = '37939837213') | css |
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CH... | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings ORDER BY COUNT(booking_start_date) DESC | nvbench |
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | SELECT DISTINCT course_offering.friday FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'AUTO' AND course.number = 503 AND semester.semester = 'WN' AND semester.year = 2016 | advising |
CREATE TABLE zzmzjzjlb (
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 jybgb.KSBM, jybgb.KSMC FROM hz_info JOIN zzmzjzjlb JOIN jybgb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '09797743' AND jybgb.BGRQ BETWEEN '2013-05-06... | css |
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,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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.J... | css |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_items (
... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'promyelocytes') AND STRFTIME('%y', labevents.charttime) >= '2105') | mimic_iii |
CREATE TABLE table_36720 (
"Competition" text,
"Round" text,
"Opposition" text,
"Home Leg" text,
"Away Leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What ist the Away Leg with an Opposition that is aarhus gymnastik forening?
| SELECT "Away Leg" FROM table_36720 WHERE "Opposition" = 'aarhus gymnastik forening' | wikisql |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
Revision... | SELECT UserId, MAX(ph_count) FROM (SELECT ph.UserId, YEAR(ph.CreationDate) AS year, MONTH(ph.CreationDate) AS month, DAY(ph.CreationDate - 1) AS day, COUNT(DISTINCT ph.Id) AS ph_count FROM PostHistory AS ph INNER JOIN Posts AS p ON (p.Id = ph.PostId AND p.OwnerUserId != ph.UserId AND ph.PostHistoryTypeId IN (4, 5)) INN... | sede |
CREATE TABLE table_name_98 (
class VARCHAR,
pos VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team is in 9th place?
| SELECT class AS pos FROM table_name_98 WHERE pos = "9th" | sql_create_context |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '柏婉娜' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2006-07-09') | css |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName te... | SELECT COUNT(Posts.Id) AS counter FROM Tags JOIN PostTags ON Tags.Id = PostTags.TagId JOIN Posts ON PostTags.PostId = Posts.Id JOIN PostHistory ON PostHistory.PostId = Posts.Id WHERE TagName = 'java' AND PostHistoryTypeId = 19 | sede |
CREATE TABLE table_17827271_1 (
actor_in_original_production VARCHAR,
actor_required VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What actor played the 'female, older' role in the original production?
| SELECT actor_in_original_production FROM table_17827271_1 WHERE actor_required = "Female, older" | sql_create_context |
CREATE TABLE table_test_26 (
"id" int,
"bleeding" int,
"left_ventricular_ejection_fraction_lvef" int,
"left_main_coronary_artery_disease" bool,
"uncontrolled_diabetes" bool,
"hiv_infection" bool,
"hemoglobin_a1c_hba1c" float,
"hepatitis_b_infection" bool,
"renal_disease" bool,
"u... | SELECT * FROM table_test_26 WHERE hiv_infection = 1 OR hepatitis_b_infection = 1 OR hepatitis_c_infection = 1 | criteria2sql |
CREATE TABLE table_17021 (
"Number" text,
"TMS Number" text,
"Builder" text,
"Year built" real,
"Carriage type" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What where the tms numbers built in 1923
| SELECT "TMS Number" FROM table_17021 WHERE "Year built" = '1923' | wikisql |
CREATE TABLE table_train_191 (
"id" int,
"gender" string,
"hemoglobin_a1c_hba1c" float,
"diabetic" string,
"serum_creatinine" float,
"allergy_to_glyburide" bool,
"kidney_disease" bool,
"drug_abuse" bool,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following q... | SELECT * FROM table_train_191 WHERE (gender = 'male' OR gender = 'female') AND diabetic = 'i' AND (age >= 18 AND age <= 65) | criteria2sql |
CREATE TABLE table_25542 (
"Event" real,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Race 1 Winner" text,
"Race 2 Winner" text,
"Race 3 Winner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the race at the Symmons Plai... | SELECT "Date" FROM table_25542 WHERE "Circuit" = 'Symmons Plains Raceway' | 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 prescriptions (
subject_id text,
hadm_id... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.admityear >= "2179" | mimicsql_data |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
... | SELECT COUNT(DISTINCT course.course_id) FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.credits = 5 AND course.department = 'UC' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Winter'... | advising |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT (SELECT vitalperiodic.heartrate FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-42472') AND NOT patient.unitdischargetime IS ... | eicu |
CREATE TABLE table_55410 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the smallest crowd at home with a score... | SELECT MIN("Crowd") FROM table_55410 WHERE "Home team score" = '15.8 (98)' | wikisql |
CREATE TABLE table_29934 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name t... | SELECT "High rebounds" FROM table_29934 WHERE "Game" = '77' | wikisql |
CREATE TABLE table_2886617_8 (
college_junior_club_team VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What college team did Milan Kostolny play for?
| SELECT college_junior_club_team FROM table_2886617_8 WHERE player = "Milan Kostolny" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.