instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_21 (
player VARCHAR,
total_reb VARCHAR,
fg_pct VARCHAR,
def_reb VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player has a FG Pct less than 45.9, a def reb less than 43, and a total reb of 9?
| SELECT player FROM table_name_21 WHERE fg_pct < 45.9 AND def_reb < 43 AND total_reb = 9 | sql_create_context |
CREATE TABLE table_49754 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the iata for malta international airport?
| SELECT "IATA" FROM table_49754 WHERE "Airport" = 'malta international airport' | wikisql |
CREATE TABLE table_name_98 (
score VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Score that has the Date of 11/17/1979?
| SELECT score FROM table_name_98 WHERE date = "11/17/1979" | sql_create_context |
CREATE TABLE table_201_36 (
id number,
"year" number,
"title" text,
"role" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which film has their role under igiyook ?
| SELECT "title" FROM table_201_36 WHERE "role" = 'igiyook' | squall |
CREATE TABLE table_63706 (
"Year" real,
"Baden" text,
"W\u00fcrttemberg" text,
"Nordbayern" text,
"S\u00fcdbayern" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the Nordbayern with a W rttemberg of Union B ckingen in the year before 1932?
| SELECT "Nordbayern" FROM table_63706 WHERE "Year" < '1932' AND "W\u00fcrttemberg" = 'union böckingen' | wikisql |
CREATE TABLE table_name_82 (
floors INTEGER,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest number of floors recorded for buildings built by Dubai Marriott Harbour Hotel & Suites?
| SELECT MIN(floors) FROM table_name_82 WHERE name = "dubai marriott harbour hotel & suites" | sql_create_context |
CREATE TABLE table_name_26 (
fate VARCHAR,
ship VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the fate for the Bremen ship?
| SELECT fate FROM table_name_26 WHERE ship = "bremen" | sql_create_context |
CREATE TABLE table_24425976_2 (
episode_title VARCHAR,
production_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the episode with a production code of 107?
| SELECT episode_title FROM table_24425976_2 WHERE production_code = "107" | sql_create_context |
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 hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '49963274' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM jyjgzbb WH... | css |
CREATE TABLE table_4558 (
"Actor/actress" text,
"Character" text,
"Rank" text,
"Tenure" text,
"Episodes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What character did actor Damien Richardson play?
| SELECT "Character" FROM table_4558 WHERE "Actor/actress" = 'damien richardson' | wikisql |
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_DIRE_CD text,
MED_DIRE_NM text,... | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '47642343' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 748.1) | css |
CREATE TABLE table_13677808_1 (
technology VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times is denmark ranked in technology?
| SELECT COUNT(technology) FROM table_13677808_1 WHERE rank = "Denmark" | sql_create_context |
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.Name | nvbench |
CREATE TABLE table_47271 (
"Name" text,
"Years" text,
"League" real,
"Scottish Cup" real,
"League Cup" real,
"Europe" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Scottish Cup has a League smaller than 561, Years of 198... | SELECT COUNT("Scottish Cup") FROM table_47271 WHERE "League" < '561' AND "Years" = '1989–1995 1997–2001' AND "Europe" < '11' | wikisql |
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.short_title = "Coronary arteriogram NEC" | mimicsql_data |
CREATE TABLE table_16088 (
"Character" text,
"Australia & New Zealand (Sydney - first run, Melbourne, Auckland)" text,
"London" text,
"Toronto / Broadway" text,
"Brazil" text,
"UK Tour" text,
"US Tour" text,
"Italy (Milan, Rome, Trieste)" text
)
-- Using valid SQLite, answer the follow... | SELECT COUNT("London") FROM table_16088 WHERE "US Tour" = 'Babs Rubenstein' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepi... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute coronary syndrome' AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-3 year')) AS t1... | eicu |
CREATE TABLE table_66003 (
"Rank" real,
"Athlete" text,
"Country" text,
"Time" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the athlete with the rank smaller than 2?
| SELECT "Athlete" FROM table_66003 WHERE "Rank" < '2' | wikisql |
CREATE TABLE table_name_38 (
high_schools INTEGER,
cemeteries VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many High schools in the Region with 8 Cemeteries?
| SELECT SUM(high_schools) FROM table_name_38 WHERE cemeteries = 8 | sql_create_context |
CREATE TABLE table_68538 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent when the loss was Wells (4-7)?
| SELECT "Opponent" FROM table_68538 WHERE "Loss" = 'wells (4-7)' | wikisql |
CREATE TABLE table_name_38 (
reference VARCHAR,
strain VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the reference when the strain is msb8?
| SELECT reference FROM table_name_38 WHERE strain = "msb8" | sql_create_context |
CREATE TABLE table_26131 (
"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.
-- What is the name of the speaker if the chief minister is M.G. Ramachand... | SELECT "Speaker" FROM table_26131 WHERE "Chief Minister" = 'M.G. Ramachandran' | wikisql |
CREATE TABLE table_203_290 (
id number,
"game" number,
"date" text,
"opponent" text,
"location" text,
"score" text,
"ot" text,
"attendance" number,
"record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many games did they win i... | SELECT COUNT("game") FROM table_203_290 WHERE "score" = 'w' | squall |
CREATE TABLE table_1595 (
"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.
-- at area 191.43 what is the total number of census ranking?
| SELECT COUNT("Census Ranking") FROM table_1595 WHERE "Area km 2" = '191.43' | wikisql |
CREATE TABLE table_name_79 (
competition VARCHAR,
final_score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the competition that had a final score of 6:5?
| SELECT competition FROM table_name_79 WHERE final_score = "6:5" | sql_create_context |
CREATE TABLE region (
Region_id int,
Region_code text,
Region_name text
)
CREATE TABLE affected_region (
Region_id int,
Storm_ID int,
Number_city_affected real
)
CREATE TABLE storm (
Storm_ID int,
Name text,
Dates_active text,
Max_speed int,
Damage_millions_USD real,
Nu... | SELECT Region_name, COUNT(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.Region_id = T2.Region_id GROUP BY T1.Region_id ORDER BY Region_name | nvbench |
CREATE TABLE table_name_31 (
district VARCHAR,
college_or_campus_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What District has a College or Campus Name of anna university college of engineering kanchipuram?
| SELECT district FROM table_name_31 WHERE college_or_campus_name = "anna university college of engineering kanchipuram" | sql_create_context |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE S... | WITH FirstAnswers AS (SELECT p.Id AS PostID, MIN(a.CreationDate) AS FirstAnswerDate FROM Posts AS p LEFT JOIN Posts AS a ON a.ParentId = p.Id WHERE p.PostTypeId = 1 GROUP BY p.Id) SELECT BountyAmount /* count(*) BountyCount, */, AVG(CAST((JULIANDAY(FirstAnswerDate) - JULIANDAY(v.CreationDate)) AS INT)) AS AvgMinutesToA... | sede |
CREATE TABLE table_name_30 (
score VARCHAR,
february VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score after february 4 in the game 61?
| SELECT score FROM table_name_30 WHERE february > 4 AND game = 61 | sql_create_context |
CREATE TABLE table_name_72 (
away_team VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team was the away team at Arden Street Oval?
| SELECT away_team FROM table_name_72 WHERE venue = "arden street oval" | sql_create_context |
CREATE TABLE table_1721 (
"Player" text,
"League" real,
"Scottish Cup" real,
"League Cup" real,
"Challenge Cup" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of league cup for mark roberts
| SELECT COUNT("League Cup") FROM table_1721 WHERE "Player" = 'Mark Roberts' | wikisql |
CREATE TABLE table_70895 (
"Year" text,
"Category" text,
"Genre" text,
"Recording" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the recording for 2012
| SELECT "Recording" FROM table_70895 WHERE "Year" = '2012' | wikisql |
CREATE TABLE ref_document_types (
document_type_code text,
document_type_description text
)
CREATE TABLE addresses (
address_id number,
address_details text
)
CREATE TABLE ref_shipping_agents (
shipping_agent_code text,
shipping_agent_name text,
shipping_agent_description text
)
CREATE TA... | SELECT COUNT(*) FROM employees | spider |
CREATE TABLE table_name_9 (
year VARCHAR,
open_cup VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many years did Real Colorado Foxes make it to the Open Cup 1st Round?
| SELECT COUNT(year) FROM table_name_9 WHERE open_cup = "1st round" | sql_create_context |
CREATE TABLE body_builder (
Body_Builder_ID int,
People_ID int,
Snatch real,
Clean_Jerk real,
Total real
)
CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Birth_Date text,
Birth_Place text
)
-- Using valid SQLite, answer the following questions fo... | SELECT Body_Builder_ID, Clean_Jerk FROM body_builder | nvbench |
CREATE TABLE table_name_79 (
set_3 VARCHAR,
date VARCHAR,
set_1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Set 3 on 30 may, and a Set 1 is 20 25?
| SELECT set_3 FROM table_name_79 WHERE date = "30 may" AND set_1 = "20–25" | sql_create_context |
CREATE TABLE Supplier_Addresses (
supplier_id INTEGER,
address_id INTEGER,
date_from DATETIME,
date_to DATETIME
)
CREATE TABLE Department_Store_Chain (
dept_store_chain_id INTEGER,
dept_store_chain_name VARCHAR(80)
)
CREATE TABLE Staff_Department_Assignments (
staff_id INTEGER,
departm... | SELECT product_type_code, MAX(product_price) FROM Products GROUP BY product_type_code ORDER BY MAX(product_price) | nvbench |
CREATE TABLE player_college (
player_id text,
college_id text,
year number
)
CREATE TABLE hall_of_fame (
player_id text,
yearid number,
votedby text,
ballots number,
needed number,
votes number,
inducted text,
category text,
needed_note text
)
CREATE TABLE team (
ye... | SELECT COUNT(*) FROM (SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings') | spider |
CREATE TABLE table_39780 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which method led to a record of 9-4?
| SELECT "Method" FROM table_39780 WHERE "Record" = '9-4' | wikisql |
CREATE TABLE Teachers (
teacher_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(80),
last_name VARCHAR(80),
gender VARCHAR(1),
cell_mobile_number VARCHAR(40),
email_address VARCHAR(40),
other_details VARCHAR(255)
)
CREATE TABLE Students (
student_id I... | SELECT date_address_to, COUNT(date_address_to) FROM Student_Addresses ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 695 OR course.number = 499) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ... | advising |
CREATE TABLE table_58030 (
"Year" real,
"Tournament" text,
"Venue" text,
"Result" text,
"Extra" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which year was the Tournament of european indoor championships played where the Extra was 800 m and the... | SELECT "Year" FROM table_58030 WHERE "Extra" = '800 m' AND "Tournament" = 'european indoor championships' AND "Result" = '2nd' | wikisql |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId n... | SELECT * FROM VoteTypes | sede |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "3" AND prescriptions.drug = "PHENYLEPHrine" | mimicsql_data |
CREATE TABLE table_name_79 (
player VARCHAR,
position VARCHAR,
year_born VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What player is a center born in 1977?
| SELECT player FROM table_name_79 WHERE position = "center" AND year_born = 1977 | sql_create_context |
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 jyjgzbb.YQBH, jyjgzbb.YQMC 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.BG... | css |
CREATE TABLE table_24153 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the court surface on yea... | SELECT "Surface" FROM table_24153 WHERE "Year" = '1971' | wikisql |
CREATE TABLE table_12264 (
"Draft" real,
"Round" text,
"Pick" real,
"Player" text,
"Nationality" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the pick for round 8 with a USA nationality in the 2000 draft?
| SELECT "Pick" FROM table_12264 WHERE "Round" = '8' AND "Nationality" = 'usa' AND "Draft" = '2000' | wikisql |
CREATE TABLE table_test_25 (
"id" int,
"ejection_fraction_ef" int,
"respiratory_tract_infection" bool,
"left_ventricular_ejection_fraction_lvef" int,
"intra_aortic_balloon_pump_iabp" bool,
"systolic_blood_pressure_sbp" int,
"central_diabetes_insipidus" bool,
"hyponatremia" bool,
"hea... | SELECT * FROM table_test_25 WHERE body_weight < 50 | criteria2sql |
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal bool... | WITH rankScores AS (SELECT p.ParentId, p.Id, p.OwnerUserId, parent.AcceptedAnswerId, RANK() OVER (PARTITION BY p.ParentId ORDER BY p.Score DESC) AS Rank FROM Posts AS p INNER JOIN Posts AS parent ON p.ParentId = parent.Id WHERE p.PostTypeId = 2 LIMIT 10000) SELECT SUM(CASE WHEN Rank = 1 AND NOT AcceptedAnswerId IS NULL... | sede |
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 Votes (
Id number,
PostId number,
VoteTypeId nu... | SELECT COUNT(*) AS PostCount, T.TagName, YEAR(P.CreationDate) FROM Posts AS P INNER JOIN PostTags AS PT ON (P.Id = PT.PostId) INNER JOIN Tags AS T ON (PT.TagId = T.Id) WHERE YEAR(P.CreationDate) > 2014 AND P.CreationDate < '2015-12-01' AND NOT TagName LIKE '%rails%' GROUP BY YEAR(P.CreationDate), T.TagName HAVING COUNT... | sede |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
... | SELECT zzmzjzjlb.MZZYZDZZBM, zzmzjzjlb.MZZYZDZZMC FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '60629196677' UNION SELECT fzzmzjzjlb.MZZYZDZZBM, fzzmzjzjlb.MZZYZDZZMC FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZLSH = '60629196677' | css |
CREATE TABLE table_24540893_6 (
position VARCHAR,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position does the player from kent state play?
| SELECT position FROM table_24540893_6 WHERE school = "Kent State" | sql_create_context |
CREATE TABLE table_17911 (
"Year" real,
"Delaware" text,
"Maryland" text,
"New Jersey" text,
"New York" text,
"Pennsylvania" text,
"Washington, D.C." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- After the year 2008.0, who played for Maryla... | SELECT "Maryland" FROM table_17911 WHERE "Delaware" = 'M.O.T. LL Middletown' AND "Year" > '2008.0' | wikisql |
CREATE TABLE table_67344 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest points total scored by Dan Clarke in a grid higher than 10?
| SELECT MAX("Points") FROM table_67344 WHERE "Driver" = 'dan clarke' AND "Grid" > '10' | wikisql |
CREATE TABLE city (
City_ID int,
County_ID int,
Name text,
White real,
Black real,
Amerindian real,
Asian real,
Multiracial real,
Hispanic real
)
CREATE TABLE county_public_safety (
County_ID int,
Name text,
Population int,
Police_officers int,
Residents_per_offi... | SELECT T2.Name, COUNT(T2.Name) FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID GROUP BY T2.Name ORDER BY COUNT(T2.Name) DESC | nvbench |
CREATE TABLE t_kc21 (
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 t_kc21 WHERE t_kc21.PERSON_ID = '27789150' AND t_kc21.CLINIC_TYPE = '住院' AND MOD(t_kc21.MED_AMOUT, 1) = 0 | css |
CREATE TABLE table_28209 (
"Celebrity" text,
"Known for" text,
"Age" real,
"Professional" text,
"Series" real,
"Place" text,
"Dances" real,
"Highest score" real,
"Lowest score" real,
"Aggregate" real,
"Average" text
)
-- Using valid SQLite, answer the following questions fo... | SELECT "Aggregate" FROM table_28209 WHERE "Dances" = '7' AND "Known for" = 'Singer' | wikisql |
CREATE TABLE table_22171978_1 (
athletic_nickname VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For the location of quezon city , metro manila what is the athletic nickname?
| SELECT athletic_nickname FROM table_22171978_1 WHERE location = "Quezon City , Metro Manila" | sql_create_context |
CREATE TABLE table_1696 (
"Year" real,
"Total" text,
"Less than a year" real,
"One year" real,
"Two years" real,
"Three years" real,
"Four years" real,
"5\u20139 years" real,
"10\u201314 years" real,
"15\u201319 years" real,
"20\u201324 years" real,
"25 and more" real,
... | SELECT MAX("Two years") FROM table_1696 WHERE "Unknown" > '1.0' | wikisql |
CREATE TABLE table_name_8 (
gold VARCHAR,
bronze VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many golds were there in a game that has 17 bronze and a total of 31?
| SELECT gold FROM table_name_8 WHERE bronze = "17" AND total = "31" | sql_create_context |
CREATE TABLE table_name_20 (
city VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What place is listed in the 2002-2003 season for the City of Aveiro?
| SELECT 2002 AS _2003_season FROM table_name_20 WHERE city = "aveiro" | sql_create_context |
CREATE TABLE table_40572 (
"Name" text,
"Rank" real,
"Out of" real,
"Source" text,
"Year" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Name had a Rank of 18 Out of a number smaller than 149?
| SELECT "Name" FROM table_40572 WHERE "Out of" < '149' AND "Rank" = '18' | wikisql |
CREATE TABLE table_20411 (
"No." real,
"Date" text,
"Tournament" text,
"Winning score" text,
"To par" text,
"Margin of victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number when date is 30 may 201... | SELECT COUNT("No.") FROM table_20411 WHERE "Date" = '30 May 2010' | wikisql |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
CREATE TABLE t_kc21 (
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... | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '31337680' AND t_kc22.STA_DATE BETWEEN '2002-03-31' AND '2004-03-01' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE table_61211 (
"Date" text,
"Series" text,
"Circuit" text,
"City / State" text,
"Winner" text,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team won at winton motor raceway?
| SELECT "Team" FROM table_61211 WHERE "Circuit" = 'winton motor raceway' | wikisql |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate tim... | SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 32160 | mimic_iii |
CREATE TABLE table_50858 (
"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 Upstream, when Price is '14 EUR'?
| SELECT "Upstream" FROM table_50858 WHERE "Price" = '14 eur' | wikisql |
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Count the job title of all ... | SELECT job, COUNT(job) FROM Person GROUP BY job | nvbench |
CREATE TABLE table_26842217_16 (
broadcast VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what network was the Kentucky game broadcast?
| SELECT broadcast FROM table_26842217_16 WHERE home_team = "Kentucky" | sql_create_context |
CREATE TABLE table_name_12 (
bubbles VARCHAR,
attribute VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the bubbles for onscroll
| SELECT bubbles FROM table_name_12 WHERE attribute = "onscroll" | sql_create_context |
CREATE TABLE table_2603017_2 (
bb___blind_bear VARCHAR,
ba___running_bear VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is bb - blind bear where ba - running bear is mf - mountain falcon?
| SELECT bb___blind_bear FROM table_2603017_2 WHERE ba___running_bear = "MF - Mountain Falcon" | sql_create_context |
CREATE TABLE table_204_794 (
id number,
"iec\nworld plugs\nType" text,
"standard" text,
"power\nrating" text,
"earthed" text,
"polarised" text,
"fused" text,
"insulated\npins" text,
"europlug\ncompatible" text
)
-- Using valid SQLite, answer the following questions for the tables p... | SELECT COUNT(*) FROM table_204_794 WHERE "europlug\ncompatible" = 'yes' | squall |
CREATE TABLE table_name_23 (
investment_earnings VARCHAR,
total_revenue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the investment earnings in a year when total revenue was $21,779,618?
| SELECT investment_earnings FROM table_name_23 WHERE total_revenue = "21,779,618" | sql_create_context |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT Team_Name, School_ID FROM basketball_match ORDER BY School_ID DESC | 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 demographic.admittime, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Paul Edwards" | mimicsql_data |
CREATE TABLE table_7558 (
"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.
-- What is... | SELECT "Score" FROM table_7558 WHERE "Record" = '12–12' | wikisql |
CREATE TABLE table_4277 (
"Season" real,
"Date" text,
"Location" text,
"Discipline" text,
"Position" real,
"FIS points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date for s. valentino alla muta , italia
| SELECT "Date" FROM table_4277 WHERE "Location" = 'S. Valentino Alla Muta , Italia' | wikisql |
CREATE TABLE table_name_8 (
player VARCHAR,
school_club_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the player who went to Stanford?
| SELECT player FROM table_name_8 WHERE school_club_team = "stanford" | sql_create_context |
CREATE TABLE table_42010 (
"Member State" text,
"Population in millions" real,
"Population % of EU" text,
"Area km 2" real,
"Area % of EU" text,
"Pop. density People/km 2" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest area km... | SELECT MIN("Area km 2") FROM table_42010 WHERE "Member State" = 'czech republic' AND "Population in millions" < '10.3' | wikisql |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
s... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'diagnoses_icd' AND cost.event_id IN (SELECT diagnoses_icd.row_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'asbestosis')) | mimic_iii |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '83290845570' AND UP_LIMIT_AMO > 377.96 | css |
CREATE TABLE Investors (
investor_id INTEGER,
Investor_details VARCHAR(255)
)
CREATE TABLE Lots (
lot_id INTEGER,
investor_id INTEGER,
lot_details VARCHAR(255)
)
CREATE TABLE Purchases (
purchase_transaction_id INTEGER,
purchase_details VARCHAR(255)
)
CREATE TABLE Transactions_Lots (
... | SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE share_count > 100 OR amount_of_transaction > 1000 ORDER BY COUNT(date_of_transaction) DESC | nvbench |
CREATE TABLE table_33578 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the away team at the match where the cr... | SELECT "Away team" FROM table_33578 WHERE "Crowd" > '30,000' | wikisql |
CREATE TABLE table_39396 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" real,
"Class" text,
"FCC info" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What frequency has call sign w228bg?
| SELECT "Frequency MHz" FROM table_39396 WHERE "Call sign" = 'w228bg' | wikisql |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_NM = '陶秀英' AND IN_HOSP_DATE BETWEEN '2005-06-26' AND '2009-10-18' GROUP BY MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TA... | SELECT DISTINCT name, number FROM course WHERE credits = 9 AND department = 'EECS' | advising |
CREATE TABLE table_65578 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location/Attendance" text,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest game when the score is 102-104?
| SELECT MIN("Game") FROM table_65578 WHERE "Score" = '102-104' | wikisql |
CREATE TABLE table_name_8 (
year INTEGER,
venue VARCHAR,
event VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is earliest year that had a 50km event with a 2nd place result played in London, United Kingdom?
| SELECT MIN(year) FROM table_name_8 WHERE event = "50km" AND result = "2nd" AND venue = "london, united kingdom" | sql_create_context |
CREATE TABLE table_name_32 (
location VARCHAR,
res VARCHAR,
method VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the match held when the result was win, and tko as the method?
| SELECT location FROM table_name_32 WHERE res = "win" AND method = "tko" | sql_create_context |
CREATE TABLE table_66028 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the hioghest amount of silver medals for a nation ranked higher than 19 and less tha... | SELECT MAX("Silver") FROM table_66028 WHERE "Rank" = '19' AND "Gold" < '2' | wikisql |
CREATE TABLE table_name_30 (
circuit VARCHAR,
round INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which circuit had a round larger than 5?
| SELECT circuit FROM table_name_30 WHERE round > 5 | sql_create_context |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id numb... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_i... | mimic_iii |
CREATE TABLE table_1520559_1 (
venue VARCHAR,
champion VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- At what venues did Lorena Ochoa win the championship?
| SELECT venue FROM table_1520559_1 WHERE champion = "Lorena Ochoa" | sql_create_context |
CREATE TABLE table_52949 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What did the team score when playing at home in ... | SELECT "Home team score" FROM table_52949 WHERE "Venue" = 'victoria park' | wikisql |
CREATE TABLE table_69682 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least lane for lenny krayzelburg
| SELECT MIN("Lane") FROM table_69682 WHERE "Name" = 'lenny krayzelburg' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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,
C... | SELECT t_kc21.OUT_HOSP_DATE FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '37631577362' | css |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjz... | css |
CREATE TABLE table_48085 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Time has a Round larger than 2, and an Oppone... | SELECT "Time" FROM table_48085 WHERE "Round" > '2' AND "Opponent" = 'jesse brock' | wikisql |
CREATE TABLE table_name_27 (
club_province VARCHAR,
caps VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What club/province does the prop player with over 45 caps play for?
| SELECT club_province FROM table_name_27 WHERE caps > 45 AND position = "prop" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.