instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_98 (
elena_băsescu VARCHAR,
polling_firm VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the elena basescu when the poling firm of gallup?
| SELECT elena_băsescu FROM table_name_98 WHERE polling_firm = "gallup" | sql_create_context |
CREATE TABLE table_25628 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" text,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the series ... | SELECT "Team" FROM table_25628 WHERE "Poles" = '1' AND "Series" = 'ADAC GT Masters' | wikisql |
CREATE TABLE table_25202 (
"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 COUNT("Date") FROM table_25202 WHERE "Score" = 'L 85–86 (OT)' | wikisql |
CREATE TABLE table_67690 (
"Nationality" text,
"Cambridge United career" text,
"Games" real,
"Drawn" real,
"Lost" real,
"% won" text,
"Pts/game" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many draws have a Cambridge United career of ... | SELECT COUNT("Drawn") FROM table_67690 WHERE "Cambridge United career" = '2008–2009' AND "Lost" < '13' | wikisql |
CREATE TABLE table_61611 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score of the player with a To Par of +1 from Spain?
| SELECT "Score" FROM table_61611 WHERE "To par" = '+1' AND "Country" = 'spain' | wikisql |
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER... | SELECT city_code, COUNT(*) FROM Student GROUP BY city_code ORDER BY COUNT(*) | nvbench |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TAB... | SELECT Name, COUNT(*) FROM (SELECT Name FROM Badges WHERE UserId = '22656' AND TagBased = '0') AS result GROUP BY Name HAVING COUNT(*) > 1 | sede |
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 person_info.XM 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 jybgb.BGDH = '79463619545' | css |
CREATE TABLE table_8539 (
"Tournament" text,
"Surface" text,
"Week" text,
"Winner and score" text,
"Finalist" text,
"Semifinalists" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Semifinalist has a Tournament of stockholm?
| SELECT "Semifinalists" FROM table_8539 WHERE "Tournament" = 'stockholm' | wikisql |
CREATE TABLE table_5716 (
"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 attendance at the game on December 11, 1966?
| SELECT "Attendance" FROM table_5716 WHERE "Date" = 'december 11, 1966' | wikisql |
CREATE TABLE table_204_195 (
id number,
"team" text,
"home city" text,
"stadium" text,
"capacity" number,
"last season" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the next stadium after begin arena ?
| SELECT "stadium" FROM table_204_195 WHERE id = (SELECT id FROM table_204_195 WHERE "stadium" = 'begin arena') + 1 | squall |
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 HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(EMPLOYEE_ID) DESC | nvbench |
CREATE TABLE table_203_248 (
id number,
"code" text,
"year" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- is the e code less than 1950 ?
| SELECT (SELECT "year" FROM table_203_248 WHERE "code" = 'e') < 1950 | squall |
CREATE TABLE table_name_77 (
nationality VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the nationality of the players with a position of g?
| SELECT nationality FROM table_name_77 WHERE position = "g" | 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 AVG(zyb.MED_CLINIC_ID) FROM zyb WHERE zyb.MED_SER_ORG_NO = '小儿肛肠外科' AND zyb.IN_HOSP_DAYS BETWEEN '2016-12-29' AND '2019-04-09' AND zyb.IN_DIAG_DIS_NM = 'P15.892' | css |
CREATE TABLE table_26454128_4 (
Adjusted INTEGER,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the most adjusted points for Great Britain?
| SELECT MAX(Adjusted) AS points FROM table_26454128_4 WHERE country = "Great Britain" | sql_create_context |
CREATE TABLE table_name_61 (
capacity VARCHAR,
club VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total capacity for the Leicester Tigers?
| SELECT COUNT(capacity) FROM table_name_61 WHERE club = "leicester tigers" | sql_create_context |
CREATE TABLE table_65508 (
"Club" text,
"League/Division" text,
"Home Ground" text,
"Location" text,
"Position in 2012-13" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Home Ground with the Location n/a for the Club kcdrsc?
| SELECT "Home Ground" FROM table_65508 WHERE "Location" = 'n/a' AND "Club" = 'kcdrsc' | wikisql |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,... | SELECT YEAR(v.CreationDate), COUNT(*) AS total, SUM(CASE WHEN v.VoteTypeId = 2 THEN 1 ELSE 0 END) AS upvotes, SUM(CASE WHEN v.VoteTypeId = 3 THEN 1 ELSE 0 END) AS downvotes, SUM(CASE WHEN v.VoteTypeId = 2 AND t.TagName = 'c#' THEN 1 ELSE 0 END) AS "c#_up_votes", SUM(CASE WHEN v.VoteTypeId = 3 AND t.TagName = 'c#' THEN ... | sede |
CREATE TABLE table_name_92 (
executions_in_persona VARCHAR,
number_of_autos_da_fé_with_known_sentences VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many executions in persona have a number with known sentences of 2 (1543 1544)?
| SELECT executions_in_persona FROM table_name_92 WHERE number_of_autos_da_fé_with_known_sentences = "2 (1543–1544)" | sql_create_context |
CREATE TABLE table_79946 (
"Date" text,
"City" text,
"Event" text,
"Winner" text,
"Prize" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the event in Dublin?
| SELECT "Date" FROM table_79946 WHERE "City" = 'dublin' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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 T... | SELECT FIRST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ATRIAL SEPTAL DEFECT\MITRAL VALVE REPLACEMENT;REPAIR ATRIAL-SEPTAL DEFECT/SDA" AND demographic.dob_year < "2129" | mimicsql_data |
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 hz_info (
KH text,
KLX number... | SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_inf... | css |
CREATE TABLE table_44984 (
"Name" text,
"Latitude" text,
"Longitude" text,
"Diameter (km)" real,
"Year named" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Longitude has a Latitude of 73.0s, and a Name of aibarchin planitia?
| SELECT "Longitude" FROM table_44984 WHERE "Latitude" = '73.0s' AND "Name" = 'aibarchin planitia' | wikisql |
CREATE TABLE table_name_72 (
season INTEGER,
apps VARCHAR,
country VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which season did Fc Pakhtakor Tashkent represent the country of Uzbekistan with more than 6 apps?
| SELECT MAX(season) FROM table_name_72 WHERE country = "uzbekistan" AND team = "fc pakhtakor tashkent" AND apps > 6 | sql_create_context |
CREATE TABLE table_62883 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which competition(s) did Ilju t enko jump 1.90 m?
| SELECT "Competition" FROM table_62883 WHERE "Notes" = '1.90 m' | wikisql |
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ACUTE SUBDURAL HEMATOMA" AND demographic.age < "83" | mimicsql_data |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_items (
row_id number,
itemid ... | SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 4 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd... | mimic_iii |
CREATE TABLE table_51867 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the record of the game on 5 February 2008?
| SELECT "Record" FROM table_51867 WHERE "Date" = '5 february 2008' | wikisql |
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 prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "1821" AND procedures.long_title = "Other gastroenterostomy without gastrectomy" | mimicsql_data |
CREATE TABLE table_name_19 (
car__number INTEGER,
pos VARCHAR,
make VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Car # has a Make of toyota, and a Driver of mike skinner, and a Pos larger than 3?
| SELECT MAX(car__number) FROM table_name_19 WHERE make = "toyota" AND driver = "mike skinner" AND pos > 3 | sql_create_context |
CREATE TABLE table_72722 (
"Week #" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Order #" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the order number for the beatles and result is safe
| SELECT "Order #" FROM table_72722 WHERE "Original artist" = 'The Beatles' AND "Result" = 'Safe' | wikisql |
CREATE TABLE table_name_35 (
date VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the date for 2004
| SELECT date FROM table_name_35 WHERE year = "2004" | sql_create_context |
CREATE TABLE table_46108 (
"Year" real,
"English title" text,
"Danish title" text,
"Director" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the submission Year of the Film The Dark Side of the Moon directed by Erik Clausen?
| SELECT SUM("Year") FROM table_46108 WHERE "Director" = 'erik clausen' AND "English title" = 'the dark side of the moon' | wikisql |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT Founder, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY SUM(Price) DESC | nvbench |
CREATE TABLE table_name_22 (
population___2010__ INTEGER,
territory VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the population of Puerto Rico in 2010?
| SELECT MAX(population___2010__) FROM table_name_22 WHERE territory = "puerto rico" | sql_create_context |
CREATE TABLE table_15275060_1 (
old_bulgarian_names VARCHAR,
Yanuari VARCHAR,
Transliteration VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the old bulgarian names for yanuari
| SELECT old_bulgarian_names FROM table_15275060_1 WHERE BULGARIAN_NAME(Transliteration) = Yanuari | sql_create_context |
CREATE TABLE table_name_75 (
home_team VARCHAR,
date VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the home team on 31 January 1951 when away team was Sheffield United?
| SELECT home_team FROM table_name_75 WHERE date = "31 january 1951" AND away_team = "sheffield united" | sql_create_context |
CREATE TABLE actor (
Character VARCHAR,
age VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the characters of actors in descending order of age?
| SELECT Character FROM actor ORDER BY age DESC | sql_create_context |
CREATE TABLE table_name_76 (
date VARCHAR,
catalog VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date of Catalog 573 194-2?
| SELECT date FROM table_name_76 WHERE catalog = "573 194-2" | sql_create_context |
CREATE TABLE table_name_19 (
bronze INTEGER,
gold VARCHAR,
silver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of bronzes for countries with 1 gold and under 1 silver?
| SELECT SUM(bronze) FROM table_name_19 WHERE gold = 1 AND silver < 1 | sql_create_context |
CREATE TABLE table_64049 (
"Rank" real,
"Lane" real,
"Athlete" text,
"Nationality" text,
"Time" real,
"React" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What the rank of the Virgin Islands athlete with react under 0.168?
| SELECT "Rank" FROM table_64049 WHERE "React" < '0.168' AND "Nationality" = 'virgin islands' | wikisql |
CREATE TABLE table_25920798_2 (
eliminated VARCHAR,
finish VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the left day 9 finish for eliminated
| SELECT eliminated FROM table_25920798_2 WHERE finish = "Left Day 9" | sql_create_context |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
... | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMO... | atis |
CREATE TABLE table_name_34 (
fcc_info VARCHAR,
frequency_mhz VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the FCC info for frequency Mhz of 95.3 fm
| SELECT fcc_info FROM table_name_34 WHERE frequency_mhz = "95.3 fm" | sql_create_context |
CREATE TABLE table_name_67 (
team VARCHAR,
rate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team has a 94.1 rating?
| SELECT team FROM table_name_67 WHERE rate = "94.1" | sql_create_context |
CREATE TABLE table_1143966_1 (
won VARCHAR,
standing VARCHAR,
games VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games were won with 2nd oha was standing and there were 62 games?
| SELECT won FROM table_1143966_1 WHERE standing = "2nd OHA" AND games = 62 | sql_create_context |
CREATE TABLE table_204_91 (
id number,
"year" number,
"original title" text,
"english title" text,
"role" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what film was malberg in before ` william tell and son ' ?
| SELECT "english title" FROM table_204_91 WHERE id = (SELECT id FROM table_204_91 WHERE "english title" = 'william tell and son') - 1 | squall |
CREATE TABLE Projects (
project_id INTEGER,
organisation_id INTEGER,
project_details VARCHAR(255)
)
CREATE TABLE Research_Outcomes (
outcome_code VARCHAR(10),
outcome_description VARCHAR(255)
)
CREATE TABLE Document_Types (
document_type_code VARCHAR(10),
document_description VARCHAR(255)
... | SELECT T2.organisation_details, T1.organisation_id FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_details ORDER BY T2.organisation_details DESC | nvbench |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
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
... | 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 = 'MILWAUKEE' AND date_day.day_number = 25 AND date_day.month_number = 6 AN... | atis |
CREATE TABLE table_3476 (
"District" real,
"Representative" text,
"Party" text,
"Residence" text,
"First Elected" text,
"Term Limited" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If first elected on 2003 (appt.), when was the term limited?
| SELECT MIN("Term Limited") FROM table_3476 WHERE "First Elected" = '2003 (Appt.)' | wikisql |
CREATE TABLE table_57388 (
"Region" text,
"Host" text,
"Venue" text,
"City" text,
"State" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What region is the host university of southern california located?
| SELECT "Region" FROM table_57388 WHERE "Host" = 'university of southern california' | wikisql |
CREATE TABLE table_204_186 (
id number,
"season" text,
"tier" number,
"division" text,
"place" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many seasons are there ?
| SELECT COUNT("season") FROM table_204_186 | squall |
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 t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) AND DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')... | eicu |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.days_stay > "16" | mimicsql_data |
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 COUNT(*) FROM zyjzjlb WHERE zyjzjlb.JZKSMC = '核酸检测' AND zyjzjlb.RYDJSJ BETWEEN '2001-08-03' AND '2006-01-22' | css |
CREATE TABLE table_24489 (
"Week of" text,
"Tournament" text,
"Champion" text,
"Runner-up" text,
"Semifinalists" text,
"Quarterfinalists" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the runner up for the champion of john mcenroe 6 2, 6... | SELECT "Runner-up" FROM table_24489 WHERE "Champion" = 'John McEnroe 6–2, 6–3' | wikisql |
CREATE TABLE mzb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT qtb.FLX_MED_ORG_ID FROM qtb WHERE qtb.MED_CLINIC_ID = '06309706061' UNION SELECT gyb.FLX_MED_ORG_ID FROM gyb WHERE gyb.MED_CLINIC_ID = '06309706061' UNION SELECT zyb.FLX_MED_ORG_ID FROM zyb WHERE zyb.MED_CLINIC_ID = '06309706061' UNION SELECT mzb.FLX_MED_ORG_ID FROM mzb WHERE mzb.MED_CLINIC_ID = '06309706061' | css |
CREATE TABLE table_name_84 (
place VARCHAR,
country VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What did United States place when the player was Raymond Floyd?
| SELECT place FROM table_name_84 WHERE country = "united states" AND player = "raymond floyd" | sql_create_context |
CREATE TABLE table_2731431_1 (
col_location VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the col location for the location of france / italy?
| SELECT col_location FROM table_2731431_1 WHERE location = "France / Italy" | sql_create_context |
CREATE TABLE documents_with_expenses (
document_id number,
budget_type_code text,
document_details text
)
CREATE TABLE accounts (
account_id number,
statement_id number,
account_details text
)
CREATE TABLE documents (
document_id number,
document_type_code text,
project_id number,
... | SELECT T1.statement_id, T2.statement_details, T1.account_details FROM accounts AS T1 JOIN statements AS T2 ON T1.statement_id = T2.statement_id | spider |
CREATE TABLE table_name_56 (
record VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Record has a Game of 61?
| SELECT record FROM table_name_56 WHERE game = 61 | sql_create_context |
CREATE TABLE table_69348 (
"Name" text,
"Country" text,
"Type" text,
"Moving from" text,
"Transfer window" text,
"Ends" real,
"Transfer fee" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What player was moving from manchester united?
| SELECT "Name" FROM table_69348 WHERE "Moving from" = 'manchester united' | wikisql |
CREATE TABLE table_21367 (
"Official Name" text,
"Status" text,
"Area km 2" text,
"Population" real,
"Census Ranking" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- With the official name Quispamsis, what is the census ranking?
| SELECT "Census Ranking" FROM table_21367 WHERE "Official Name" = 'Quispamsis' | wikisql |
CREATE TABLE table_56973 (
"Round" real,
"Pick" real,
"Player drafted or Traded for" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average pick of Florida State?
| SELECT AVG("Pick") FROM table_56973 WHERE "College" = 'florida state' | 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 zyjybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN zyjybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '52622012' AND NOT zyjybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM ... | css |
CREATE TABLE table_name_15 (
score VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Score, when Team is '@ Memphis'?
| SELECT score FROM table_name_15 WHERE team = "@ memphis" | sql_create_context |
CREATE TABLE table_dev_46 (
"id" int,
"ogtt" int,
"systolic_blood_pressure_sbp" int,
"neuromuscular_disease" bool,
"renal_disease" bool,
"hepatic_disease" bool,
"active_oncologic_disease" bool,
"hematologic_disease" bool,
"diastolic_blood_pressure_dbp" int,
"muscular_disease" boo... | SELECT * FROM table_dev_46 WHERE hepatic_disease = 1 OR renal_disease = 1 OR muscular_disease = 1 OR neuromuscular_disease = 1 OR hematologic_disease = 1 OR active_oncologic_disease = 1 | criteria2sql |
CREATE TABLE table_204_104 (
id number,
"title" text,
"genre" text,
"sub\u00addivisions" text,
"libretto" text,
"premiere date" text,
"place, theatre" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many were released af... | SELECT COUNT(*) FROM table_204_104 WHERE "premiere date" > (SELECT "premiere date" FROM table_204_104 WHERE "title" = "zenone, imperator d'oriente") | squall |
CREATE TABLE table_name_89 (
number INTEGER,
opponent VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number with the opponent Fokker D.vii have with a time of 1655?
| SELECT SUM(number) FROM table_name_89 WHERE opponent = "fokker d.vii" AND time = 1655 | sql_create_context |
CREATE TABLE table_name_93 (
sport VARCHAR,
date VARCHAR,
loser VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What sport was played before 2006 with a loser of france b?
| SELECT sport FROM table_name_93 WHERE date < 2006 AND loser = "france b" | sql_create_context |
CREATE TABLE table_name_29 (
time VARCHAR,
date VARCHAR,
game VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Game larger than 1, and a Location of comiskey park (i), and a Date of October 9 happened at what time?
| SELECT time FROM table_name_29 WHERE game > 1 AND location = "comiskey park (i)" AND date = "october 9" | sql_create_context |
CREATE TABLE table_62920 (
"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 on 9 october 2012?
| SELECT "Result" FROM table_62920 WHERE "Date" = '9 october 2012' | wikisql |
CREATE TABLE table_25730 (
"District" text,
"SC/ST" text,
"Nairs" text,
"Ezhavas" text,
"Syrian Christians" text,
"Latin Christians" text,
"Muslims" text,
"Others" text,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the... | SELECT "District" FROM table_25730 WHERE "Others" = '18.3' | wikisql |
CREATE TABLE table_669 (
"Year" real,
"Finish position" text,
"1st day" text,
"2nd day" text,
"3rd day" text,
"4th Day" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many 3rd day with 2nd day being bumped by magdalene
| SELECT COUNT("3rd day") FROM table_669 WHERE "2nd day" = 'bumped by Magdalene' | wikisql |
CREATE TABLE table_69804 (
"Year" real,
"Date" text,
"Winner" text,
"Result" text,
"Loser" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the game played at Gillette Stadium with a score of 40-21?
| SELECT "Date" FROM table_69804 WHERE "Location" = 'gillette stadium' AND "Result" = '40-21' | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2200" AND prescriptions.drug = "Aluminum Hydroxide Suspension" | mimicsql_data |
CREATE TABLE table_49002 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What i... | SELECT "Team" FROM table_49002 WHERE "High points" = 'rashard lewis , mickaël piétrus (17)' | wikisql |
CREATE TABLE table_24972 (
"#" text,
"Spacecraft" text,
"Spacewalkers" text,
"Start ( UTC )" text,
"End (UTC)" text,
"Duration" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the end (UTC) if the duration is 6 hours, 55 minutes?
| SELECT "End (UTC)" FROM table_24972 WHERE "Duration" = '6 hours, 55 minutes' | wikisql |
CREATE TABLE table_4672 (
"Region" text,
"Host" text,
"Venue" text,
"City" text,
"State" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What city is University Gym (Gold Mine) in?
| SELECT "City" FROM table_4672 WHERE "Venue" = 'university gym (gold mine)' | wikisql |
CREATE TABLE table_49033 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" text,
"Best" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Team, when Qual 1 is 1:16.417?
| SELECT "Team" FROM table_49033 WHERE "Qual 1" = '1:16.417' | wikisql |
CREATE TABLE table_name_81 (
team_1 VARCHAR,
team_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which was the team 1 that had a team 2 which was avigliano (basilicata)?
| SELECT team_1 FROM table_name_81 WHERE team_2 = "avigliano (basilicata)" | sql_create_context |
CREATE TABLE table_name_79 (
flattening_ratio VARCHAR,
equatorial_diameter VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Flattening ratio associated with the Equatorial diameter of 49,528km?
| SELECT flattening_ratio FROM table_name_79 WHERE equatorial_diameter = "49,528km" | sql_create_context |
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 gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '孙欣艳' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 532.62) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '孙欣艳' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FRO... | css |
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 SUM(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 = '035-2205')) AND intakeoutput.cellpath LIKE '%out... | eicu |
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 mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND ... | css |
CREATE TABLE table_65741 (
"Original NFL team" text,
"Player" text,
"Pos." text,
"College" text,
"Conf." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Original NFL team of the CB Player?
| SELECT "Original NFL team" FROM table_65741 WHERE "Pos." = 'cb' | wikisql |
CREATE TABLE table_name_71 (
top_25 INTEGER,
top_5 INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of top-25s for events with more than 1 top-5?
| SELECT SUM(top_25) FROM table_name_71 WHERE top_5 > 1 | sql_create_context |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE Tags (
Id number,
TagName text,
C... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS Rank, Id AS "user_link", Reputation, Views, UpVotes, DownVotes, WebsiteUrl, Location FROM Users WHERE LOWER(Location) LIKE LOWER('##City:string##') AND Reputation > 1 ORDER BY Reputation DESC | sede |
CREATE TABLE checking (
custid number,
balance number
)
CREATE TABLE accounts (
custid number,
name text
)
CREATE TABLE savings (
custid number,
balance number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the checking balance of the accou... | SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%' | spider |
CREATE TABLE zyjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
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,
... | SELECT COUNT(*) FROM zyjybgb WHERE zyjybgb.YLJGDM = '7759937' AND zyjybgb.BGRQ BETWEEN '2004-07-03' AND '2018-11-11' UNION SELECT COUNT(*) FROM mzjybgb WHERE mzjybgb.YLJGDM = '7759937' AND mzjybgb.BGRQ BETWEEN '2004-07-03' AND '2018-11-11' | css |
CREATE TABLE table_28475 (
"Character" text,
"Played by" text,
"Season 1" real,
"Season 2" real,
"Season 3" real,
"Season 4" real,
"First Appearance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many season 3 appearances by the charact... | SELECT MIN("Season 3") FROM table_28475 WHERE "Played by" = 'Stefan van Ray' | wikisql |
CREATE TABLE table_name_19 (
high_points VARCHAR,
high_rebounds VARCHAR,
game VARCHAR,
location_attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is High Points, when Game is less than 82, when Location Attendance is 'Quicken Loans Arena... | SELECT high_points FROM table_name_19 WHERE game < 82 AND location_attendance = "quicken loans arena 20,562" AND high_rebounds = "žydrūnas ilgauskas (13)" | sql_create_context |
CREATE TABLE table_65852 (
"Season" real,
"Level" text,
"Division" text,
"Section" text,
"Administration" text,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What section were they in when there were tier 2 in 1996?
| SELECT "Section" FROM table_65852 WHERE "Level" = 'tier 2' AND "Season" = '1996' | wikisql |
CREATE TABLE departments (
department_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Display all the information about the department Marketing.
| SELECT * FROM departments WHERE department_name = 'Marketing' | sql_create_context |
CREATE TABLE table_203_874 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times was first place listed as the position ?
| SELECT COUNT(*) FROM table_203_874 WHERE "position" = 1 | squall |
CREATE TABLE table_20471 (
"Cartridge" text,
"Bullet weight" text,
"Muzzle velocity" text,
"Muzzle energy" text,
"Source" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When using a .375 Winchester, what is the muzzle energy?
| SELECT "Muzzle energy" FROM table_20471 WHERE "Cartridge" = '.375 Winchester' | 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 COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '68819999' AND t_kc22.STA_DATE BETWEEN '2001-08-16' AND '2006-10-01' AND t_kc22.SOC_SRT_DIRE_NM = '盐酸美金刚口服溶液' | css |
CREATE TABLE table_29034 (
"Series #" real,
"Episode #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which original air date had... | SELECT "Original air date" FROM table_29034 WHERE "U.S. viewers (millions)" = '0.871' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.