instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_70153 (
"Surface" text,
"Event" text,
"Time ( h : m : s )" text,
"Date" text,
"Place" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date that has 1:01:42?
| SELECT "Date" FROM table_70153 WHERE "Time ( h : m : s )" = '1:01:42' | wikisql |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE prescriptions (
... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.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, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi... | mimic_iii |
CREATE TABLE table_64291 (
"Year" real,
"Political Rights" real,
"Civil Liberties" real,
"Status" text,
"President" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the president was Yoweri Museveni, and the year was 1993, with rank of 6 under po... | SELECT SUM("Civil Liberties") FROM table_64291 WHERE "Political Rights" = '6' AND "President" = 'yoweri museveni' AND "Year" = '1993' | wikisql |
CREATE TABLE table_46965 (
"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.
-- Who ha... | SELECT "High rebounds" FROM table_46965 WHERE "Location Attendance" = 'philips arena 12,088' | wikisql |
CREATE TABLE book_club (
book_club_id number,
year number,
author_or_editor text,
book_title text,
publisher text,
category text,
result text
)
CREATE TABLE culture_company (
company_name text,
type text,
incorporated_in text,
group_equity_shareholding number,
book_club_... | SELECT title, year, director FROM movie ORDER BY budget_million | spider |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,... | SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 6580)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate' AND d_... | mimic_iii |
CREATE TABLE table_name_6 (
round INTEGER,
location VARCHAR,
method VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the lowest Round that has the Location of indiana, united states, and the Method of submission (guillotine choke)?
| SELECT MIN(round) FROM table_name_6 WHERE location = "indiana, united states" AND method = "submission (guillotine choke)" | sql_create_context |
CREATE TABLE table_11734041_2 (
years_for_rockets VARCHAR,
school_club_team_country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What years did the player from LaSalle play for the Rockets?
| SELECT years_for_rockets FROM table_11734041_2 WHERE school_club_team_country = "LaSalle" | sql_create_context |
CREATE TABLE table_26132 (
"Election Year" real,
"Assembly" text,
"Winning Party/Coalition" text,
"Chief Minister" text,
"Speaker" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the assembly is the sixth assembly, what is the maximum election yea... | SELECT MAX("Election Year") FROM table_26132 WHERE "Assembly" = 'Sixth Assembly' | wikisql |
CREATE TABLE table_68205 (
"Heat" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest numbered Lane with a Time of 1:10.57 and Heat larger than 2?
| SELECT MIN("Lane") FROM table_68205 WHERE "Heat" > '2' AND "Time" = '1:10.57' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9cod... | SELECT AVG(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-23047')) AND intakeoutput.celllabel = 'emesi... | eicu |
CREATE TABLE student (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
tot_cred numeric(3,0)
)
CREATE TABLE course (
course_id varchar(8),
title varchar(50),
dept_name varchar(20),
credits numeric(2,0)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
... | SELECT building, COUNT(building) FROM course AS T1 JOIN section AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' GROUP BY building ORDER BY building DESC | nvbench |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Po... | SELECT u.Id AS id, COUNT(a.Id) AS answerCount FROM Posts AS a JOIN Users AS u ON u.Id = a.OwnerUserId JOIN Posts AS q ON a.ParentId = q.Id WHERE q.Tags LIKE '%C++%' AND u.Location LIKE '%Greece%' GROUP BY u.Id | sede |
CREATE TABLE table_name_47 (
loss VARCHAR,
opponent VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which loss has an Opponent of @ angels, and a Date of august 1?
| SELECT loss FROM table_name_47 WHERE opponent = "@ angels" AND date = "august 1" | sql_create_context |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,... | SELECT COUNT(*) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 18866)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'pe 24 fs po'... | mimic_iii |
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15),
Workshop_Group_ID INTEGER,
Product_Description VARCHAR(255),
Product_Name VARCHAR(255),
Product_Price DECIMAL(20,4),
Other_Product_Service_Details VARCHAR(255)
)
CREATE TABLE Drama_Workshop_Groups (
Workshop_Group_I... | SELECT Service_Type_Description, COUNT(Service_Type_Description) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 GROUP BY Service_Type_Description | nvbench |
CREATE TABLE table_name_18 (
opponent VARCHAR,
loss VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Opponent has a Loss of weaver (9-9)?
| SELECT opponent FROM table_name_18 WHERE loss = "weaver (9-9)" | sql_create_context |
CREATE TABLE table_name_86 (
track_s_ VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Track(s) is on 18 november 1985?
| SELECT track_s_ FROM table_name_86 WHERE date = "18 november 1985" | sql_create_context |
CREATE TABLE table_name_48 (
boarded VARCHAR,
class VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who boarded first class?
| SELECT boarded FROM table_name_48 WHERE class = "first" | sql_create_context |
CREATE TABLE table_62265 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Score, when Home is 'Montreal Canadiens', and when Date is 'May 16'?
| SELECT "Score" FROM table_62265 WHERE "Home" = 'montreal canadiens' AND "Date" = 'may 16' | wikisql |
CREATE TABLE products (
code number,
name text,
price number,
manufacturer number
)
CREATE TABLE manufacturers (
code number,
name text,
headquarter text,
founder text,
revenue number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How ma... | SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy' | spider |
CREATE TABLE table_name_4 (
date VARCHAR,
round VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was the 4th round, with home team Itabuna, played?
| SELECT date FROM table_name_4 WHERE round = "4th" AND home_team = "itabuna" | sql_create_context |
CREATE TABLE table_name_73 (
prefix VARCHAR,
chemical_class VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What prefix has chemical class Iodoalkane?
| SELECT prefix FROM table_name_73 WHERE chemical_class = "iodoalkane" | sql_create_context |
CREATE TABLE table_2980024_1 (
total_apps VARCHAR,
league_goals VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the total apps for Dunne in season where he had 0 league goals?
| SELECT total_apps FROM table_2980024_1 WHERE league_goals = 0 | sql_create_context |
CREATE TABLE table_80218 (
"Rank" real,
"Heat" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the average rank with larger than 3 and heat more than 5
| SELECT AVG("Rank") FROM table_80218 WHERE "Lane" > '3' AND "Heat" > '5' | wikisql |
CREATE TABLE table_name_60 (
winner VARCHAR,
race_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the winner of the tre valli varesine race?
| SELECT winner FROM table_name_60 WHERE race_name = "tre valli varesine" | sql_create_context |
CREATE TABLE table_49437 (
"Borough" text,
"1970" real,
"1980" real,
"1990" real,
"2000" real,
"2006" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the percentage in 2006 that had less than 9% in 1970?
| SELECT AVG("2006") FROM table_49437 WHERE "1970" < '9' | wikisql |
CREATE TABLE table_name_59 (
date VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did alfonse d'amore compete?
| SELECT date FROM table_name_59 WHERE opponent = "alfonse d'amore" | sql_create_context |
CREATE TABLE table_51250 (
"Year" real,
"Date" text,
"Winner" text,
"Result" text,
"Loser" text,
"Attendance" real,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what date saw the chicago bears lose in green bay earlier than 1931... | SELECT "Date" FROM table_51250 WHERE "Loser" = 'chicago bears' AND "Location" = 'green bay' AND "Year" < '1931' | wikisql |
CREATE TABLE table_53807 (
"Track" real,
"Title" text,
"Translation" text,
"Composer" text,
"Recorded" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which track 7 title was recorded in 1959-09-15?
| SELECT "Title" FROM table_53807 WHERE "Recorded" = '1959-09-15' AND "Track" = '7' | wikisql |
CREATE TABLE table_48680 (
"Date" text,
"Time" text,
"Opponent" text,
"Score" text,
"Site" text,
"City" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the time in Baltimore?
| SELECT "Time" FROM table_48680 WHERE "City" = 'baltimore' | wikisql |
CREATE TABLE table_65865 (
"Rank" real,
"Player" text,
"County" text,
"Tally" text,
"Total" real,
"Opposition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average rank of the match where offaly was the opposition and the total was... | SELECT AVG("Rank") FROM table_65865 WHERE "Opposition" = 'offaly' AND "Total" > '9' | wikisql |
CREATE TABLE table_name_8 (
school_club_team VARCHAR,
acquisition_via VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which School/ Club Team acquired Jondan Salvador via trade?
| SELECT school_club_team FROM table_name_8 WHERE acquisition_via = "trade" AND name = "jondan salvador" | sql_create_context |
CREATE TABLE table_29458735_5 (
colonel VARCHAR,
county VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- in how many of the arkansas colomel the county was pope
| SELECT COUNT(colonel) FROM table_29458735_5 WHERE county = "Pope" | sql_create_context |
CREATE TABLE table_33827 (
"Series Ep." text,
"Episode" real,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which items in segment C is episode 160?
| SELECT "Segment C" FROM table_33827 WHERE "Episode" = '160' | wikisql |
CREATE TABLE table_46847 (
"Year" real,
"Album" text,
"Vocals" text,
"Bass" text,
"Drums" text,
"Label" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who played the bass for the Against the Grain album after 1982?
| SELECT "Bass" FROM table_46847 WHERE "Year" > '1982' AND "Album" = 'against the grain' | wikisql |
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 class_of_ser... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'PITTSBURGH' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'RENTAL CAR' | atis |
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType ORDER BY AVG(basePrice) DESC | nvbench |
CREATE TABLE table_name_81 (
location VARCHAR,
year VARCHAR,
killed VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What location has a killed of 100.9, and a year later than 1993?
| SELECT location FROM table_name_81 WHERE year > 1993 AND killed = "100.9" | sql_create_context |
CREATE TABLE qtb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT qtb.IN_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '2959284' GROUP BY qtb.IN_DIAG_DIS_NM UNION SELECT gyb.IN_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '2959284' GROUP BY gyb.IN_DIAG_DIS_NM UNION SELECT zyb.IN_DIAG_DIS_NM, AVG(zyb.PERSON_AGE) FROM zyb WHERE zyb.... | css |
CREATE TABLE table_name_62 (
draw INTEGER,
place VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the greatest draw that has 4th for place?
| SELECT MAX(draw) FROM table_name_62 WHERE place = "4th" | sql_create_context |
CREATE TABLE table_train_97 (
"id" int,
"pulmonary_disease" bool,
"systolic_blood_pressure_sbp" int,
"diabetic" string,
"psychiatric_disease" bool,
"hematologic_disease" bool,
"diastolic_blood_pressure_dbp" int,
"lung_disease" bool,
"NOUSE" float
)
-- Using valid SQLite, answer the... | SELECT * FROM table_train_97 WHERE pulmonary_disease = 1 OR lung_disease = 1 | criteria2sql |
CREATE TABLE gwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT COUNT(*) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '9519842' AND gwyjzb.IN_HOSP_DATE BETWEEN '2012-09-08' AND '2013-11-18' AND gwyjzb.CLINIC_TYPE = '门诊' UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '9519842' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2012-09-08' AND '2013-11-18' AND fgwyjzb.CLINIC_TY... | css |
CREATE TABLE table_76675 (
"Number" text,
"D\u00e9partment (or collectivity)" text,
"Pr\u00e9sident" text,
"Party" text,
"Since" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which department has Guy-Dominique Kennel as president since 2008?
| SELECT "D\u00e9partment (or collectivity)" FROM table_76675 WHERE "Since" = '2008' AND "Pr\u00e9sident" = 'guy-dominique kennel' | wikisql |
CREATE TABLE table_name_8 (
game VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which game took place on April 22?
| SELECT game FROM table_name_8 WHERE date = "april 22" | sql_create_context |
CREATE TABLE table_67542 (
"Member countries" text,
"Population" text,
"Area (km\u00b2)" text,
"GDP (billion US$)" text,
"GDP per capita (US$)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the per-capita GDP for the country with an overall... | SELECT "GDP per capita (US$)" FROM table_67542 WHERE "GDP (billion US$)" = '156.640' | wikisql |
CREATE TABLE table_43377 (
"Date" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Set 4" text,
"Set 5" text,
"Total" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Total when the Set 3 was 25-15?
| SELECT "Total" FROM table_43377 WHERE "Set 3" = '25-15' | wikisql |
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
... | SELECT DEPT_CODE, SUM(CRS_CREDIT) FROM COURSE GROUP BY DEPT_CODE | nvbench |
CREATE TABLE table_66237 (
"State (class)" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date of successor's formal installation" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When is it that successor's formal installation has... | SELECT "Date of successor's formal installation" FROM table_66237 WHERE "Vacator" = 'ross bass (d)' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2131" AND procedures.icd9_code = "3895" | mimicsql_data |
CREATE TABLE tryout (
pid number,
cname text,
ppos text,
decision text
)
CREATE TABLE player (
pid number,
pname text,
ycard text,
hs number
)
CREATE TABLE college (
cname text,
state text,
enr number
)
-- Using valid SQLite, answer the following questions for the tables ... | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cname = T2.cname WHERE T2.ppos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cname = T2.cname WHERE T2.ppos = 'mid' | spider |
CREATE TABLE customers (
customer_id number,
payment_method text,
customer_name text,
date_became_customer time,
other_customer_details text
)
CREATE TABLE products (
product_id number,
product_details text
)
CREATE TABLE customer_orders (
order_id number,
customer_id number,
o... | SELECT customer_name FROM customers WHERE payment_method <> 'Cash' | spider |
CREATE TABLE table_31463 (
"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.
-- how ma... | SELECT "High assists" FROM table_31463 WHERE "Date" = 'February 5' | wikisql |
CREATE TABLE table_54955 (
"Rank" real,
"Player" text,
"Country" text,
"Earnings( $ )" real,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player has the lowest earnings and has at least 4 wins and is ranked higher than 4?
| SELECT MIN("Earnings( $ )") FROM table_54955 WHERE "Wins" = '4' AND "Rank" > '4' | 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.BGDH FROM jybgb WHERE jybgb.JZLSH = '67577996810' AND NOT jybgb.KSMC LIKE '%科%' | css |
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Apartments ... | SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code | nvbench |
CREATE TABLE table_16313 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the pick # for the position de?
| SELECT "Pick #" FROM table_16313 WHERE "Position" = 'DE' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wa... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'anticonvulsant - valproate' AND DATETIME(treatment.treatmenttime, 'start ... | eicu |
CREATE TABLE table_name_90 (
yards VARCHAR,
in_20 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number of Yards has 32 as an In 20?
| SELECT COUNT(yards) FROM table_name_90 WHERE in_20 = 32 | sql_create_context |
CREATE TABLE table_64476 (
"Date" real,
"Doubles, I Class" real,
"Doubles, II Class" real,
"Greater Doubles" real,
"Doubles" real,
"Semidoubles" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much Total has Semidoubles smal... | SELECT COUNT("Total") FROM table_64476 WHERE "Semidoubles" < '78' AND "Doubles, II Class" < '17' | wikisql |
CREATE TABLE table_48796 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result of the game that had 20,627 fans in attendance?
| SELECT "Result" FROM table_48796 WHERE "Attendance" = '20,627' | wikisql |
CREATE TABLE table_25938117_1 (
tournament VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the tournament for dominican republic
| SELECT tournament FROM table_25938117_1 WHERE location = "Dominican Republic" | sql_create_context |
CREATE TABLE files (
formats VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the most popular file format?
| SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1 | sql_create_context |
CREATE TABLE table_8088 (
"Season" text,
"President" text,
"General Sec" text,
"Treasurer" text,
"Fixtures Sec" text,
"Social Sec Bradford" text,
"Social Sec Leeds" text,
"Media Officer" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Nam... | SELECT "Social Sec Leeds" FROM table_8088 WHERE "Fixtures Sec" = 'n/a' AND "General Sec" = 'n/a' AND "Season" = '2005–2006' | wikisql |
CREATE TABLE table_45769 (
"Rank" real,
"Name" text,
"Country" text,
"Wins" real,
"Years" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Years have a Rank larger than 2, and Wins of 2, and a Country of france?
| SELECT "Years" FROM table_45769 WHERE "Rank" > '2' AND "Wins" = '2' AND "Country" = 'france' | wikisql |
CREATE TABLE table_60427 (
"map#" real,
"County" text,
"Capital" text,
"Population (2008)" real,
"Area" text,
"Created" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the earliest created year when the map# was 10?
| SELECT MIN("Created") FROM table_60427 WHERE "map#" = '10' | wikisql |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationD... | SELECT 'close_votes', COUNT(*) FROM (SELECT COUNT(*) AS "close_votes" FROM Posts INNER JOIN Votes ON Posts.Id = Votes.PostId WHERE Votes.VoteTypeId = 6 AND NOT Posts.ClosedDate IS NULL GROUP BY Posts.Id) AS X GROUP BY 'close_votes' | sede |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC... | SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '25092297' AND hz_info.YLJGDM = '8127400' AND mzjzjlb.JZKSMC LIKE '%儿%' | css |
CREATE TABLE table_20465 (
"Rank by average" real,
"Place" text,
"Couple" text,
"Perfect 40s" real,
"Total" real,
"Number of dances" real,
"Season" real,
"Average" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the minimum number... | SELECT MIN("Perfect 40s") FROM table_20465 | wikisql |
CREATE TABLE vocals (
songid number,
bandmate number,
type text
)
CREATE TABLE instruments (
songid number,
bandmateid number,
instrument text
)
CREATE TABLE band (
id number,
firstname text,
lastname text
)
CREATE TABLE performance (
songid number,
bandmate number,
st... | SELECT DISTINCT T1.stageposition FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = "Solveig" | spider |
CREATE TABLE table_37130 (
"Driver" text,
"Season" text,
"Wins" real,
"Entries" text,
"Percentage" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the fewest number of wins in the chart for Ayrton Senna?
| SELECT MIN("Wins") FROM table_37130 WHERE "Driver" = 'ayrton senna' | wikisql |
CREATE TABLE table_72795 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position is Justin Shaw in?
| SELECT "Position" FROM table_72795 WHERE "Player" = 'Justin Shaw' | wikisql |
CREATE TABLE table_10845 (
"Tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2010 for the grand slam tournaments of 2007?
| SELECT "2010" FROM table_10845 WHERE "2007" = 'grand slam tournaments' | wikisql |
CREATE TABLE Events (
Event_ID INTEGER,
Service_ID INTEGER,
Event_Details VARCHAR(255)
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15)
)
CREATE TABLE Participants (
Participant_ID INTEGER,
Participant_Type_Code CHAR(15),
Participant_Details VARCHAR(255)
)
CREA... | SELECT Event_Details, COUNT(Event_Details) FROM Events AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY Event_Details ORDER BY COUNT(Event_Details) DESC | nvbench |
CREATE TABLE table_203_2 (
id number,
"name" text,
"mineral" text,
"opened" text,
"closed" text,
"years connected" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many quarries was slate mined at ?
| SELECT COUNT(*) FROM table_203_2 WHERE "mineral" = 'slate' | squall |
CREATE TABLE table_63111 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the final score of Game #4?
| SELECT "Score" FROM table_63111 WHERE "Game" = '4' | wikisql |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
... | SELECT COUNT(*) > 0 FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-193056' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi... | eicu |
CREATE TABLE table_name_6 (
year INTEGER,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the earliest year that T rlea took 7th place?
| SELECT MIN(year) FROM table_name_6 WHERE position = "7th" | sql_create_context |
CREATE TABLE table_name_96 (
laps INTEGER,
grid VARCHAR,
time_retired VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the driver mike hailwood has a grid greater than 12 and a Time/Retired of + 2 laps, what is the average number o... | SELECT AVG(laps) FROM table_name_96 WHERE time_retired = "+ 2 laps" AND driver = "mike hailwood" AND grid > 12 | sql_create_context |
CREATE TABLE fgwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '秦霞雰' AND t_kc22.STA_DATE BETWEEN '2002-06-24' AND '2015-12-19' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwyjz... | css |
CREATE TABLE table_dev_37 (
"id" int,
"gender" string,
"hemoglobin_a1c_hba1c" float,
"diabetes_mellitus" bool,
"dysglycemia" bool,
"creatinine_clearance_cl" float,
"estimated_glomerular_filtration_rate_egfr" int,
"fasting_plasma_glucose" int,
"serum_creatinine" float,
"fasting_gl... | SELECT * FROM table_dev_37 WHERE estimated_glomerular_filtration_rate_egfr < 60 OR (serum_creatinine >= 1.4 AND gender = 'male') OR (serum_creatinine >= 1.3 AND gender = 'female') | criteria2sql |
CREATE TABLE table_38216 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which competition was in Dubai?
| SELECT "Competition" FROM table_38216 WHERE "Venue" = 'dubai' | wikisql |
CREATE TABLE table_43732 (
"Internet Plan" text,
"Downstream" text,
"Upstream" text,
"Bandwidth Included" text,
"Price" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the plan that has a downstream rate of 4,096 kbit?
| SELECT "Internet Plan" FROM table_43732 WHERE "Downstream" = '4,096 kbit' | wikisql |
CREATE TABLE table_16928 (
"Governorate" text,
"Name in Russian" text,
"Name in Polish" text,
"Seat" text,
"Area, in thousands of km 2" real,
"Population, in thousands,( 1905 )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- governs an area with... | SELECT "Area, in thousands of km 2" FROM table_16928 WHERE "Name in Russian" = 'Плоцкая губерния' | wikisql |
CREATE TABLE city (
City_ID int,
Official_Name text,
Status text,
Area_km_2 real,
Population real,
Census_Ranking text
)
CREATE TABLE farm (
Farm_ID int,
Year int,
Total_Horses real,
Working_Horses real,
Total_Cattle real,
Oxen real,
Bulls real,
Cows real,
Pi... | SELECT Official_Name, COUNT(Official_Name) FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY Official_Name | nvbench |
CREATE TABLE table_206217_2 (
periselene__km_ VARCHAR,
period__h_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every value for periselene if period is 4.947432?
| SELECT periselene__km_ FROM table_206217_2 WHERE period__h_ = "4.947432" | sql_create_context |
CREATE TABLE table_43914 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which college had a pick in a round under 7, with a pick number 13 and overall was under... | SELECT "College" FROM table_43914 WHERE "Round" < '7' AND "Overall" < '186' AND "Pick" = '13' | wikisql |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JO... | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID DESC | nvbench |
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 (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 = '010-29520' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi... | eicu |
CREATE TABLE table_59792 (
"Year" real,
"Country/Territory" text,
"Miss International" text,
"National title" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the earliest year the philippines won?
| SELECT MIN("Year") FROM table_59792 WHERE "Country/Territory" = 'philippines' | wikisql |
CREATE TABLE table_name_68 (
recnet VARCHAR,
city_of_license VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the recnet when the city of license is peterborough?
| SELECT recnet FROM table_name_68 WHERE city_of_license = "peterborough" | sql_create_context |
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE field (
fieldid int... | SELECT DISTINCT writes.paperid FROM author, writes WHERE author.authorname = 'srinivasan iyer' AND writes.authorid = author.authorid | scholar |
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 flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE compartment_cla... | 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, state WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWARK' AND date_day.day_number = 23 AND date_day.month_number = ... | atis |
CREATE TABLE table_name_68 (
pick VARCHAR,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total pick number of Virginia Tech?
| SELECT COUNT(pick) FROM table_name_68 WHERE school = "virginia tech" | sql_create_context |
CREATE TABLE table_24616 (
"Original number" text,
"UIC number" text,
"Name" text,
"Constructer" text,
"constructor number" real,
"Year" real,
"Withdrawn" text,
"Kilometers worked" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 9/07... | SELECT "Original number" FROM table_24616 WHERE "Withdrawn" = '9/07/1999' | wikisql |
CREATE TABLE table_123462_2 (
_number_of_seats_won VARCHAR,
_number_of_total_votes VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times was the # of total votes 2582322?
| SELECT COUNT(_number_of_seats_won) FROM table_123462_2 WHERE _number_of_total_votes = 2582322 | sql_create_context |
CREATE TABLE table_name_62 (
time VARCHAR,
group VARCHAR,
race VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the time for the G2 group at the Hobartville Stakes?
| SELECT time FROM table_name_62 WHERE group = "g2" AND race = "hobartville stakes" | sql_create_context |
CREATE TABLE table_58298 (
"Team" text,
"Make" text,
"Driver" text,
"Sponsor" text,
"Car Owner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who drives for the sponsor w.h. bolin?
| SELECT "Driver" FROM table_58298 WHERE "Sponsor" = 'w.h. bolin' | wikisql |
CREATE TABLE table_name_66 (
date VARCHAR,
winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Date, when Winner is 'Murilo Figueiredo'?
| SELECT date FROM table_name_66 WHERE winner = "murilo figueiredo" | sql_create_context |
CREATE TABLE classroom (
building VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Count the number of rooms that are not in the Lamberton building.
| SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton' | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.