instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_245 (
"Model" text,
"Engine make/Capacity" text,
"Power kW@rpm" text,
"Torque Nm@rpm" text,
"Transmission Make/Type/Speed" text,
"GVM (kg) Technical Capacity" text,
"GCM (kg) Technical Capacity" text
)
-- Using valid SQLite, answer the following questions for the tables ... | SELECT "GCM (kg) Technical Capacity" FROM table_245 WHERE "Transmission Make/Type/Speed" = 'Eaton FS 5306-A Manual Synchromesh 6 Speed' | wikisql |
CREATE TABLE table_name_62 (
points VARCHAR,
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- with year greater than 1988 what is the total number of points?
| SELECT COUNT(points) FROM table_name_62 WHERE year > 1988 | sql_create_context |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND procedures.long_title = "Ventriculopuncture through previously implanted catheter" | mimicsql_data |
CREATE TABLE table_44634 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the par for the t5 place player Steve Jones?
| SELECT "To par" FROM table_44634 WHERE "Place" = 't5' AND "Player" = 'steve jones' | wikisql |
CREATE TABLE table_11690135_1 (
interview VARCHAR,
evening_gown VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had an evening gown score of 9.78?
| SELECT interview FROM table_11690135_1 WHERE evening_gown = "9.78" | sql_create_context |
CREATE TABLE table_name_56 (
enrollment VARCHAR,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much Enrollment has a School of shakamak?
| SELECT COUNT(enrollment) FROM table_name_56 WHERE school = "shakamak" | sql_create_context |
CREATE TABLE table_2861364_1 (
executed_person VARCHAR,
under_president VARCHAR,
crime VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who was executed during president charles de gaulle's reign for thr crime of child murder after rape?
| SELECT executed_person FROM table_2861364_1 WHERE under_president = "Charles de Gaulle" AND crime = "Child murder after rape" | sql_create_context |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_descriptio... | SELECT DISTINCT airline.airline_code FROM airline, airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'SALT LAKE CITY' AND flight.airline_code = airline.airline_code AND flight.from_airport = airport_service.airport_code | atis |
CREATE TABLE manufacturer (
name VARCHAR,
open_year VARCHAR,
num_of_shops VARCHAR,
Num_of_Factories VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Give me the name and year of opening of the manufacturers that have either less than 10 factories or mo... | SELECT name, open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10 | sql_create_context |
CREATE TABLE table_64899 (
"Elector" text,
"Place of birth" text,
"Cardinalatial title" text,
"Elevated" text,
"Elevator" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Elector has the Place of Birth listed as Bavaria?
| SELECT "Elector" FROM table_64899 WHERE "Place of birth" = 'bavaria' | wikisql |
CREATE TABLE table_45195 (
"Rank" real,
"Title" text,
"Studio" text,
"Director(s)" text,
"Worldwide Gross" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Sum of m. night shyamalan ranks?
| SELECT SUM("Rank") FROM table_45195 WHERE "Director(s)" = 'm. night shyamalan' | wikisql |
CREATE TABLE table_train_179 (
"id" int,
"systolic_blood_pressure_sbp" int,
"fasting_plasma_glucose_fpg" float,
"diastolic_blood_pressure_dbp" int,
"diabetes" bool,
"body_mass_index_bmi" float,
"triglyceride_tg" float,
"hypertension" bool,
"age" float,
"NOUSE" float
)
-- Using ... | SELECT * FROM table_train_179 WHERE diabetes = 1 OR fasting_plasma_glucose_fpg > 240 | criteria2sql |
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 d_labitems (
row_id ... | SELECT admissions.age FROM admissions WHERE admissions.subject_id = 13686 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1 | mimic_iii |
CREATE TABLE domain_conference (
cid int,
did int
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE domain_publication (
did int,
pid int
)
CREATE TABLE organization (
continent varchar,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE cite (
cited int,... | SELECT author.name FROM author, conference, publication, writes WHERE conference.name = 'VLDB' AND publication.cid = conference.cid AND publication.year < 2002 AND publication.year > 1995 AND writes.aid = author.aid AND writes.pid = publication.pid | academic |
CREATE TABLE table_38657 (
"Discipline" text,
"Peter" real,
"Adam" real,
"Jade" real,
"Plat'num" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's Adam's score when Jade's score is greater than 5 and Peter's score is less than 0?
| SELECT AVG("Adam") FROM table_38657 WHERE "Jade" > '5' AND "Peter" < '0' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT AVG(t_kc21.MED_AMOUT) FROM t_kc21 WHERE t_kc21.MED_ORG_DEPT_CD = '662' AND t_kc21.IN_HOSP_DATE BETWEEN '2000-12-01' AND '2002-09-23' AND t_kc21.IN_DIAG_DIS_NM = '煤尘肺(炭末肺)' AND t_kc21.CLINIC_TYPE = '住院' | css |
CREATE TABLE table_54517 (
"Year" real,
"Tournament" text,
"Venue" text,
"Result" text,
"Event" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the venue where the result was 12th?
| SELECT "Venue" FROM table_54517 WHERE "Result" = '12th' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text... | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.... | css |
CREATE TABLE table_name_85 (
turbine_vendor VARCHAR,
wind_farm VARCHAR,
size__mw_ VARCHAR,
turbines VARCHAR,
county VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the turbine vendor for Meenadreen in Donegal county with less than 6 turbine... | SELECT turbine_vendor FROM table_name_85 WHERE turbines < 6 AND county = "donegal" AND size__mw_ = "0.85" AND wind_farm = "meenadreen" | sql_create_context |
CREATE TABLE table_46409 (
"Name" text,
"Latitude" text,
"Longitude" text,
"Diameter (km)" real,
"Year named" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the total diameter when longitude is 357.8e later than 1985?
| SELECT COUNT("Diameter (km)") FROM table_46409 WHERE "Longitude" = '357.8e' AND "Year named" > '1985' | wikisql |
CREATE TABLE table_name_4 (
result VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Result with a Date with 4 september 2013?
| SELECT result FROM table_name_4 WHERE date = "4 september 2013" | sql_create_context |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
uniquepid text,
... | SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-178495')) AND lab.labname = 'bedside glucose' AND lab.labresulttime = '2102... | eicu |
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 jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '曹诗蕾' AND jybg... | css |
CREATE TABLE table_25421463_1 (
season VARCHAR,
final_placing VARCHAR,
team_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what season was the final placing NC and the team SL Formula Racing?
| SELECT season FROM table_25421463_1 WHERE final_placing = "NC†" AND team_name = "SL Formula Racing" | sql_create_context |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT Team_Name, Team_ID FROM basketball_match ORDER BY Team_ID | nvbench |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT DISTINCT PostHistory.PostId AS "post_link", url = 'site://posts/' + CAST(PostHistory.PostId AS TEXT) + '/revisions', Posts.OwnerUserId AS "user_link", Posts.Score, Posts.Tags, Posts.CreationDate, Posts.LastActivityDate FROM PostHistory INNER JOIN Posts ON PostHistory.PostId = Posts.Id WHERE PostHistoryTypeId IN ... | sede |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT gwyjzb.IN_DIAG_DIS_CD, gwyjzb.IN_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '73598639069' UNION SELECT fgwyjzb.IN_DIAG_DIS_CD, fgwyjzb.IN_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '73598639069' | css |
CREATE TABLE company (
headquarters VARCHAR,
main_industry VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show headquarters with at least two companies in the banking industry.
| SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING COUNT(*) >= 2 | sql_create_context |
CREATE TABLE table_25162 (
"Year" real,
"Date" text,
"Driver" text,
"Team" text,
"Manufacturer" text,
"Laps" text,
"Miles (km)" text,
"Race Time" text,
"Average Speed (mph)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the... | SELECT "Date" FROM table_25162 WHERE "Driver" = 'Robert Pressley' | wikisql |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number ... | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite, program_course WHERE NOT COURSE_1.course_id IN (SELECT course_prerequisite.pre_course_id FROM course AS COURSE_0, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.cours... | advising |
CREATE TABLE apartment_facilities (
apt_id number,
facility_code text
)
CREATE TABLE apartment_bookings (
apt_booking_id number,
apt_id number,
guest_id number,
booking_status_code text,
booking_start_date time,
booking_end_date time
)
CREATE TABLE apartments (
apt_id number,
b... | SELECT MIN(bathroom_count), MAX(bathroom_count) FROM apartments | spider |
CREATE TABLE table_204_833 (
id number,
"game" number,
"date" text,
"team" text,
"score" text,
"high points" text,
"high rebounds" text,
"high assists" text,
"location\nattendance" text,
"record" text
)
-- Using valid SQLite, answer the following questions for the tables provid... | SELECT "date" FROM table_204_833 WHERE "game" = (SELECT "game" FROM table_204_833 WHERE "date" = 'april 8') + 1 | squall |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number ... | SELECT DISTINCT course_offering.section_number FROM course, course_offering, semester WHERE course_offering.monday = 'N' AND course.course_id = course_offering.course_id AND course.department = 'CEE' AND course.number = 650 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.ye... | advising |
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.marital_status = "SINGLE" AND lab."CATEGORY" = "Blood Gas" | 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 Founder, AVG(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder DESC | nvbench |
CREATE TABLE table_name_29 (
rank INTEGER,
source VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average rank that has cia world factbook as the source and a year prior to 2005?
| SELECT AVG(rank) FROM table_name_29 WHERE source = "cia world factbook" AND year < 2005 | sql_create_context |
CREATE TABLE table_name_76 (
player VARCHAR,
place VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who placed in t5 and scored 73-69-68=210?
| SELECT player FROM table_name_76 WHERE place = "t5" AND score = 73 - 69 - 68 = 210 | sql_create_context |
CREATE TABLE table_203_594 (
id number,
"canal" text,
"length (miles)" number,
"locks" number,
"max length (ft)" number,
"width (ft)" number,
"year opened" number,
"year abandoned" number,
"year restored" number
)
-- Using valid SQLite, answer the following questions for the tables... | SELECT "canal" FROM table_203_594 WHERE "year opened" = (SELECT MAX("year opened") FROM table_203_594) | squall |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
... | 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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... | atis |
CREATE TABLE table_203_349 (
id number,
"no. in\nseries" number,
"no. in\nseason" number,
"title" text,
"directed by" text,
"written by" text,
"original air date" text,
"production\ncode" text,
"u.s. viewers\n(millions)" number
)
-- Using valid SQLite, answer the following question... | SELECT COUNT("title") FROM table_203_349 | squall |
CREATE TABLE table_200_35 (
id number,
"party" text,
"active voters" number,
"inactive voters" number,
"total voters" number,
"percentage" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- as of october 25 , 2005 , how many voters are either democr... | SELECT SUM("total voters") FROM table_200_35 WHERE "party" IN ('democratic', 'republican') | squall |
CREATE TABLE table_name_33 (
silver INTEGER,
bronze VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest silver that has 2 as the bronze, with a total greater than 4?
| SELECT MIN(silver) FROM table_name_33 WHERE bronze = 2 AND total > 4 | sql_create_context |
CREATE TABLE table_name_75 (
bronze INTEGER,
nation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Bronzes that has a Nation of italy?
| SELECT MAX(bronze) FROM table_name_75 WHERE nation = "italy" | sql_create_context |
CREATE TABLE table_16941304_4 (
driver___passenger VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the driver passenger for 394 points
| SELECT driver___passenger FROM table_16941304_4 WHERE points = 394 | sql_create_context |
CREATE TABLE table_31326 (
"Series #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the director wh... | SELECT "Directed by" FROM table_31326 WHERE "Title" = 'Believers' | wikisql |
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... | SELECT * FROM Posts WHERE OwnerUserId = 3422261 | sede |
CREATE TABLE table_name_46 (
lost INTEGER,
games INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games lost for teams with over 6 games?
| SELECT MIN(lost) FROM table_name_46 WHERE games > 6 | sql_create_context |
CREATE TABLE table_23098 (
"Year" text,
"Marriages between men" real,
"Marriages between women" real,
"Same-sex marriages" real,
"Total marriages" real,
"% same-sex marriages" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many marriages bet... | SELECT "Marriages between women" FROM table_23098 WHERE "% same-sex marriages" = '1.06' | wikisql |
CREATE TABLE club (
Club_ID int,
Club_name text,
Region text,
Start_year int
)
CREATE TABLE coach (
Coach_ID int,
Coach_name text,
Gender text,
Club_ID int,
Rank int
)
CREATE TABLE player (
Player_ID int,
Sponsor_name text,
Player_name text,
Gender text,
Residen... | SELECT Occupation, COUNT(*) FROM player GROUP BY Occupation | nvbench |
CREATE TABLE table_203_300 (
id number,
"year" number,
"tournament" text,
"venue" text,
"result" text,
"extra" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- was there a result of 1st place after the year 2006 ?
| SELECT (SELECT COUNT(*) FROM table_203_300 WHERE "result" = 1 AND "year" > 2006) > 0 | squall |
CREATE TABLE table_name_4 (
date VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Date has a Record of 29 47?
| SELECT date FROM table_name_4 WHERE record = "29–47" | sql_create_context |
CREATE TABLE table_9712 (
"Province" text,
"Skip" text,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot Pct." real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many ends lost for Alberta when stolen ends are ... | SELECT SUM("Ends Lost") FROM table_9712 WHERE "Province" = 'alberta' AND "Stolen Ends" > '7' | wikisql |
CREATE TABLE table_53769 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the result when the competition is friendly on 8 october 2009?
| SELECT "Result" FROM table_53769 WHERE "Competition" = 'friendly' AND "Date" = '8 october 2009' | wikisql |
CREATE TABLE table_12002388_1 (
year INTEGER,
reg_season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year did they finish 1st, southern?
| SELECT MAX(year) FROM table_12002388_1 WHERE reg_season = "1st, Southern" | sql_create_context |
CREATE TABLE table_30594 (
"Version" text,
"Release" text,
"Release date" text,
"End of maintenance" text,
"Requirement" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the number of the 1.0.12 release version?
| SELECT COUNT("Version") FROM table_30594 WHERE "Release" = '1.0.12' | wikisql |
CREATE TABLE table_21058823_1 (
result VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What did they do against Memphis?
| SELECT result FROM table_21058823_1 WHERE opponent = "Memphis" | sql_create_context |
CREATE TABLE table_31153 (
"Name/ designation" text,
"Year of intro" real,
"Country of origin" text,
"Primary cartridge" text,
"Major users" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who are all the major users of the Saturn Machine Pistol?
| SELECT "Major users" FROM table_31153 WHERE "Name/ designation" = 'Saturn machine pistol' | wikisql |
CREATE TABLE table_203_535 (
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 is the total amount of medals spain has won ?
| SELECT "total" FROM table_203_535 WHERE "nation" = 'spain' | squall |
CREATE TABLE table_name_3 (
surface VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the surface for 12 september 2006
| SELECT surface FROM table_name_3 WHERE date = "12 september 2006" | sql_create_context |
CREATE TABLE table_16402 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many players played for adams state school?
| SELECT COUNT("Player") FROM table_16402 WHERE "College" = 'Adams State' | wikisql |
CREATE TABLE table_74055 (
"English" text,
"Proto-Semitic" text,
"Akkadian" text,
"Arabic" text,
"Aramaic" text,
"Hebrew" text,
"Geez" text,
"Mehri" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If in arabic it is sal m-, what is it in ... | SELECT "Proto-Semitic" FROM table_74055 WHERE "Arabic" = 'salām-' | wikisql |
CREATE TABLE table_6945 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What away team has tottenham hotspur as the home team?
| SELECT "Away team" FROM table_6945 WHERE "Home team" = 'tottenham hotspur' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'peak airway/pressure')) AND DATETIME(cost.chargetime, 'start of year... | eicu |
CREATE TABLE table_203_239 (
id number,
"year" number,
"title" text,
"chinese title" text,
"role" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which year did she work on the most films ?
| SELECT "year" FROM table_203_239 GROUP BY "year" ORDER BY COUNT("title") DESC LIMIT 1 | squall |
CREATE TABLE table_56135 (
"Nation" text,
"Gold" text,
"Silver" text,
"Bronze" text,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the gold for netherlands
| SELECT "Gold" FROM table_56135 WHERE "Nation" = 'netherlands' | wikisql |
CREATE TABLE table_14309 (
"Date" text,
"Opponent" text,
"City" text,
"Result" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was Milwaukee's opponent?
| SELECT "Opponent" FROM table_14309 WHERE "City" = 'milwaukee' | wikisql |
CREATE TABLE table_53507 (
"Name" text,
"Years" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number on roll for Shelly Park school?
| SELECT COUNT("Roll") FROM table_53507 WHERE "Name" = 'shelly park school' | wikisql |
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 WHERE MED_SER_ORG_NO = '6247162' AND IN_HOSP_DATE BETWEEN '2008-03-18' AND '2019-06-20' AND IN_DIAG_DIS_CD <> OUT_DIAG_DIS_CD | css |
CREATE TABLE table_name_56 (
publisher VARCHAR,
release_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the publisher of Martial Law: Dead Ringers?
| SELECT publisher FROM table_name_56 WHERE release_title = "martial law: dead ringers" | sql_create_context |
CREATE TABLE table_28885977_1 (
location VARCHAR,
stadium VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location of the Moorabbin Oval stadium?
| SELECT location FROM table_28885977_1 WHERE stadium = "Moorabbin Oval" | sql_create_context |
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 diagnosis (
diagn... | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-53717' AND NOT patient.hospitaldischargetime IS NULL ORDER BY p... | eicu |
CREATE TABLE table_203_726 (
id number,
"year" number,
"national champion" text,
"score" text,
"runner-up" text,
"host or site" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times was ucla national champion ?
| SELECT COUNT(*) FROM table_203_726 WHERE "national champion" = 'ucla' | squall |
CREATE TABLE table_42816 (
"Date" text,
"Home captain" text,
"Away captain" text,
"Venue" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the Home captain that played at the venue Oval?
| SELECT "Home captain" FROM table_42816 WHERE "Venue" = 'oval' | wikisql |
CREATE TABLE table_204_735 (
id number,
"rank" number,
"team" text,
"names" text,
"time" text,
"qualification" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many teams finished better than spain in cycling at the 1996 summer olympics men 's... | SELECT COUNT("team") FROM table_204_735 WHERE "rank" < (SELECT "rank" FROM table_204_735 WHERE "team" = 'spain') | squall |
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufac... | 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 = 25 AND date_day.month_number = 6 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_tim... | atis |
CREATE TABLE table_26454128_4 (
athlete VARCHAR,
height VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which athlete has a height of 1.87 and is from Sweden?
| SELECT athlete FROM table_26454128_4 WHERE height = "1.87" AND country = "Sweden" | sql_create_context |
CREATE TABLE instructor (
dept_name VARCHAR,
salary INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the name of the department which has the highest average salary of professors.
| SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY AVG(salary) DESC LIMIT 1 | sql_create_context |
CREATE TABLE table_17798093_20 (
ending VARCHAR,
examples VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what are the endings of examples achilles, appendices, f ces
| SELECT ending FROM table_17798093_20 WHERE examples = "Achilles, appendices, fæces" | sql_create_context |
CREATE TABLE table_1480455_1 (
area__km_2__ VARCHAR,
population_density___km_2__ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the area (km 2) where the population density (/mk2) is 84.3?
| SELECT area__km_2__ FROM table_1480455_1 WHERE population_density___km_2__ = "84.3" | sql_create_context |
CREATE TABLE table_38154 (
"Date" text,
"Venue" text,
"Result" text,
"Goals" real,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was a friendly match held at Auckland?
| SELECT "Date" FROM table_38154 WHERE "Competition" = 'friendly match' AND "Venue" = 'auckland' | wikisql |
CREATE TABLE table_74568 (
"Area" text,
"Advertisement date" text,
"Block" text,
"Winning applicant" text,
"Ensemble name" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Oxfordshire Area's Ensemble Name?
| SELECT "Ensemble name" FROM table_74568 WHERE "Area" = 'oxfordshire' | wikisql |
CREATE TABLE table_20477 (
"Headphone Model" text,
"Headphone Class" text,
"Driver-matched dB" text,
"Construction" text,
"Earpads" text,
"Termination" text,
"US MSRP" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which terminations corresp... | SELECT "Termination" FROM table_20477 WHERE "Headphone Model" = 'SR80i' | wikisql |
CREATE TABLE table_3764 (
"Artist" text,
"Country" text,
"Number-one single(s)" text,
"Year" real,
"Weeks at #1" real,
"Straight to #1 ?" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number one singles for desvarieux, jacob
| SELECT "Number-one single(s)" FROM table_3764 WHERE "Artist" = 'Desvarieux, Jacob' | wikisql |
CREATE TABLE table_name_80 (
original_us_air_date VARCHAR,
original_canadian_air_date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Original U.S. air-date for the Original Canadian air-date of december 9, 2007?
| SELECT original_us_air_date FROM table_name_80 WHERE original_canadian_air_date = "december 9, 2007" | sql_create_context |
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 jybgb_jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = j... | css |
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 aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufac... | 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON'... | atis |
CREATE TABLE table_name_28 (
points INTEGER,
winnings VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which driver has the highest point total after winning $133,386?
| SELECT MAX(points) FROM table_name_28 WHERE winnings = "$133,386" | sql_create_context |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE cost (
row_id... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid 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 = 10855)) AND DATETIME(outputevents.charttim... | mimic_iii |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE admissions... | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 88558) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'red blood cells') AND DATETIME(labevents.charttime) <= DATETIME(CURRENT_TIME(),... | mimic_iii |
CREATE TABLE table_14850099_18 (
planet VARCHAR,
cardinal_direction VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the planet associated with the direction of south?
| SELECT planet FROM table_14850099_18 WHERE cardinal_direction = "South" | sql_create_context |
CREATE TABLE table_34775 (
"Nation" text,
"Skip" text,
"Third" text,
"Second" text,
"Lead" text,
"Alternate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the lead for the team with Nkeiruka Ezekh as second?
| SELECT "Lead" FROM table_34775 WHERE "Second" = 'nkeiruka ezekh' | wikisql |
CREATE TABLE table_33186 (
"Positional or Automatic" text,
"Opponents" text,
"Suits" text,
"Material or Non-material" text,
"Count Rectified" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which suits have no material or non-material, either opponen... | SELECT "Suits" FROM table_33186 WHERE "Material or Non-material" = 'no' AND "Opponents" = 'either' AND "Positional or Automatic" = 'positional' | wikisql |
CREATE TABLE table_name_66 (
school_colors VARCHAR,
main_campus_location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the school colors for the college whose main campus is overland park?
| SELECT school_colors FROM table_name_66 WHERE main_campus_location = "overland park" | sql_create_context |
CREATE TABLE table_45903 (
"Name" text,
"Platform" text,
"Supported databases" text,
"Tracking Method" text,
"Latest stable release" text,
"License" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which tracking method has a latest stable release... | SELECT "Tracking Method" FROM table_45903 WHERE "Latest stable release" = '6.0' | wikisql |
CREATE TABLE table_name_73 (
guest_host VARCHAR,
episode_number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the Guest Host for Episode Number of 5?
| SELECT guest_host FROM table_name_73 WHERE episode_number = 5 | sql_create_context |
CREATE TABLE table_21907770_4 (
country VARCHAR,
versus VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times was the opponent country India?
| SELECT COUNT(country) FROM table_21907770_4 WHERE versus = "India" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT demographic.admittime, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "LONG TERM CARE HOSPITAL" | mimicsql_data |
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
EMP_HIREDATE datetime,
EMP... | SELECT DEPT_CODE, SUM(T1.CRS_CREDIT) FROM COURSE AS T1 JOIN CLASS AS T2 ON T1.CRS_CODE = T2.CRS_CODE GROUP BY T1.DEPT_CODE | nvbench |
CREATE TABLE table_27615445_1 (
audition_city VARCHAR,
episode_air_date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many audition city's are there with an episode air date of June 24, 2010?
| SELECT COUNT(audition_city) FROM table_27615445_1 WHERE episode_air_date = "June 24, 2010" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.