answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT "Date" FROM table_66262 WHERE "Nation" = 'russia' AND "Place" = 'beijing, china' AND "Athlete" = 'yelena isinbayeva' | What's the date when Yelena Isinbayeva for Russia was in Beijing, China? | CREATE TABLE table_66262 (
"Event" text,
"Performance" text,
"Athlete" text,
"Nation" text,
"Place" text,
"Date" text
) |
SELECT original_air_date FROM table_22951088_3 WHERE no = 1 | What was the original air date of episode number 1? | CREATE TABLE table_22951088_3 (original_air_date VARCHAR, no VARCHAR) |
SELECT circuit FROM table_20884163_2 WHERE winner = "Rick Kelly" | What circuit did rick kelly win on? | CREATE TABLE table_20884163_2 (circuit VARCHAR, winner VARCHAR) |
SELECT COUNT(earnings__) AS €_ FROM table_28540609_2 WHERE best_finish = "T38" | How many earnings values are associated with players who had a best finish of T38? | CREATE TABLE table_28540609_2 (
earnings__ VARCHAR,
best_finish VARCHAR
) |
SELECT bowler FROM table_22962745_35 WHERE batsmen = "Dwaraka Ravi Teja RP Singh Pragyan Ojha" | Who was the bowler when the batsmen was dwaraka ravi teja rp singh pragyan ojha? | CREATE TABLE table_22962745_35 (bowler VARCHAR, batsmen VARCHAR) |
SELECT circuit FROM table_20884163_2 WHERE race_title = "PlaceMakers V8 Supercars" | What circuit features the placemakers v8 supercars race? | CREATE TABLE table_20884163_2 (circuit VARCHAR, race_title VARCHAR) |
SELECT COUNT("Total") FROM table_58991 WHERE "MLS Cup" = '4' AND "U.S. Open Cup" > '1' | What is the total where there are 4 MLS Cups and more US Open Cups than 1? | CREATE TABLE table_58991 (
"Name" text,
"Years" text,
"MLS Cup" real,
"U.S. Open Cup" real,
"CONCACAF" real,
"Other" real,
"Total" real
) |
SELECT COUNT(bowler) FROM table_22962745_35 WHERE batsmen = "David Hussey Azhar Mahmood Gurkeerat Singh" | How many bowlers were there when david hussey azhar mahmood gurkeerat singh was the batsmen? | CREATE TABLE table_22962745_35 (bowler VARCHAR, batsmen VARCHAR) |
SELECT date FROM table_20884163_2 WHERE team = "Triple Eight Race Engineering" AND race_title = "Falken Tasmania Challenge" | What dates was the falken tasmania challenge race that had triple eight race engineering as the team? | CREATE TABLE table_20884163_2 (date VARCHAR, team VARCHAR, race_title VARCHAR) |
SELECT Id AS "user_link", DisplayName, Reputation FROM Users WHERE Reputation > @RepLimit AND NOT EXISTS(SELECT Id FROM Badges AS b WHERE b.UserId = Users.Id AND b.Name = 'Peer Pressure') ORDER BY Reputation DESC | High Rep users with the peer pressure badge. A way to find which users (mostly high rep) have the peer pressure badge. Was just playing around with T-SQL and cooked this. =D | CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE ReviewTaskStates (
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 TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
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 Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
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 ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
) |
SELECT season FROM table_22962745_35 WHERE batsmen = "Herschelle Gibbs Andrew Symonds Venugopal Rao" | What season was herschelle gibbs andrew symonds venugopal rao batsmen? | CREATE TABLE table_22962745_35 (season VARCHAR, batsmen VARCHAR) |
SELECT report FROM table_20884163_2 WHERE race_title = "Winton" | What was the report for the winton race? | CREATE TABLE table_20884163_2 (report VARCHAR, race_title VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2115.0" AND prescriptions.formulary_drug_cd = "GLYB5" | how many patients with drug code glyb5 died in or before 2115? | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) |
SELECT scorecard FROM table_22962745_35 WHERE batsmen = "Robin Uthappa Mark Boucher Jacques Kallis" | What was the scorecard when robin uthappa mark boucher jacques kallis was the batsmen? | CREATE TABLE table_22962745_35 (scorecard VARCHAR, batsmen VARCHAR) |
SELECT medium FROM table_20903658_1 WHERE title_subject = "George Harold Baker" | What medium was used for the sculpture of George Harold Baker? | CREATE TABLE table_20903658_1 (medium VARCHAR, title_subject VARCHAR) |
SELECT "College/junior/club team" FROM table_4036 WHERE "NHL team" = 'Buffalo Sabres' | Which junior team is associated with an NHL pick by the Buffalo Sabres? | CREATE TABLE table_4036 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) |
SELECT MAX(no) FROM table_22962745_35 WHERE against = "Rajasthan Royals" | What is the number when against is rajasthan royals? | CREATE TABLE table_22962745_35 (no INTEGER, against VARCHAR) |
SELECT title_subject FROM table_20903658_1 WHERE date_painted_created = "1982" | Who was the subject of the sculpture created in 1982? | CREATE TABLE table_20903658_1 (title_subject VARCHAR, date_painted_created VARCHAR) |
SELECT AVG(jianshu) FROM table_name_29 WHERE rank < 2 AND qiangshu < 9.85 | What is the average Jianshu higher than rank 2, with a Qiangshu smaller than 9.85? | CREATE TABLE table_name_29 (
jianshu INTEGER,
rank VARCHAR,
qiangshu VARCHAR
) |
SELECT COUNT(stellar_classification) FROM table_2296507_1 WHERE system = "3 Neptune planets < 1 AU" | Name number of stellar classification for 3 neptune planets < 1 au | CREATE TABLE table_2296507_1 (stellar_classification VARCHAR, system VARCHAR) |
SELECT title_subject FROM table_20903658_1 WHERE medium = "Bronze" AND public_office = "colonist and soldier in Ville Marie, New France" | Who was the subject of the bronze sculpture who was a colonist and soldier in Ville Marie, New France? | CREATE TABLE table_20903658_1 (title_subject VARCHAR, medium VARCHAR, public_office VARCHAR) |
SELECT "date" FROM table_204_443 WHERE "game site" = 'the meadowlands' ORDER BY "date" LIMIT 1 | what is the date for the first game played in the meadowlands ? | CREATE TABLE table_204_443 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"game site" text,
"attendance" number,
"bye" text
) |
SELECT system FROM table_2296507_1 WHERE constellation = "Aries" | Name the system for aries | CREATE TABLE table_2296507_1 (system VARCHAR, constellation VARCHAR) |
SELECT public_office FROM table_20903658_1 WHERE date_painted_created = "1954" | What was the public office of the subject whose sculpture was created in 1954? | CREATE TABLE table_20903658_1 (public_office VARCHAR, date_painted_created VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND diagnoses.short_title = "29-30 comp wks gestation" | provide the number of patients whose admission location is phys referral/normal deli and diagnoses short title is 29-30 comp wks gestation? | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid 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,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear 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 stellar_age__myr_ FROM table_2296507_1 WHERE stellar_classification = "F3V" | Name the stellar age for f3v | CREATE TABLE table_2296507_1 (stellar_age__myr_ VARCHAR, stellar_classification VARCHAR) |
SELECT medium FROM table_20903658_1 WHERE artist = "Ernest Richard Gause" | What medium was used for the sculpture by Ernest Richard Gause? | CREATE TABLE table_20903658_1 (medium VARCHAR, artist VARCHAR) |
SELECT AVG(top_25) FROM table_name_33 WHERE events = 5 AND cuts_made < 3 | Tell me the average top 25 with events of 5 and cuts madde less than 3 | CREATE TABLE table_name_33 (
top_25 INTEGER,
events VARCHAR,
cuts_made VARCHAR
) |
SELECT dust__or_debris__location__au_ FROM table_2296507_1 WHERE star = "HD 69830" | Name the dust for star being hd 69830 | CREATE TABLE table_2296507_1 (dust__or_debris__location__au_ VARCHAR, star VARCHAR) |
SELECT original_title FROM table_20963074_1 WHERE film_title_used_in_nomination = "No Stars in the Jungle" | Name the originl title for no stars in the jungle | CREATE TABLE table_20963074_1 (original_title VARCHAR, film_title_used_in_nomination VARCHAR) |
SELECT city FROM business WHERE name = 'Taj Mahal' | Find all cities which has a ' Taj Mahal ' . | CREATE TABLE neighborhood (
id int,
business_id varchar,
neighborhood_name varchar
)
CREATE TABLE business (
bid int,
business_id varchar,
name varchar,
full_address varchar,
city varchar,
latitude varchar,
longitude varchar,
review_count bigint,
is_open tinyint,
rating float,
state varchar
)
CREATE TABLE category (
id int,
business_id varchar,
category_name varchar
)
CREATE TABLE checkin (
cid int,
business_id varchar,
count int,
day varchar
)
CREATE TABLE tip (
tip_id int,
business_id varchar,
text longtext,
user_id varchar,
likes int,
year int,
month varchar
)
CREATE TABLE user (
uid int,
user_id varchar,
name varchar
)
CREATE TABLE review (
rid int,
business_id varchar,
user_id varchar,
rating float,
text longtext,
year int,
month varchar
) |
SELECT COUNT(name) FROM table_22977424_8 WHERE promoted_from_league = "Exeter Chiefs" | Name the number of names for exeter chiefs | CREATE TABLE table_22977424_8 (name VARCHAR, promoted_from_league VARCHAR) |
SELECT original_title FROM table_20963074_1 WHERE result = "Not Nominated" AND film_title_used_in_nomination = "Report on Death" | Name the original title for not nominated result with report on death | CREATE TABLE table_20963074_1 (original_title VARCHAR, result VARCHAR, film_title_used_in_nomination VARCHAR) |
SELECT COUNT(fin_pos) FROM table_17330069_1 WHERE points = "15" | If the points is 15, what is the fin. pos? | CREATE TABLE table_17330069_1 (
fin_pos VARCHAR,
points VARCHAR
) |
SELECT name FROM table_22977424_8 WHERE promoted_to_league = "Henley Manchester" | Name the name for henley manchester | CREATE TABLE table_22977424_8 (name VARCHAR, promoted_to_league VARCHAR) |
SELECT COUNT(result) FROM table_20963074_1 WHERE original_title = "Octubre" | Name the total number of results for octubre | CREATE TABLE table_20963074_1 (result VARCHAR, original_title VARCHAR) |
SELECT COUNT(percent_yes) FROM table_name_68 WHERE jurisdiction = "alberta" AND percent_no > 60.2 | What is the percent yes of Alberta, which had a percent no larger than 60.2? | CREATE TABLE table_name_68 (
percent_yes VARCHAR,
jurisdiction VARCHAR,
percent_no VARCHAR
) |
SELECT name FROM table_22977424_8 WHERE promoted_to_league = "Doncaster Newbury" | Name the name for doncaster newbury | CREATE TABLE table_22977424_8 (name VARCHAR, promoted_to_league VARCHAR) |
SELECT film_title_used_in_nomination FROM table_20963074_1 WHERE original_title = "La boca del lobo" | Name the film title for la boca del lobo | CREATE TABLE table_20963074_1 (film_title_used_in_nomination VARCHAR, original_title VARCHAR) |
SELECT "Title" FROM table_37099 WHERE "Dance Partner" = 'adele astaire' AND "Lyrics" = 'ira gershwin' AND "Director" = 'felix edwardes' | Which Title has a Dance Partner of adele astaire, and Lyrics of ira gershwin, and a Director of felix edwardes? | CREATE TABLE table_37099 (
"Title" text,
"Date" text,
"Theatre" text,
"Role" text,
"Dance Partner" text,
"Director" text,
"Lyrics" text,
"Music" text
) |
SELECT season FROM table_22977424_8 WHERE promoted_from_league = "Rotherham Titans" | Name the season for rotherham titans | CREATE TABLE table_22977424_8 (season VARCHAR, promoted_from_league VARCHAR) |
SELECT year__ceremony_ FROM table_20963074_1 WHERE original_title = "Reportaje a la muerte" | Name the year for reportaje a la muerte | CREATE TABLE table_20963074_1 (year__ceremony_ VARCHAR, original_title VARCHAR) |
SELECT "Joined" FROM table_28499 WHERE "Enrollment" = '1150' AND "Location" = 'Sioux City, Iowa' | How many joined when the enrollment was 1150 in Sioux City, Iowa? | CREATE TABLE table_28499 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" real,
"Nickname" text
) |
SELECT name FROM table_22977424_8 WHERE promoted_to_league = "Plymouth Albion Orrell" | Name the name for plymouth albion orrell | CREATE TABLE table_22977424_8 (name VARCHAR, promoted_to_league VARCHAR) |
SELECT COUNT(directed_by) FROM table_20942925_1 WHERE _number = 15 | How many directors for #15? | CREATE TABLE table_20942925_1 (directed_by VARCHAR, _number VARCHAR) |
SELECT year_opened FROM table_name_44 WHERE arena_venue = "san agustin gym" | What year did the San Agustin gym open? | CREATE TABLE table_name_44 (
year_opened VARCHAR,
arena_venue VARCHAR
) |
SELECT tail_number FROM table_229917_2 WHERE brief_description = "Crashed" | What's the tail number of the airplane involved in the accident described as crashed? | CREATE TABLE table_229917_2 (tail_number VARCHAR, brief_description VARCHAR) |
SELECT directed_by FROM table_20942925_1 WHERE production_code = "NABF13" | What is every director with production code of NABF13? | CREATE TABLE table_20942925_1 (directed_by VARCHAR, production_code VARCHAR) |
SELECT COUNT("No. in season") FROM table_23398 WHERE "No. in series" = 'US18' | What episode in the season was episode us18 in the series? | CREATE TABLE table_23398 (
"No. in series" text,
"No. in season" real,
"Family/families" text,
"Location(s)" text,
"Original air date" text
) |
SELECT COUNT(brief_description) FROM table_229917_2 WHERE fatalities = "0/161" | How many different brief descriptions are there for crashes with 0/161 fatalities? | CREATE TABLE table_229917_2 (brief_description VARCHAR, fatalities VARCHAR) |
SELECT us_viewers__millions_ FROM table_20942925_1 WHERE written_by = "Kevin Curran" | What are all values for U.S. viewers(millions) with Kevin Curran as a writer? | CREATE TABLE table_20942925_1 (us_viewers__millions_ VARCHAR, written_by VARCHAR) |
SELECT SUM(enr) FROM college WHERE NOT cName IN (SELECT cName FROM tryout WHERE pPos = "goalie") | What is the total number of enrollment of schools that do not have any goalie player? | CREATE TABLE tryout (
enr INTEGER,
cName VARCHAR,
pPos VARCHAR
)
CREATE TABLE college (
enr INTEGER,
cName VARCHAR,
pPos VARCHAR
) |
SELECT date__ddmmyyyy_ FROM table_229917_2 WHERE tail_number = "RA-85282" | When did the airplane with tail number RA-85282 crash? | CREATE TABLE table_229917_2 (date__ddmmyyyy_ VARCHAR, tail_number VARCHAR) |
SELECT COUNT(title) FROM table_20942925_1 WHERE production_code = "NABF07" | How many titles for the production code of NABF07? | CREATE TABLE table_20942925_1 (title VARCHAR, production_code VARCHAR) |
SELECT MAX(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'chro kidney dis stage ii') AND STRFTIME('%y', diagnoses_icd.charttime) >= '2102' GROUP BY STRFTIME('%y-%m', diagnoses_icd.charttime)) AS t1 | what is the maximum monthly number of patients who have had chro kidney dis stage ii since 2102? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
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 TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
) |
SELECT fatalities FROM table_229917_2 WHERE brief_description = "Ditched 300 m short of runway" | How many fatalities were there in the crash described as ditched 300 m short of runway? | CREATE TABLE table_229917_2 (fatalities VARCHAR, brief_description VARCHAR) |
SELECT COUNT(episode) FROM table_20971444_3 WHERE rating__18_49_ = "3.6" | Name the episode for 18-49 rating being 3.6 | CREATE TABLE table_20971444_3 (episode VARCHAR, rating__18_49_ VARCHAR) |
SELECT COUNT("Season") FROM table_4195 WHERE "Position" = '3rd' | How many seasons are there for the 3rd position? | CREATE TABLE table_4195 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" real,
"Position" text
) |
SELECT fatalities FROM table_229917_2 WHERE brief_description = "Crashed at take-off due to engine failure" | How many fatalities were there in the crash described as crashed at take-off due to engine failure? | CREATE TABLE table_229917_2 (fatalities VARCHAR, brief_description VARCHAR) |
SELECT rank__timeslot_ FROM table_20971444_3 WHERE viewers__millions_ = "11.59" | Name the rank timeslot for 11.59 viewers | CREATE TABLE table_20971444_3 (rank__timeslot_ VARCHAR, viewers__millions_ VARCHAR) |
SELECT COUNT(game) FROM table_23285849_10 WHERE team = "Clippers" | When the clippers are the team how many games are there? | CREATE TABLE table_23285849_10 (
game VARCHAR,
team VARCHAR
) |
SELECT MIN(class_year) FROM table_22982552_9 WHERE player = "Vencie Glenn" | What class year was Vencie Glenn from? | CREATE TABLE table_22982552_9 (class_year INTEGER, player VARCHAR) |
SELECT first_air_date FROM table_20971444_3 WHERE episode = 9 | Name the first air date for 9 episode | CREATE TABLE table_20971444_3 (first_air_date VARCHAR, episode VARCHAR) |
SELECT COUNT(*) FROM table_204_109 WHERE "result" = 're-elected' | what are the number of times re elected is listed as the result ? | CREATE TABLE table_204_109 (
id number,
"district" text,
"incumbent" text,
"party" text,
"first\nelected" text,
"result" text,
"candidates" text
) |
SELECT position FROM table_22982552_9 WHERE highlight_s_ = "5 career INTs" | What position did the player whose highlights were 5 career INTs play? | CREATE TABLE table_22982552_9 (position VARCHAR, highlight_s_ VARCHAR) |
SELECT COUNT(rank__timeslot_) FROM table_20971444_3 WHERE share__18_49_ = 13 | Name the rank timeslot for 18-49 share being 13 | CREATE TABLE table_20971444_3 (rank__timeslot_ VARCHAR, share__18_49_ VARCHAR) |
SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating | What are the names and seatings for all tracks opened after 2000, ordered by seating? | CREATE TABLE track (
track_id number,
name text,
location text,
seating number,
year_opened number
)
CREATE TABLE race (
race_id number,
name text,
class text,
date text,
track_id text
) |
SELECT MIN(class_year) FROM table_22982552_9 WHERE highlight_s_ = "35 career INTs" | What class year was the player whose highlights were 35 career INTs from? | CREATE TABLE table_22982552_9 (class_year INTEGER, highlight_s_ VARCHAR) |
SELECT COUNT(rank__timeslot_) FROM table_20971444_3 WHERE rating__18_49_ = "3.1" | Name the total number of rank timeslot for 18-49 being 3.1 | CREATE TABLE table_20971444_3 (rank__timeslot_ VARCHAR, rating__18_49_ VARCHAR) |
SELECT DISTINCT paperid FROM paper WHERE year = 2014 | papers from 2014 | CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE venue (
venueid int,
venuename varchar
) |
SELECT MIN(class_year) FROM table_22982552_9 WHERE teams = "Buffalo" | What class year was the player who played for Buffalo from? | CREATE TABLE table_22982552_9 (class_year INTEGER, teams VARCHAR) |
SELECT COUNT(share__18_49_) FROM table_20971444_3 WHERE rating__18_49_ = "3.1" | Name the total number for 18-49 share being 18-49 being 3.1 | CREATE TABLE table_20971444_3 (share__18_49_ VARCHAR, rating__18_49_ VARCHAR) |
SELECT visitor FROM table_name_69 WHERE date = "january 10" | Which team was the visitor on January 10? | CREATE TABLE table_name_69 (
visitor VARCHAR,
date VARCHAR
) |
SELECT MIN(gore__number) FROM table_23014476_1 WHERE others__number = "6.6%" | Name the gore number for others # 6.6% | CREATE TABLE table_23014476_1 (gore__number INTEGER, others__number VARCHAR) |
SELECT date FROM table_20996923_20 WHERE bowl_game = "Champs Sports Bowl" | What was the date for the Champs Sports Bowl? | CREATE TABLE table_20996923_20 (date VARCHAR, bowl_game VARCHAR) |
SELECT "Spokesperson" FROM table_2192 WHERE "Dual Commentator" = 'Elena Batinova' | state all spokesperson for the channel where dual commentator was elena batinova | CREATE TABLE table_2192 (
"Year(s)" real,
"Commentator" text,
"Dual Commentator" text,
"Spokesperson" text,
"Channel" text
) |
SELECT others__percentage FROM table_23014476_1 WHERE bush__number = 1372 | Name the others % for bush number 1372 | CREATE TABLE table_23014476_1 (others__percentage VARCHAR, bush__number VARCHAR) |
SELECT date FROM table_20996923_20 WHERE city = "San Antonio, Texas" | What is the date when the city is San Antonio, Texas? | CREATE TABLE table_20996923_20 (date VARCHAR, city VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admityear < "2107" | list the number of patients who were admitted before the year 2107. | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) |
SELECT gore__number FROM table_23014476_1 WHERE others__percentage = "5.3%" | Name the gore number for others % being 5.3% | CREATE TABLE table_23014476_1 (gore__number VARCHAR, others__percentage VARCHAR) |
SELECT city FROM table_20996923_20 WHERE television = "NFL Network" | What is the city when the Television network was the NFL Network? | CREATE TABLE table_20996923_20 (city VARCHAR, television VARCHAR) |
SELECT "Remelting at (\u00b0C)" FROM table_43083 WHERE "Sn/Sb (%)" = '9.5/15' | What is the remelting temperature for the alloy that has a Sn/Sb ratio of 9.5/15? | CREATE TABLE table_43083 (
"Usage" text,
"Sn/Sb (%)" text,
"Liquid at (\u00b0C)" text,
"Casting at (\u00b0C)" text,
"Remelting at (\u00b0C)" text,
"Hardness" text
) |
SELECT county FROM table_23014476_1 WHERE others__percentage = "5.8" | Name the couty for others% 5.8 | CREATE TABLE table_23014476_1 (county VARCHAR, others__percentage VARCHAR) |
SELECT COUNT(opponent) FROM table_21007615_1 WHERE sun_devils_points = 41 | How many opponents did the Sun Devils play when they scored 41 points? | CREATE TABLE table_21007615_1 (opponent VARCHAR, sun_devils_points VARCHAR) |
SELECT COUNT("Report") FROM table_2697 WHERE "Date" = 'July 23' | Name the total number for report july 23 | CREATE TABLE table_2697 (
"Year" real,
"Date" text,
"Driver" text,
"Team" text,
"Manufacturer" text,
"Laps" text,
"Miles (km)" text,
"Race Time" text,
"Average Speed (mph)" text,
"Report" text
) |
SELECT COUNT(bush__percentage) FROM table_23014476_1 WHERE county = "Elko" | Name the number of bush % for elko | CREATE TABLE table_23014476_1 (bush__percentage VARCHAR, county VARCHAR) |
SELECT record FROM table_21007615_1 WHERE sun_devils_points = 44 | What was the record for the Sun Devils when they scored 44 points? | CREATE TABLE table_21007615_1 (record VARCHAR, sun_devils_points VARCHAR) |
SELECT recopa_sudamericana_1998 FROM table_14962316_9 WHERE team = "Flamengo" | Did Flamengo play in the Recopa Sudamericana in 1998 | CREATE TABLE table_14962316_9 (
recopa_sudamericana_1998 VARCHAR,
team VARCHAR
) |
SELECT team FROM table_22998777_1 WHERE poles = 1 AND series = "ADAC GT Masters" | If the series is ADAC GT Masters and poles is 1, what is the name of the team? | CREATE TABLE table_22998777_1 (team VARCHAR, poles VARCHAR, series VARCHAR) |
SELECT length_weight_of_missile FROM table_21012786_2 WHERE diameter_of_torsion_spring = "38.4cm" | When the torsion spring diameter is 38.4cm what would be the length or weight of the missile | CREATE TABLE table_21012786_2 (length_weight_of_missile VARCHAR, diameter_of_torsion_spring VARCHAR) |
SELECT line FROM table_1612760_1 WHERE service_pattern = "Fast to Norwood Junction" | Which line offers Fast to Norwood Junction? | CREATE TABLE table_1612760_1 (
line VARCHAR,
service_pattern VARCHAR
) |
SELECT COUNT(season) FROM table_22998777_1 WHERE position = "26th" | If the position of 26th what is the season total number? | CREATE TABLE table_22998777_1 (season VARCHAR, position VARCHAR) |
SELECT written_by FROM table_21025437_5 WHERE viewers__millions_ = "8.84" | Who wrote the episode that had 8.84 million viewers? | CREATE TABLE table_21025437_5 (written_by VARCHAR, viewers__millions_ VARCHAR) |
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-9636')) AND medication.drugname = 'calcium gluconate 10%' AND STRFTIME('%y-%m', medication.drugstarttime) >= '2105-12' | did patient 016-9636 have calcium gluconate 10% prescribed since 12/2105? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
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,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
) |
SELECT season FROM table_22998777_1 WHERE points = "41" | If the points is 41, what is the season? | CREATE TABLE table_22998777_1 (season VARCHAR, points VARCHAR) |
SELECT viewers__millions_ FROM table_21025437_5 WHERE episode_no = 20 | How many million viewers watched episode number 20? | CREATE TABLE table_21025437_5 (viewers__millions_ VARCHAR, episode_no VARCHAR) |
SELECT T1.city, COUNT(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY COUNT(*) DESC LIMIT 1 | Which city lives most of staffs? List the city name and number of staffs. | CREATE TABLE Addresses (
city VARCHAR,
address_id VARCHAR
)
CREATE TABLE Staff (
staff_address_id VARCHAR
) |
SELECT COUNT(season) FROM table_23014923_1 WHERE primary__south__winners = "Inter The Bloomfield" | If the primary (South) winners is Inter The Bloomfield, what is the season total number? | CREATE TABLE table_23014923_1 (season VARCHAR, primary__south__winners VARCHAR) |
SELECT title FROM table_21025437_5 WHERE written_by = "Keith Temple" | What was the title of the episode written by Keith Temple? | CREATE TABLE table_21025437_5 (title VARCHAR, written_by VARCHAR) |
SELECT MAX("Season") FROM table_21429 WHERE "Points" = '0' AND "Position" = '31st' | Which season did he have 0 points and 31st position? | CREATE TABLE table_21429 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"FLaps" real,
"Podiums" real,
"Points" real,
"Position" text
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.