instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
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.admission_location = "TRSF WITHIN THIS FACILITY" AND lab.itemid = "51132" | mimicsql_data |
CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area TEXT,
isAVA TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases IN... | SELECT Year, AVG(Price) FROM wine GROUP BY Year ORDER BY Year DESC | nvbench |
CREATE TABLE table_name_34 (
money___ VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the money for argentina?
| SELECT COUNT(money___) AS $__ FROM table_name_34 WHERE country = "argentina" | sql_create_context |
CREATE TABLE geographic (
city_name varchar,
county varchar,
region varchar
)
CREATE TABLE location (
restaurant_id int,
house_number int,
street_name varchar,
city_name varchar
)
CREATE TABLE restaurant (
id int,
name varchar,
food_type varchar,
city_name varchar,
rati... | SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5 | restaurants |
CREATE TABLE table_204_994 (
id number,
"date" text,
"time" text,
"opponent#" text,
"rank#" text,
"site" text,
"tv" text,
"result" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- whats after october 29 and what is... | SELECT "date", "result" FROM table_204_994 WHERE id = (SELECT id FROM table_204_994 WHERE "date" = 'october 29') + 1 | squall |
CREATE TABLE table_15391 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the to par that has bill collins as the player?
| SELECT "To par" FROM table_15391 WHERE "Player" = 'bill collins' | wikisql |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTask... | SELECT 'https://stackoverflow.com/questions/' + CAST('posts'.ID AS TEXT(11)), Title, Tags, Score, ViewCount, AnswerCount, CreationDate FROM Posts WHERE CreationDate > '2019/01/01' AND Tags LIKE '%asp.net-core%' ORDER BY Score DESC, ViewCount | sede |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_nam... | SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'ptt') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51200) AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CURRENT_TI... | mimic_iii |
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 procedures.icd9_code = "4575" | mimicsql_data |
CREATE TABLE table_name_93 (
listed VARCHAR,
borough VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the listings in the Valdez-cordova (census area) Borough?
| SELECT listed FROM table_name_93 WHERE borough = "valdez-cordova (census area)" | sql_create_context |
CREATE TABLE table_69721 (
"Season" text,
"Team" text,
"Country" text,
"Division" real,
"Apps" real,
"Goals" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of division for apps more than 5 for greece
| SELECT COUNT("Division") FROM table_69721 WHERE "Apps" > '5' AND "Country" = 'greece' | wikisql |
CREATE TABLE table_40040 (
"Country" text,
"Local name" text,
"Host" text,
"Network" text,
"Date premiered" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Local name has a Network of tvn?
| SELECT "Local name" FROM table_40040 WHERE "Network" = 'tvn' | wikisql |
CREATE TABLE table_19002 (
"Position" real,
"Artist" text,
"Song title" text,
"Highest position" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the minimum points with highest position being 1
| SELECT MIN("Points") FROM table_19002 WHERE "Highest position" = '1' | wikisql |
CREATE TABLE zyjzjlb_jybgb (
YLJGDM_ZYJZJLB text,
BGDH number,
YLJGDM number
)
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 n... | SELECT COUNT(*) FROM zyjzjlb WHERE zyjzjlb.YLJGDM = '7339851' AND zyjzjlb.RYDJSJ BETWEEN '2007-11-16' AND '2012-09-12' AND DATEDIFF(zyjzjlb.CYSJ, zyjzjlb.RYSJ) > 18 | css |
CREATE TABLE table_2008069_2 (
pinyin VARCHAR,
conventional VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the pinyin for mazar
| SELECT pinyin FROM table_2008069_2 WHERE conventional = "Mazar" | sql_create_context |
CREATE TABLE writer (
wid int,
gender text,
name text,
nationality text,
birth_city text,
birth_year int
)
CREATE TABLE written_by (
id int,
msid int,
wid int
)
CREATE TABLE director (
did int,
gender text,
name text,
nationality text,
birth_city text,
birth... | SELECT birth_year FROM writer WHERE name = 'Kevin Spacey' | imdb |
CREATE TABLE table_10868 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the low point total for arrows a22 chassis?
| SELECT MIN("Points") FROM table_10868 WHERE "Chassis" = 'arrows a22' | wikisql |
CREATE TABLE wdmzjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH number,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZD... | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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.BGDH = jyjgzbb.BGDH WHERE hz_info.RYBH = '... | css |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TA... | SELECT COUNT(*) FROM Posts, Comments WHERE Comments.PostId = Posts.Id AND Comments.CreationDate < Posts.CreationDate | sede |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
... | SELECT chartevents.charttime 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 = 23721)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial... | mimic_iii |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T2.Name, COUNT(*) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY COUNT(*) | nvbench |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "DEAD/EXPIRED" AND procedures.short_title = "Cardiac mapping" | mimicsql_data |
CREATE TABLE table_name_69 (
venue VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the venue when the away team was Hawthorn?
| SELECT venue FROM table_name_69 WHERE away_team = "hawthorn" | 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.gender = "F" AND procedures.icd9_code = "4105" | mimicsql_data |
CREATE TABLE table_name_73 (
percentage VARCHAR,
place VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Percentage has a Place of 5?
| SELECT percentage FROM table_name_73 WHERE place = 5 | sql_create_context |
CREATE TABLE table_27091128_2 (
replaced_by VARCHAR,
date_of_appointment VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which manager was appointed on 08.06.2010?
| SELECT replaced_by FROM table_27091128_2 WHERE date_of_appointment = "08.06.2010" | sql_create_context |
CREATE TABLE table_2135222_2 (
area VARCHAR,
population VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many areas have a population of 703379?
| SELECT COUNT(area) FROM table_2135222_2 WHERE population = 703379 | sql_create_context |
CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
Attorney_General text,
US_Senate text
)
CREATE TABLE county (
County_Id int,
County_name text,
Population real,
Zip_code text
)
CREATE TABLE election (
... | SELECT Comptroller, COUNT(Comptroller) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 GROUP BY Comptroller | nvbench |
CREATE TABLE table_name_42 (
date VARCHAR,
week INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which date has a week larger than 14?
| SELECT date FROM table_name_42 WHERE week > 14 | sql_create_context |
CREATE TABLE table_name_16 (
top_25 VARCHAR,
top_5 VARCHAR,
top_10 VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of top-25 in the Masters Tournament, which has 0 top-10 and more than 0 top-5?
| SELECT COUNT(top_25) FROM table_name_16 WHERE top_10 = 0 AND tournament = "masters tournament" AND top_5 > 0 | sql_create_context |
CREATE TABLE table_59886 (
"Pianist" text,
"Conductor" text,
"Record Company" text,
"Year of Recording" real,
"Format" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What record company did conductor Mikhail Snitko record for after 1996?
| SELECT "Record Company" FROM table_59886 WHERE "Year of Recording" > '1996' AND "Conductor" = 'mikhail snitko' | wikisql |
CREATE TABLE table_5241 (
"Date" text,
"Label" text,
"Region" text,
"Format" text,
"Catalog" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What catalog has june 1990 as the date?
| SELECT "Catalog" FROM table_5241 WHERE "Date" = 'june 1990' | wikisql |
CREATE TABLE table_13607 (
"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 years have a 4th Day of bumped wolfson?
| SELECT COUNT("Year") FROM table_13607 WHERE "4th Day" = 'bumped wolfson' | wikisql |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostHistoryTypes (
I... | SELECT * FROM Users | sede |
CREATE TABLE table_39100 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Game site has an Opponent of Miami Dolphins?
| SELECT "Game site" FROM table_39100 WHERE "Opponent" = 'miami dolphins' | wikisql |
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 jyjgzbb (
BGDH text,
BGRQ tim... | SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb 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 person_info_hz_info.KH = hz_info.KH AND pers... | css |
CREATE TABLE table_26368963_1 (
under_15 VARCHAR,
under_17 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the under-15 when Moises Galvez was the under-17?
| SELECT under_15 FROM table_26368963_1 WHERE under_17 = "Moises Galvez" | sql_create_context |
CREATE TABLE table_17244483_1 (
grid VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What grid did the driver who earned 19 points start at?
| SELECT grid FROM table_17244483_1 WHERE points = "19" | sql_create_context |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
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 n... | SELECT mzjzjlb.JZZDBM, mzjzjlb.JZZDSM FROM mzjzjlb WHERE mzjzjlb.JZLSH = '91671154792' | css |
CREATE TABLE table_name_92 (
release_date VARCHAR,
director VARCHAR,
production_num VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Release date has a Director of tom palmer, and a Production Num larger than 5956?
| SELECT release_date FROM table_name_92 WHERE director = "tom palmer" AND production_num > 5956 | sql_create_context |
CREATE TABLE table_name_98 (
percent_decline_from_peak_population VARCHAR,
peak_population__year_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the percent decline from peak population when the peak population (year) is 178320 (1960)?
| SELECT percent_decline_from_peak_population FROM table_name_98 WHERE peak_population__year_ = "178320 (1960)" | sql_create_context |
CREATE TABLE table_203_600 (
id number,
"rank" text,
"country" text,
"winners" number,
"runners-up" number,
"finals total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the total runners up from sweden ?
| SELECT "runners-up" FROM table_203_600 WHERE "country" = 'sweden' | squall |
CREATE TABLE table_name_95 (
pos VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the final position of Arena Motorsports International?
| SELECT pos FROM table_name_95 WHERE team = "arena motorsports international" | sql_create_context |
CREATE TABLE table_204_364 (
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.
-- what was the only year she competed in kenya ?
| SELECT "year" FROM table_204_364 WHERE "venue" = 'kenya' | squall |
CREATE TABLE table_33430 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which date featured the Boston Patriots as the opponent?
| SELECT "Date" FROM table_33430 WHERE "Opponent" = 'boston patriots' | wikisql |
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 flight (
aircraft_code_sequence text,
airline_code varchar,
airline_fli... | 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 = 'ATLANT... | atis |
CREATE TABLE table_name_38 (
stage VARCHAR,
start_of_stage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the stage winner when the start of stage is Cauterets?
| SELECT stage AS winner FROM table_name_38 WHERE start_of_stage = "cauterets" | sql_create_context |
CREATE TABLE table_204_20 (
id number,
"represent" text,
"contestant" text,
"age" number,
"height" text,
"hometown" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many delegates are not in their 20 's
| SELECT COUNT("contestant") FROM table_204_20 WHERE "age" < 20 | squall |
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
C... | SELECT DISTINCT flight_id FROM flight WHERE (((flight_days IN (SELECT DAYSalias0.days_code FROM days AS DAYSalias0 WHERE DAYSalias0.day_name IN (SELECT DATE_DAYalias0.day_name FROM date_day AS DATE_DAYalias0 WHERE DATE_DAYalias0.day_number = 21 AND DATE_DAYalias0.month_number = 2 AND DATE_DAYalias0.year = 1991)) AND to... | atis |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT * FROM 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 = jybgb.JZLSH_MZJZJLB AND jybgb.YLJG... | css |
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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
... | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY AVG(SALARY) | nvbench |
CREATE TABLE gas_station (
station_id number,
open_year number,
location text,
manager_name text,
vice_manager_name text,
representative_name text
)
CREATE TABLE company (
company_id number,
rank number,
company text,
headquarters text,
main_industry text,
sales_billion ... | SELECT main_industry, COUNT(*) FROM company GROUP BY main_industry ORDER BY SUM(market_value) DESC LIMIT 1 | spider |
CREATE TABLE table_name_65 (
place_of_birth VARCHAR,
elevator VARCHAR,
cardinalatial_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the birth place for someone elevated by Lucius III, and has the Cardinalatial title of Deacon of S. Giorgio ... | SELECT place_of_birth FROM table_name_65 WHERE elevator = "lucius iii" AND cardinalatial_title = "deacon of s. giorgio in velabro" | sql_create_context |
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | SELECT DISTINCT name, number FROM course WHERE credits = 4 AND department = 'EECS' | advising |
CREATE TABLE table_66872 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text,
"Note" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date with catalog of alca-9198
| SELECT "Date" FROM table_66872 WHERE "Catalog" = 'alca-9198' | wikisql |
CREATE TABLE table_name_45 (
representative VARCHAR,
presentation_of_credentials VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the representative with presentation of credentials of august 16, 1928
| SELECT representative FROM table_name_45 WHERE presentation_of_credentials = "august 16, 1928" | sql_create_context |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
C... | SELECT p.Id, p.CreationDate, COUNT(*) AS CommentCount FROM Posts AS p INNER JOIN Comments AS c ON c.PostId = p.Id GROUP BY p.Id, p.Title, p.CreationDate, CommentCount HAVING CommentCount > 10 ORDER BY CommentCount DESC | sede |
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(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY AVG(Manufacturer) | nvbench |
CREATE TABLE table_name_77 (
producer VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Producer on December 25, 2006?
| SELECT producer FROM table_name_77 WHERE year = "december 25, 2006" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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.BGDH = jyjgzbb.... | css |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T1.Code | nvbench |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT Headquarter, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter | nvbench |
CREATE TABLE table_name_40 (
tie_no VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Tie Number when Barnsley was the away team?
| SELECT tie_no FROM table_name_40 WHERE away_team = "barnsley" | sql_create_context |
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Participates_in (
stuid IN... | SELECT Rank, COUNT(*) FROM Faculty GROUP BY Rank ORDER BY Rank DESC | nvbench |
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,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID DESC | nvbench |
CREATE TABLE table_name_27 (
home VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the home team with 3305 in attendance?
| SELECT home FROM table_name_27 WHERE attendance = 3305 | sql_create_context |
CREATE TABLE table_2463383_2 (
winnings VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the winnings for 23rd position
| SELECT winnings FROM table_2463383_2 WHERE position = "23rd" | sql_create_context |
CREATE TABLE table_name_95 (
club VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which club has 77 points?
| SELECT club FROM table_name_95 WHERE points = "77" | sql_create_context |
CREATE TABLE table_68187 (
"Season" real,
"Overall" text,
"Slalom" text,
"Giant Slalom" text,
"Super G" text,
"Downhill" text,
"Combined" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many overalls has 1 combined and 24 downhills?
| SELECT "Overall" FROM table_68187 WHERE "Combined" = '1' AND "Downhill" = '24' | wikisql |
CREATE TABLE table_name_25 (
res VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the resolution of the fight against steve schneider?
| SELECT res FROM table_name_25 WHERE opponent = "steve schneider" | sql_create_context |
CREATE TABLE parties (
party_id number,
payment_method_code text,
party_phone text,
party_email text
)
CREATE TABLE individuals (
individual_id number,
individual_first_name text,
individual_middle_name text,
inidividual_phone text,
individual_email text,
individual_address text... | SELECT individual_first_name, individual_middle_name, individual_last_name FROM individuals ORDER BY individual_last_name | spider |
CREATE TABLE table_13063 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the place of the player from the United States with a score of 74-72=146?
| SELECT "Place" FROM table_13063 WHERE "Country" = 'united states' AND "Score" = '74-72=146' | wikisql |
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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE wdmzjzjlb.JZZDBM = 'J42.599' AND jyjgzbb.JCZBDM = '... | css |
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 gwyjzb.PERSON_NM, gwyjzb.PERSON_SEX, gwyjzb.PERSON_AGE, gwyjzb.IDENTITY_CARD FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '75285494355' UNION SELECT fgwyjzb.PERSON_NM, fgwyjzb.PERSON_SEX, fgwyjzb.PERSON_AGE, fgwyjzb.IDENTITY_CARD FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '75285494355' | css |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Code DESC | nvbench |
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 t_kc24.t_kc21_MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '6110632' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_CD | css |
CREATE TABLE table_4231 (
"Pick #" real,
"MLS team" text,
"Player" text,
"Position" text,
"Affiliation" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many pick# does the chivas usa mls team have
| SELECT MAX("Pick #") FROM table_4231 WHERE "MLS team" = 'Chivas USA' | wikisql |
CREATE TABLE table_58286 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If there are more than 0 Silver medals, less than 5 gold medals, and no bronze medals, what ... | SELECT COUNT("Total") FROM table_58286 WHERE "Silver" > '0' AND "Gold" < '5' AND "Bronze" < '0' | wikisql |
CREATE TABLE table_27712702_7 (
high_assists VARCHAR,
location_attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had high assists in the game played at Oklahoma city arena 17,509?
| SELECT high_assists FROM table_27712702_7 WHERE location_attendance = "Oklahoma City Arena 17,509" | sql_create_context |
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 t1.startdate FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'docusate sodium' AND admissions.subject_id = 26995 AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME()... | mimic_iii |
CREATE TABLE table_1013129_1 (
pick INTEGER,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest pick for the player, brett lindros?
| SELECT MIN(pick) FROM table_1013129_1 WHERE player = "Brett Lindros" | sql_create_context |
CREATE TABLE table_75968 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 1st leg of the match with a 2nd leg of 3-2?
| SELECT "1st leg" FROM table_75968 WHERE "2nd leg" = '3-2' | wikisql |
CREATE TABLE table_76264 (
"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.
-- Which ... | SELECT AVG("Game") FROM table_76264 WHERE "Date" = 'march 2' | wikisql |
CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Student_Tests_Taken (
registration_id INTEGER,
date_test_taken DATETIME,
test_result VARCHAR(255)
)
CREATE TABLE Student_Course_Enro... | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" GROUP BY date_of_completion ORDER BY date_of_completion DESC | nvbench |
CREATE TABLE table_67346 (
"Poll source" text,
"Date(s) administered" text,
"Sample size" text,
"Margin of error" text,
"Jerry Brown (D)" text,
"Meg Whitman (R)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many people were surveyed in the... | SELECT "Sample size" FROM table_67346 WHERE "Date(s) administered" = 'june 30, 2010' | wikisql |
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Compa... | SELECT title, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title ORDER BY MIN(T1.stars) | nvbench |
CREATE TABLE table_20170644_1 (
pick__number INTEGER,
cfl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number pick did the CFL team bc lions (via hamilton via winnipeg ) have?
| SELECT MAX(pick__number) FROM table_20170644_1 WHERE cfl_team = "BC Lions (via Hamilton via Winnipeg )" | sql_create_context |
CREATE TABLE table_203_640 (
id number,
"name" text,
"college" text,
"years" text,
"reign" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the last year of harald v of norway 's reign ?
| SELECT "years" FROM table_203_640 WHERE "name" = 'harald v of norway' | squall |
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),... | SELECT T2.personal_name, T1.student_id FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id | nvbench |
CREATE TABLE table_48278 (
"Date" text,
"U-boat" text,
"Name" text,
"Nationality" text,
"Tonnage (GRT)" real,
"Fate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Nationality has a Fate of sunk (mine), and a Tonnage (GRT) smaller than 2,2... | SELECT "Nationality" FROM table_48278 WHERE "Fate" = 'sunk (mine)' AND "Tonnage (GRT)" < '2,266' | wikisql |
CREATE TABLE table_name_5 (
cuts_made INTEGER,
top_25 VARCHAR,
top_5 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the average cuts for top-25 more than 13 and top-5 less than 11
| SELECT AVG(cuts_made) FROM table_name_5 WHERE top_25 > 13 AND top_5 < 11 | sql_create_context |
CREATE TABLE screen_mode (
graphics_mode number,
char_cells text,
pixels text,
hardware_colours number,
used_kb number,
map text,
type text
)
CREATE TABLE chip_model (
model_name text,
launch_year number,
ram_mib number,
rom_mib number,
slots text,
wifi text,
blu... | SELECT accreditation_level FROM phone GROUP BY accreditation_level HAVING COUNT(*) > 3 | spider |
CREATE TABLE table_name_31 (
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What tournament has a 2008 value of A, q1 in 2005, and 1r in 2004?
| SELECT tournament FROM table_name_31 WHERE 2008 = "a" AND 2005 = "q1" AND 2004 = "1r" | sql_create_context |
CREATE TABLE table_73400 (
"District" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date successor seated" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date successor seated where Massachusetts 2nd is the district?... | SELECT "Date successor seated" FROM table_73400 WHERE "District" = 'Massachusetts 2nd' | wikisql |
CREATE TABLE table_name_53 (
laps VARCHAR,
time_retired VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the time/retired is electrical how many laps did Rubens Barrichello have?
| SELECT laps FROM table_name_53 WHERE time_retired = "electrical" AND driver = "rubens barrichello" | sql_create_context |
CREATE TABLE table_28892 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the result for north carolina 9
| SELECT COUNT("Result") FROM table_28892 WHERE "District" = 'North Carolina 9' | wikisql |
CREATE TABLE table_77399 (
"Place" real,
"Team" text,
"Played" real,
"Draw" real,
"Lost" real,
"Goals Scored" real,
"Goals Conceded" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of draw with a lost smalle... | SELECT SUM("Draw") FROM table_77399 WHERE "Lost" < '6' AND "Place" = '5' AND "Goals Scored" < '29' | wikisql |
CREATE TABLE table_42490 (
"English" text,
"German" text,
"Dutch" text,
"Icelandic" text,
"Latin" text,
"Greek" text,
"Russian" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the English word for the Latin word uxor?
| SELECT "English" FROM table_42490 WHERE "Latin" = 'uxor' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "17519" | mimicsql_data |
CREATE TABLE table_29478 (
"Team" text,
"Outgoing head coach" text,
"Manner of departure" text,
"Date of vacancy" text,
"Position in table" real,
"Incoming head coach" text,
"Date of appointment" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-... | SELECT "Manner of departure" FROM table_29478 WHERE "Incoming head coach" = 'Mohammad Khakpour' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.