instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_11 (
round INTEGER,
pick VARCHAR,
position VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What round was john sutro, tackle, drafter with a pick lower than 79?
| SELECT SUM(round) FROM table_name_11 WHERE position = "tackle" AND player = "john sutro" AND pick < 79 | sql_create_context |
CREATE TABLE table_75221 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the record of the game with 28,135 people in attendance?
| SELECT "Record" FROM table_75221 WHERE "Attendance" = '28,135' | wikisql |
CREATE TABLE table_58652 (
"Date" text,
"Time" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Total" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score when the set 3 is 26 28?
| SELECT "Score" FROM table_58652 WHERE "Set 3" = '26–28' | wikisql |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_... | mimic_iii |
CREATE TABLE table_name_22 (
place VARCHAR,
hole VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What place is in Australia with 9 or more holes?
| SELECT place FROM table_name_22 WHERE hole > 9 AND country = "australia" | sql_create_context |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | 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 = 30307)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial... | mimic_iii |
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 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 WHERE person_info.XM = '王子安' AND hz_info.YLJGDM = '6839787' AND NOT mzjzjlb.JZZDSM LIKE '%肾结石%' | css |
CREATE TABLE table_912 (
"Code" real,
"County" text,
"Former Province" text,
"Area (km 2 )" text,
"Population Census 2009" real,
"Capital" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the number of area where the county is marsabit?
| SELECT COUNT("Area (km 2 )") FROM table_912 WHERE "County" = 'Marsabit' | wikisql |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
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,
... | SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '2155704' AND t_kc21.IN_HOSP_DATE BETWEEN '2003-11-10' AND '2009-02-24' AND t_kc21.REMOTE_SETTLE_FLG = '异地1' OR t_kc21.REMOTE_SETTLE_FLG = '异地2' | css |
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 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15447 AND admissions.dischtime IS NULL)) AND transfers.... | mimic_iii |
CREATE TABLE table_10664 (
"Year" real,
"Main colour(s)" text,
"Additional colour(s)" text,
"Livery" text,
"Additional major sponsor(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average year of entries with additional color black?
| SELECT AVG("Year") FROM table_10664 WHERE "Additional colour(s)" = 'black' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,... | 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 = '54118858' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM jyjgzbb WH... | css |
CREATE TABLE table_69381 (
"Station" text,
"Japanese" text,
"Distance (km)" real,
"Rapid" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which rapid has a distance in km smaller than 14.2, and a Station of k my ji?
| SELECT "Rapid" FROM table_69381 WHERE "Distance (km)" < '14.2' AND "Station" = 'kōmyōji' | wikisql |
CREATE TABLE table_17641 (
"Record" text,
"Date and Time" text,
"Competition" text,
"Home or Away" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent during the biggest defeat?
| SELECT "Opponent" FROM table_17641 WHERE "Record" = 'Biggest defeat' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '3219625' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING MAX(t_kc21.IN_HOSP_DAYS) < 10) AS T | css |
CREATE TABLE table_38181 (
"Rank" real,
"Airport" text,
"Code (IATA/ICAO)" text,
"Total Cargo (Metric Tonnes)" real,
"% Change" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest total cargo of an airport ranked larger than 19 with a... | SELECT MAX("Total Cargo (Metric Tonnes)") FROM table_38181 WHERE "Code (IATA/ICAO)" = 'bkk/vtbs' AND "Rank" > '19' | wikisql |
CREATE TABLE table_48903 (
"State" text,
"Preliminary" real,
"Interview" real,
"Swimsuit" real,
"Evening Gown" real,
"Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the best preliminary for a contestant from New Mexico with inte... | SELECT MAX("Preliminary") FROM table_48903 WHERE "State" = 'new mexico' AND "Interview" < '9.533' | wikisql |
CREATE TABLE table_name_35 (
points INTEGER,
rank VARCHAR,
draw VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average number of points for a song ranked 2nd with a draw greater than 3?
| SELECT AVG(points) FROM table_name_35 WHERE rank = "2nd" AND draw > 3 | sql_create_context |
CREATE TABLE table_name_19 (
week VARCHAR,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the week with a school that is ball state?
| SELECT week FROM table_name_19 WHERE school = "ball state" | sql_create_context |
CREATE TABLE table_203_350 (
id number,
"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.
-- number of teams not to win a match in first leg
| SELECT COUNT("team #1") FROM table_203_350 WHERE "1st leg" < "1st leg" | squall |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolea... | WITH firstpostids_cte AS (SELECT MIN(Id) AS MinId, OwnerUserId FROM Posts WHERE PostTypeId = 1 GROUP BY OwnerUserId), firstpostsclosed_cte AS (SELECT p.Id, p.CreationDate AS cre, p.ClosedDate AS clo FROM firstpostids_cte AS fp JOIN Posts AS p ON fp.MinId = p.Id) SELECT LAST_DATE_OF_MONTH(cre), COUNT(clo), COUNT(*), ROU... | sede |
CREATE TABLE table_39457 (
"Year" real,
"Class" text,
"Team" text,
"Machine" text,
"Points" real,
"Rank" text,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What points have 500cc as a class, and nsr500 as a machine?
| SELECT "Points" FROM table_39457 WHERE "Class" = '500cc' AND "Machine" = 'nsr500' | wikisql |
CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Student_Tests_Taken (
registration_id I... | SELECT course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY course_name DESC | nvbench |
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 DISTINCT medication.routeadmin FROM medication WHERE medication.drugname = 'atorvastatin calcium 80 mg po tabs' | eicu |
CREATE TABLE table_481 (
"Season" text,
"Overall Spectators" real,
"Per game" real,
"Best supported Club" text,
"Spectators /game" real,
"Top goal scorer" text,
"Goals" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many season did sport... | SELECT COUNT("Season") FROM table_481 WHERE "Best supported Club" = 'Sportfreunde Siegen' | wikisql |
CREATE TABLE locations (
location_id number,
location_name text,
address text,
other_details text
)
CREATE TABLE visitors (
tourist_id number,
tourist_details text
)
CREATE TABLE theme_parks (
theme_park_id number,
theme_park_details text
)
CREATE TABLE hotels (
hotel_id number,
... | SELECT T1.name, T1.tourist_attraction_id FROM tourist_attractions AS T1 JOIN visits AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id GROUP BY T2.tourist_attraction_id HAVING COUNT(*) <= 1 | spider |
CREATE TABLE table_64021 (
"country" text,
"recorded" real,
"unrecorded" real,
"total" real,
"beer" real,
"wine" real,
"spirits" real,
"other" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What beer has a record of 4.08?
| SELECT "beer" FROM table_64021 WHERE "recorded" = '4.08' | wikisql |
CREATE TABLE table_62781 (
"Title" text,
"Series" text,
"Director" text,
"Production Number" text,
"Release date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the release date of the mm series which has the title confederate honey?
| SELECT "Release date" FROM table_62781 WHERE "Series" = 'mm' AND "Title" = 'confederate honey' | wikisql |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Votes (
Id number,
PostId number,
... | SELECT * FROM Posts, PostHistory WHERE Posts.Id = '35314' AND PostHistory.PostId = '35314' | sede |
CREATE TABLE table_10410 (
"Year" text,
"Name" text,
"Film" text,
"Role" text,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the year is year what was the film?
| SELECT "Film" FROM table_10410 WHERE "Year" = 'year' | wikisql |
CREATE TABLE table_22325 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Canadian air date" text,
"U.S. air date" text,
"Production code" real,
"Canadian viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables pro... | SELECT COUNT("U.S. air date") FROM table_22325 WHERE "Directed by" = 'Jim Donovan' | wikisql |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT jybgb.KSBM, jybgb.KSMC FROM hz_info JOIN txmzjzjlb JOIN jybgb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '60923283' AND jybgb.BGRQ BETWEEN '2002-07-29... | css |
CREATE TABLE table_12781 (
"Satellite" text,
"Launch date" text,
"Carrier rocket" text,
"Launch site" text,
"COSPAR ID" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Ariel 3's COSPAR ID?
| SELECT "COSPAR ID" FROM table_12781 WHERE "Satellite" = 'ariel 3' | wikisql |
CREATE TABLE table_3371 (
"Date (YYYY-MM-DD)" text,
"Time (UTC)" text,
"Latitude" text,
"Longitude" text,
"Depth" text,
"Magnitude" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the longitude for the shock that occured on 2010-01-09?
| SELECT "Longitude" FROM table_3371 WHERE "Date (YYYY-MM-DD)" = '2010-01-09' | wikisql |
CREATE TABLE table_69382 (
"Name" text,
"League" real,
"FA Cup" real,
"League Cup" real,
"Other" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of Other, when the Name is Simon Gillett Category:Articles with hCards,... | SELECT SUM("Other") FROM table_69382 WHERE "Name" = 'simon gillett category:articles with hcards' AND "Total" < '34' | wikisql |
CREATE TABLE table_name_10 (
year_joined VARCHAR,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what year did the team from the Western school join the conference?
| SELECT year_joined FROM table_name_10 WHERE school = "western" | sql_create_context |
CREATE TABLE table_name_66 (
total VARCHAR,
year_s__won VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Total for the Player who won in 1936?
| SELECT COUNT(total) FROM table_name_66 WHERE year_s__won = "1936" | sql_create_context |
CREATE TABLE table_name_73 (
away_team VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the away team at the game with an Attendance of 1,730?
| SELECT away_team FROM table_name_73 WHERE attendance = "1,730" | sql_create_context |
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE allergy_type (
allergy text,
allergytype text
)
CREATE TABLE has_allergy (
stuid number,
allergy text
)
-- Using valid SQLite... | SELECT COUNT(*) FROM student WHERE age > 18 AND NOT stuid IN (SELECT stuid FROM has_allergy AS T1 JOIN allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = "food" OR T2.allergytype = "animal") | spider |
CREATE TABLE table_3084 (
"Name" text,
"Position" text,
"Period" text,
"Appearances\u00b9" real,
"Goals\u00b9" real,
"Nationality\u00b2" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the position for 1980 1987
| SELECT "Position" FROM table_3084 WHERE "Period" = '1980 – 1987' | wikisql |
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Coun... | SELECT ID, meter_100 FROM swimmer | nvbench |
CREATE TABLE table_name_5 (
nationality VARCHAR,
round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Nationality, when Round is 6?
| SELECT nationality FROM table_name_5 WHERE round = 6 | sql_create_context |
CREATE TABLE table_name_90 (
name VARCHAR,
pick__number VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Name of the Quarterback with a Pick # less than 11?
| SELECT name FROM table_name_90 WHERE pick__number < 11 AND position = "quarterback" | sql_create_context |
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(t_kc21.IN_DIAG_DIS_CD) FROM t_kc21 WHERE t_kc21.PERSON_ID = '22165131' AND t_kc21.IN_HOSP_DATE BETWEEN '2010-10-05' AND '2014-07-21' | 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 SUM(t_kc22.AMOUNT) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '3363279' AND t_kc22.STA_DATE BETWEEN '2000-02-01' AND '2018-10-31' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc... | css |
CREATE TABLE table_73465 (
"Episode Air Date" text,
"Audition City" text,
"First Audition Date" text,
"Audition Venue" text,
"Callback Date" text,
"Callback Venue" text,
"Guest Judge" text,
"Golden Tickets" real
)
-- Using valid SQLite, answer the following questions for the tables pro... | SELECT "Audition City" FROM table_73465 WHERE "Callback Venue" = 'Hyatt Regency Chicago' | wikisql |
CREATE TABLE table_6411 (
"Feature" text,
"GT Force" text,
"Driving Force EX" text,
"Driving Force Pro" text,
"Driving Force GT" text,
"G25 Racing Wheel" text,
"G27 Racing Wheel" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Driving Force E... | SELECT "G27 Racing Wheel" FROM table_6411 WHERE "Driving Force EX" = 'no' AND "Driving Force Pro" = 'no' AND "G25 Racing Wheel" = 'no' | wikisql |
CREATE TABLE table_52446 (
"Year" real,
"Network" text,
"Lap-by-lap" text,
"Color commentator(s)" text,
"Pit reporters" text,
"Host" text,
"Ratings" text,
"Viewers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the network who h... | SELECT "Network" FROM table_52446 WHERE "Host" = 'ken squier' AND "Viewers" = '13.9 million' | wikisql |
CREATE TABLE table_name_47 (
away_captain VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the away captain for the matches dated 7,8,10,11 feb 1908?
| SELECT away_captain FROM table_name_47 WHERE date = "7,8,10,11 feb 1908" | sql_create_context |
CREATE TABLE table_name_74 (
opponent VARCHAR,
loss VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent at the game that had a loss of Westbrook (2-2)?
| SELECT opponent FROM table_name_74 WHERE loss = "westbrook (2-2)" | sql_create_context |
CREATE TABLE table_203_58 (
id number,
"airline" text,
"airline (in russian)" text,
"licence #" number,
"icao" text,
"iata" text,
"domestic code" text,
"callsign" text,
"photo" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which is ... | SELECT "airline" FROM table_203_58 WHERE "callsign" = 'siberian sky' | squall |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.department = 'COMM' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Spring... | advising |
CREATE TABLE table_71659 (
"Date" text,
"Home captain" text,
"Away captain" text,
"Venue" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date of the Test match of Australia in England at The Oval Venue?
| SELECT "Date" FROM table_71659 WHERE "Venue" = 'the oval' | 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.dod, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "990" | mimicsql_data |
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 WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.diagnosis = "LEFT INTERNAL JUGULAR VEIN THROMBOSIS;LEFT ARM EDEMA" | mimicsql_data |
CREATE TABLE table_name_88 (
event VARCHAR,
distance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which event has a distance of ft10in (m)?
| SELECT event FROM table_name_88 WHERE distance = "ft10in (m)" | sql_create_context |
CREATE TABLE table_76624 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent when the fight had a time of 0:10?
| SELECT "Opponent" FROM table_76624 WHERE "Time" = '0:10' | wikisql |
CREATE TABLE table_20129 (
"City of License /Market" text,
"Station" text,
"Channel TV ( DT )" text,
"Years owned" text,
"Current affiliation" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which city of license/market has 3 (26) as their channel tv... | SELECT "City of License /Market" FROM table_20129 WHERE "Channel TV ( DT )" = '3 (26)' | wikisql |
CREATE TABLE table_47131 (
"Institution" text,
"Wins" real,
"Loss" real,
"Home Wins" real,
"Home Losses" real,
"Away Wins" real,
"Away Losses" real,
"Neutral Wins" real,
"Neutral Losses" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
--... | SELECT MAX("Neutral Losses") FROM table_47131 WHERE "Institution" = 'florida state seminoles' AND "Away Losses" < '5' | wikisql |
CREATE TABLE table_204_229 (
id number,
"property" text,
"test method" text,
"units" text,
"4275" text,
"4301" text,
"4435" text,
"4630" text,
"4645" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which test method is used the most ?... | SELECT "test method" FROM table_204_229 GROUP BY "test method" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
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 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.YLJGDM = jyjgzbb.YLJGDM... | css |
CREATE TABLE zyb (
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 COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '蒋光耀' AND t_kc22.STA_DATE BETWEEN '2001-07-23' AND '2007-04-15' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHE... | css |
CREATE TABLE table_name_49 (
week INTEGER,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of weeks that the buffalo bills played against the San Diego Chargers?
| SELECT SUM(week) FROM table_name_49 WHERE opponent = "san diego chargers" | sql_create_context |
CREATE TABLE table_53968 (
"Year" real,
"Date" text,
"Drivers" text,
"Distance/Duration" text,
"Race Title" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What race is on aug 4 with ron fellows?
| SELECT "Race Title" FROM table_53968 WHERE "Drivers" = 'ron fellows' AND "Date" = 'aug 4' | wikisql |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
... | WITH UsersWITHAcceptedAnswers AS (SELECT u.Reputation FROM Posts AS p INNER JOIN Posts AS aa ON aa.Id = p.AcceptedAnswerId INNER JOIN Users AS u ON u.Id = aa.OwnerUserId WHERE p.PostTypeId = 1 AND aa.PostTypeId = 2 GROUP BY u.Id, u.Reputation) SELECT SUM(CASE WHEN Reputation > '##threshold:int?100000##' THEN 1 ELSE 0 E... | sede |
CREATE TABLE table_name_19 (
production_company VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the production company that has a year of 2008-2009?
| SELECT production_company FROM table_name_19 WHERE year = "2008-2009" | sql_create_context |
CREATE TABLE table_17681 (
"Region/Country" text,
"Local name" text,
"Network" text,
"Dates aired" text,
"Starring" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many networks aired the franchise in 1981 only?
| SELECT COUNT("Network") FROM table_17681 WHERE "Dates aired" = '1981' | wikisql |
CREATE TABLE table_32533 (
"Week" text,
"Kickoff" text,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game site" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Bye week attendance?
| SELECT "Attendance" FROM table_32533 WHERE "Record" = 'bye' | 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.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '周哲彦' AND t_kc21.MED_SER_ORG_NO = '0211238' AND NOT t_kc21.IN_DIAG_DIS_NM LIKE '%包括%' | css |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId... | SELECT COUNT(DISTINCT p.Id) AS "posts", COUNT(DISTINCT COALESCE(ph.PostId, c.PostId)) AS "something_happened" FROM Posts AS p JOIN Users AS u ON p.OwnerUserId = u.Id LEFT OUTER JOIN PostHistory AS ph ON p.Id = ph.PostId AND ph.PostHistoryTypeId NOT IN (1, 2, 3) LEFT OUTER JOIN Comments AS c ON p.Id = c.PostId WHERE TIM... | sede |
CREATE TABLE table_19412902_1 (
pos VARCHAR,
member_association VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many posiitions did saudi arabia land on
| SELECT COUNT(pos) FROM table_19412902_1 WHERE member_association = "Saudi Arabia" | sql_create_context |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId ... | SELECT a.CreationDate, q.Title, q.Tags, CASE WHEN q.AcceptedAnswerId = a.Id THEN 1 ELSE 0 END AS AcceptedAnswer, q.AcceptedAnswerId, a.Id FROM Posts AS a INNER JOIN Posts AS q ON a.ParentId = q.Id INNER JOIN PostTypes AS pt ON pt.Id = a.PostTypeId WHERE a.OwnerUserId = @userid AND pt.Name = 'Answer' AND a.CreationDate ... | sede |
CREATE TABLE table_32424 (
"Team" text,
"Chassis" text,
"Engine" text,
"Tires" text,
"Drivers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the engine for the Arciero Racing team?
| SELECT "Engine" FROM table_32424 WHERE "Team" = 'arciero racing' | wikisql |
CREATE TABLE table_204_863 (
id number,
"state" text,
"city/county" text,
"population served" number,
"charter type" text,
"station name" text,
"web site" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the last city/county and popula... | SELECT "city/county", "population served", "web site" FROM table_204_863 ORDER BY id DESC LIMIT 1 | squall |
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 mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND pers... | css |
CREATE TABLE table_11251601_2 (
percentage_of_global_total VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT PERCENTAGE OF GLOBAL TOTAL EMISSIONS DID INDIA PRODUCE?
| SELECT percentage_of_global_total FROM table_11251601_2 WHERE country = "India" | sql_create_context |
CREATE TABLE table_63852 (
"Airline" text,
"IATA" text,
"ICAO" text,
"Callsign" text,
"Commenced operations" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which IATA has a ICAO of slk?
| SELECT "IATA" FROM table_63852 WHERE "ICAO" = 'slk' | wikisql |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... | atis |
CREATE TABLE table_34469 (
"Party" text,
"Votes" real,
"Share" text,
"Change" text,
"Seats" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the change with share of 2.9%
| SELECT "Change" FROM table_34469 WHERE "Share" = '2.9%' | wikisql |
CREATE TABLE table_name_3 (
inhabitants VARCHAR,
election VARCHAR,
party VARCHAR,
mayor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Inhabitants were in the democratic party for an election before 2009 for Mayor of stefano cimatti?
| SELECT COUNT(inhabitants) FROM table_name_3 WHERE party = "democratic party" AND mayor = "stefano cimatti" AND election < 2009 | 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, Snatch FROM body_builder | nvbench |
CREATE TABLE table_name_84 (
score VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the score for yuliya ustyuzhanina
| SELECT score FROM table_name_84 WHERE opponent = "yuliya ustyuzhanina" | sql_create_context |
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
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.long_title = "Removal of T-tube, other bile duct tube, or liver tube" | mimicsql_data |
CREATE TABLE table_1650 (
"Season" text,
"Series" text,
"Team Name" text,
"Races" real,
"Poles" real,
"Wins" real,
"Points" real,
"Final Placing" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many poles did David Price Racing win?
| SELECT MAX("Poles") FROM table_1650 WHERE "Team Name" = 'David Price Racing' | wikisql |
CREATE TABLE table_12266757_1 (
mens_doubles VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who were the winners of mens doubles in the 1986/1987 season held?
| SELECT mens_doubles FROM table_12266757_1 WHERE season = "1986/1987" | sql_create_context |
CREATE TABLE table_77617 (
"Call sign" text,
"Frequency MHz" text,
"City of license" text,
"ERP W" real,
"Class" text,
"FCC info" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the call sign for ERP W of 27
| SELECT "Call sign" FROM table_77617 WHERE "ERP W" = '27' | wikisql |
CREATE TABLE table_31354 (
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every original air date with U.S. vie... | SELECT "Original air date" FROM table_31354 WHERE "U.S. viewers (million)" = '0.23' | wikisql |
CREATE TABLE table_name_51 (
grid VARCHAR,
laps VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When driver heinz-harald frentzen has a number of laps greater than 60, what is the sum of grid?
| SELECT COUNT(grid) FROM table_name_51 WHERE laps > 60 AND driver = "heinz-harald frentzen" | sql_create_context |
CREATE TABLE table_name_12 (
rider VARCHAR,
rank VARCHAR,
speed VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who has a Rank larger than 3 with a speed of 119.838mph?
| SELECT rider FROM table_name_12 WHERE rank > 3 AND speed = "119.838mph" | sql_create_context |
CREATE TABLE table_name_91 (
home_team VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which home team played against Stoke City?
| SELECT home_team FROM table_name_91 WHERE away_team = "stoke city" | sql_create_context |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE flight_stop (
flight_id in... | 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 = 'BURBANK' AND date_day.day_number = 14 AND date_day.month_number = 5 AND... | atis |
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
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Other psoriasis" AND prescriptions.drug_type = "MAIN" | mimicsql_data |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN 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 ... | css |
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 COUNT(instructor.name), instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'BUDDHST' AND course.number = 512 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id =... | advising |
CREATE TABLE table_27553627_2 (
season VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the season finale that ranked 20th?
| SELECT season AS finale FROM table_27553627_2 WHERE rank = "20th" | sql_create_context |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE... | SELECT Orig.Id AS "post_link", OrigUser.Id AS "user_link", OrigUser.Reputation AS OrigRep, Dupe.Id AS "post_link", DupeUser.Id AS "user_link", DupeUser.Reputation AS DupeRep FROM Posts AS Orig, Users AS OrigUser, Posts AS Dupe, Users AS DupeUser, PostLinks WHERE PostLinks.RelatedPostId = Orig.Id AND Orig.OwnerUserId = ... | sede |
CREATE TABLE table_72708 (
"Season" real,
"Date" text,
"Location" text,
"Driver" text,
"Chassis" text,
"Engine" text,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was the race at Nazareth?
| SELECT "Date" FROM table_72708 WHERE "Location" = 'Nazareth' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.dob_year < "2110" | mimicsql_data |
CREATE TABLE table_1341423_38 (
first_elected INTEGER,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the first elected year of the district whose incumbent is Jim Greenwood?
| SELECT MAX(first_elected) FROM table_1341423_38 WHERE incumbent = "Jim Greenwood" | sql_create_context |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName te... | SELECT * FROM PostHistory AS ph WHERE ph.CreationDate = (SELECT MAX(CreationDate) FROM PostHistory AS phi WHERE phi.PostId = 251212 AND phi.PostHistoryTypeId IN (14, 15)) AND ph.PostId = 251212 AND ph.PostHistoryTypeId = 14 | sede |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.