answer
stringlengths 6
3.91k
| question
stringlengths 7
766
| context
stringlengths 27
7.14k
|
|---|---|---|
SELECT traditional FROM table_1300525_1 WHERE area = 2331
|
What is the traditional way to write the name of the district who's area is 2331?
|
CREATE TABLE table_1300525_1 (traditional VARCHAR, area VARCHAR)
|
SELECT All_Games, School_ID FROM basketball_match
|
Draw a bar chart about the distribution of All_Games and School_ID .
|
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 (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
|
SELECT country FROM table_20669355_2 WHERE hometown = "San Francisco de Yojoa"
|
What country is the contestant from San Francisco de Yojoa from?
|
CREATE TABLE table_20669355_2 (country VARCHAR, hometown VARCHAR)
|
SELECT COUNT(pinyin) FROM table_1300525_1 WHERE simplified = "信州区"
|
What is the capital of the district who's simplified name is 信州区?
|
CREATE TABLE table_1300525_1 (pinyin VARCHAR, simplified VARCHAR)
|
SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1
|
What is the name of the instructor who advises the student with the greatest number of total credits?
|
CREATE TABLE instructor (
id text,
name text,
dept_name text,
salary number
)
CREATE TABLE takes (
id text,
course_id text,
sec_id text,
semester text,
year number,
grade text
)
CREATE TABLE course (
course_id text,
title text,
dept_name text,
credits number
)
CREATE TABLE time_slot (
time_slot_id text,
day text,
start_hr number,
start_min number,
end_hr number,
end_min number
)
CREATE TABLE advisor (
s_id text,
i_id text
)
CREATE TABLE classroom (
building text,
room_number text,
capacity number
)
CREATE TABLE student (
id text,
name text,
dept_name text,
tot_cred number
)
CREATE TABLE teaches (
id text,
course_id text,
sec_id text,
semester text,
year number
)
CREATE TABLE section (
course_id text,
sec_id text,
semester text,
year number,
building text,
room_number text,
time_slot_id text
)
CREATE TABLE prereq (
course_id text,
prereq_id text
)
CREATE TABLE department (
dept_name text,
building text,
budget number
)
|
SELECT COUNT(height__ft_) FROM table_20669355_2 WHERE hometown = "Warsaw"
|
How many different heights are there for the contestants from Warsaw?
|
CREATE TABLE table_20669355_2 (height__ft_ VARCHAR, hometown VARCHAR)
|
SELECT population FROM table_1300525_1 WHERE pinyin = "Héngfēng Xiàn"
|
How many people live in the district who's capital is héngfēng xiàn?
|
CREATE TABLE table_1300525_1 (population VARCHAR, pinyin VARCHAR)
|
SELECT "Singular Word" FROM table_58004 WHERE "Singular abbreviation" = 'p.'
|
A singular abbreviation of p. is used for what singular word?
|
CREATE TABLE table_58004 (
"Singular abbreviation" text,
"Singular Word" text,
"Plural abbreviation" text,
"Plural Word" text,
"Discipline" text
)
|
SELECT COUNT(county) FROM table_20688030_1 WHERE obama_percentage = "35.44%"
|
What is the total of countys where Obama is popular by 35.44%?
|
CREATE TABLE table_20688030_1 (county VARCHAR, obama_percentage VARCHAR)
|
SELECT COUNT(density) FROM table_1300525_1 WHERE english_name = "Yushan County"
|
What is the density of yushan county?
|
CREATE TABLE table_1300525_1 (density VARCHAR, english_name VARCHAR)
|
SELECT "Time" FROM table_80294 WHERE "Writer(s)" = 'aaron schroeder and wally gold'
|
What is the time of songs that have the writer Aaron Schroeder and Wally Gold?
|
CREATE TABLE table_80294 (
"Track" real,
"Recorded" text,
"Catalogue" text,
"Release Date" text,
"Chart Peak" text,
"Song Title" text,
"Writer(s)" text,
"Time" text
)
|
SELECT mccain_percentage FROM table_20688030_1 WHERE obama_percentage = "36.47%"
|
What are McCain's Percent when Obama has 36.47%?
|
CREATE TABLE table_20688030_1 (mccain_percentage VARCHAR, obama_percentage VARCHAR)
|
SELECT MAX(gold_medals) FROM table_1305623_12 WHERE ensemble = "Choctawhatchee High School"
|
How many gold medals does the Choctawhatchee High School have?
|
CREATE TABLE table_1305623_12 (gold_medals INTEGER, ensemble VARCHAR)
|
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.route = "BUCCAL"
|
count the number of patients whose admission type is emergency and drug route is buccal.
|
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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
|
SELECT COUNT(mccain_number) FROM table_20688030_1 WHERE obama_percentage = "39.13%"
|
What is McCains percent when Obamas is 39.13%
|
CREATE TABLE table_20688030_1 (mccain_number VARCHAR, obama_percentage VARCHAR)
|
SELECT gold_medals FROM table_1305623_12 WHERE total_medals = 1
|
How many gold medals does each school who has a total of 1 medal have?
|
CREATE TABLE table_1305623_12 (gold_medals VARCHAR, total_medals VARCHAR)
|
SELECT Id AS "post_link" FROM Posts WHERE NOT Title LIKE '%Who%' AND NOT Title LIKE '%What%' AND NOT Title LIKE '%When%' AND NOT Title LIKE '%Where%' AND NOT Title LIKE '%Why%' AND NOT Title LIKE '%How%' AND NOT Title LIKE '%Can%' AND NOT Title LIKE '%Is%' AND NOT Title LIKE '%Which%' AND NOT Title LIKE '%Was%' AND NOT Title LIKE '%Are%' AND NOT Title LIKE '%Has%' AND NOT Title LIKE '%Will%' AND NOT Title LIKE '%Do%' AND NOT Title LIKE '%?%' AND ClosedDate IS NULL ORDER BY CreationDate DESC
|
Find questions titles that are not phrased as questions. Find question titles that do not contain the Five Ws (Who, What, When, Where and why), interrogative words, and question marks.
This query MAY be useful for identifying titles that aren't phrased as a question or low quality questions.
Special thanks: s.tk/users/398665
|
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId 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 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 ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
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 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 SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
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 VoteTypes (
Id number,
Name 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 PostTags (
PostId number,
TagId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskResultTypes (
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 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 ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
|
SELECT MAX(obama_number) FROM table_20688030_1 WHERE county = "Wayne"
|
What is the maximum Obama supporters in Wayne county?
|
CREATE TABLE table_20688030_1 (obama_number INTEGER, county VARCHAR)
|
SELECT time FROM table_13050822_2 WHERE stage = "SS18"
|
What is the time for stage ss18?
|
CREATE TABLE table_13050822_2 (time VARCHAR, stage VARCHAR)
|
SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'
|
Find the schools that were either founded after 1850 or public.
|
CREATE TABLE university (
school VARCHAR,
founded VARCHAR,
affiliation VARCHAR
)
|
SELECT population__may_1, _2000_ FROM table_2068761_1 WHERE barangay = "General Terrero"
|
Name th epopulation may for general terrero
|
CREATE TABLE table_2068761_1 (population__may_1 VARCHAR, _2000_ VARCHAR, barangay VARCHAR)
|
SELECT length FROM table_13050822_2 WHERE stage = "SS22"
|
Name the length for stage ss22
|
CREATE TABLE table_13050822_2 (length VARCHAR, stage VARCHAR)
|
SELECT "2nd member" FROM table_62448 WHERE "Assembled" = '3 november 1529'
|
Who was the 2nd member of the parliament that was assembled on 3 november 1529?
|
CREATE TABLE table_62448 (
"Elected" text,
"Assembled" text,
"Dissolved" text,
"1st member" text,
"2nd member" text
)
|
SELECT season__number FROM table_20704243_3 WHERE series__number = 23
|
What is the season number for Series #23, the Runway Job?
|
CREATE TABLE table_20704243_3 (season__number VARCHAR, series__number VARCHAR)
|
SELECT COUNT(leg) FROM table_13050822_2 WHERE stage = "SS17"
|
What is the number of leg for ss17
|
CREATE TABLE table_13050822_2 (leg VARCHAR, stage VARCHAR)
|
SELECT MIN(pick) FROM table_name_21 WHERE name = "mike flater"
|
Lowest pick for mike flater?
|
CREATE TABLE table_name_21 (
pick INTEGER,
name VARCHAR
)
|
SELECT MIN(series__number) FROM table_20704243_3 WHERE directed_by = "Mark Roskin"
|
What series was directed by Mark Roskin?
|
CREATE TABLE table_20704243_3 (series__number INTEGER, directed_by VARCHAR)
|
SELECT leg FROM table_13050822_2 WHERE rally_leader = "C. Atkinson"
|
What is the leg for c. atkinson
|
CREATE TABLE table_13050822_2 (leg VARCHAR, rally_leader VARCHAR)
|
SELECT p.Id AS "post_link", COUNT(v.Id) FROM Votes AS v JOIN Posts AS p ON v.PostId = p.Id WHERE (p.OwnerUserId = '##id?210401##') AND (v.VoteTypeId = 3) GROUP BY p.Id ORDER BY p.Id
|
Numbers of downvotes on posts by a specific user.
|
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 PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
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 PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description 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 SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
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 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 TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
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
)
|
SELECT COUNT(written_by) FROM table_20704243_3 WHERE directed_by = "Peter Winther"
|
How many were written by Peter Winther?
|
CREATE TABLE table_20704243_3 (written_by VARCHAR, directed_by VARCHAR)
|
SELECT MIN(bronze_medals) FROM table_1305623_6
|
What's the smallest number of bronze medals that any one if the ensembles has?
|
CREATE TABLE table_1305623_6 (bronze_medals INTEGER)
|
SELECT demographic.name, demographic.dod FROM demographic WHERE demographic.subject_id = "2560"
|
what is subject name and date of death of subject id 2560?
|
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 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 (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
|
SELECT COUNT(directed_by) FROM table_20704243_3 WHERE season__number = 2
|
How many directors were in Season 2?
|
CREATE TABLE table_20704243_3 (directed_by VARCHAR, season__number VARCHAR)
|
SELECT rev FROM table_1310499_1 WHERE application = "2003-2004 Mustang Cobra"
|
What is the rev of the 2003-2004 Mustang Cobra?
|
CREATE TABLE table_1310499_1 (rev VARCHAR, application VARCHAR)
|
SELECT MAX("Weight") FROM table_1009 WHERE "Height" = '6'' 2'
|
What is the weight for the player who is 6' 2'?
|
CREATE TABLE table_1009 (
"Player" text,
"Position" text,
"Games started" text,
"Hometown" text,
"Height" text,
"Weight" real,
"Class" text,
"Prior experience" text
)
|
SELECT original_air_date FROM table_20704243_4 WHERE written_by = "Albert Kim"
|
When was the episode written by Albert Kim aired for the first time?
|
CREATE TABLE table_20704243_4 (original_air_date VARCHAR, written_by VARCHAR)
|
SELECT rev FROM table_1310499_1 WHERE application = "Aston Martin"
|
What is the rev for all of the Aston Martin applications?
|
CREATE TABLE table_1310499_1 (rev VARCHAR, application VARCHAR)
|
SELECT MIN("No. in series") FROM table_23412
|
Name the least number in series
|
CREATE TABLE table_23412 (
"No. overall" text,
"No. in series" real,
"Family/families" text,
"Location(s)" text,
"Original air date" text
)
|
SELECT series__number FROM table_20704243_5 WHERE written_by = "M. Scott Veach & Rebecca Kirsch"
|
Name the series number for m. scott veach & rebecca kirsch
|
CREATE TABLE table_20704243_5 (series__number VARCHAR, written_by VARCHAR)
|
SELECT 3 AS rd FROM table_1310499_1 WHERE input_splines = 26 AND tag_id = "1386-000-017"
|
What is the 3rd ratio for tag number 1386-000-017 and input splines of 26?
|
CREATE TABLE table_1310499_1 (input_splines VARCHAR, tag_id VARCHAR)
|
SELECT COUNT("Total") FROM table_33072 WHERE "Associate professors" > '4' AND "Lecturers" = '5' AND "Professors" < '40'
|
What is the total in the case when there are more than 4 associate professors, 5 lecturers and fewer professors than 40?
|
CREATE TABLE table_33072 (
"Lecturers" real,
"Associate professors" real,
"Assistant professors" real,
"Professors" real,
"Total" real
)
|
SELECT us_viewers__in_millions_ FROM table_20704243_5 WHERE series__number = 50
|
Name the number of viewers for series number 50
|
CREATE TABLE table_20704243_5 (us_viewers__in_millions_ VARCHAR, series__number VARCHAR)
|
SELECT 2 AS nd FROM table_1310499_1 WHERE application = "1996-2002 Dodge Viper"
|
What is the 2nd ratio of 1996-2002 Dodge Viper?
|
CREATE TABLE table_1310499_1 (application VARCHAR)
|
SELECT translation FROM table_23915_4 WHERE ipa___rio_de_janeiro__ = "ki̥ mo̞ɕˈtɾaɾɜ̃w̃ nɐ ˈtɛʁə tɕĩʑiˈtɜ̃nə"
|
What is the original of the ipa ( rio de janeiro )translation ki mo t a w n t t i t n ?
|
CREATE TABLE table_23915_4 (
translation VARCHAR,
ipa___rio_de_janeiro__ VARCHAR
)
|
SELECT directed_by FROM table_20704243_5 WHERE season__number = 1
|
Name who directed season 1
|
CREATE TABLE table_20704243_5 (directed_by VARCHAR, season__number VARCHAR)
|
SELECT client FROM table_13150274_1 WHERE area_of_operation = "EchiraX Concession"
|
Whose address of operation was the Echirax Concession?
|
CREATE TABLE table_13150274_1 (client VARCHAR, area_of_operation VARCHAR)
|
SELECT apt_type_code, COUNT(apt_type_code) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = "Kyle" GROUP BY apt_type_code ORDER BY COUNT(apt_type_code)
|
How many buildings are managed by 'Kyle'? Return a bar chart grouping by apartment type codes, list y-axis in asc order.
|
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
|
SELECT COUNT(moment_of_inertia_in_torsion__j___cm_4__) FROM table_2071644_1 WHERE beam_height__mm_ = 120
|
What is the moment of intertia in torsion (j) Cm4) for the beam height (mm) 120??=
|
CREATE TABLE table_2071644_1 (moment_of_inertia_in_torsion__j___cm_4__ VARCHAR, beam_height__mm_ VARCHAR)
|
SELECT years_of_operation FROM table_13150274_1 WHERE area_of_operation = "Field 103"
|
When was the operation in Field 103 executed?
|
CREATE TABLE table_13150274_1 (years_of_operation VARCHAR, area_of_operation VARCHAR)
|
SELECT title FROM table_25740548_4 WHERE us_viewers__million_ = "2.75"
|
Which episode had 2.75 million viewers in the U.S.?
|
CREATE TABLE table_25740548_4 (
title VARCHAR,
us_viewers__million_ VARCHAR
)
|
SELECT cross_section_area__cm_2__ FROM table_2071644_1 WHERE moment_of_inertia_in_torsion__j___cm_4__ = "2.54"
|
What is the cross section area (cm 2) for the moment of intertia in torsion (j) (cm 4) 2.54?
|
CREATE TABLE table_2071644_1 (cross_section_area__cm_2__ VARCHAR, moment_of_inertia_in_torsion__j___cm_4__ VARCHAR)
|
SELECT country FROM table_13150274_1 WHERE area_of_operation = "El Hamada"
|
In what country is the El Hamada area of operation?
|
CREATE TABLE table_13150274_1 (country VARCHAR, area_of_operation VARCHAR)
|
SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = "Badlands" AND T1.StagePosition = "back"
|
Who is performing in the back stage position for the song 'Badlands'? Show the first name and the last name.
|
CREATE TABLE Songs (
SongId VARCHAR,
Title VARCHAR
)
CREATE TABLE Performance (
bandmate VARCHAR,
SongId VARCHAR,
StagePosition VARCHAR
)
CREATE TABLE Band (
firstname VARCHAR,
lastname VARCHAR,
id VARCHAR
)
|
SELECT flange_thickness__mm_ FROM table_2071644_1 WHERE weight__kg_m_ = "6.0"
|
What is the flange thickness (mm) for the weight (kg/m) 6.0?Wg
|
CREATE TABLE table_2071644_1 (flange_thickness__mm_ VARCHAR, weight__kg_m_ VARCHAR)
|
SELECT COUNT(3 AS rd_pl) FROM table_13196576_2 WHERE team = "Ducati Xerox"
|
What is the total number for 3rd place for ducati xerox?
|
CREATE TABLE table_13196576_2 (team VARCHAR)
|
SELECT "Class" FROM table_50829 WHERE "Part 4" = '*alanaz'
|
Which class has *alanaz as Part 4?
|
CREATE TABLE table_50829 (
"Class" text,
"Part 1" text,
"Part 2" text,
"Part 3" text,
"Part 4" text,
"Verb meaning" text
)
|
SELECT COUNT(moment_of_inertia_in_torsion__j___cm_4__) FROM table_2071644_1 WHERE web_thickness__mm_ = "4.7"
|
What is the number for the moment of intertia in torsion (j) (cm 4) for the 4.7 web thickness (mm)?
|
CREATE TABLE table_2071644_1 (moment_of_inertia_in_torsion__j___cm_4__ VARCHAR, web_thickness__mm_ VARCHAR)
|
SELECT je_armstrong FROM table_1320857_1 WHERE wh_archer = "D.M. Lawson"
|
Who is J.E. Armstrong when W.H. Archer is D.M. Lawson?
|
CREATE TABLE table_1320857_1 (je_armstrong VARCHAR, wh_archer VARCHAR)
|
SELECT score FROM table_name_77 WHERE money___$__ = 400
|
Which score has a prize of $400?
|
CREATE TABLE table_name_77 (
score VARCHAR,
money___$__ VARCHAR
)
|
SELECT flange_thickness__mm_ FROM table_2071644_1 WHERE weight__kg_m_ = "10.4"
|
What is the flange thickness (mm) for the weight (kg/m) 10.4?
|
CREATE TABLE table_2071644_1 (flange_thickness__mm_ VARCHAR, weight__kg_m_ VARCHAR)
|
SELECT fa_brill FROM table_1320857_1 WHERE wh_archer = "R. Newman"
|
What are the fa.brill when w.h. archer is known as r. newman?
|
CREATE TABLE table_1320857_1 (fa_brill VARCHAR, wh_archer VARCHAR)
|
SELECT "Team 2" FROM table_7911 WHERE "Team 1" = 'fc rouen (d1)'
|
what is team 2 when team 1 is fc rouen (d1)?
|
CREATE TABLE table_7911 (
"Team 1" text,
"Score" text,
"Team 2" text,
"1st round" text,
"2nd round" text
)
|
SELECT COUNT(flange_width__mm_) FROM table_2071644_1 WHERE cross_section_area__cm_2__ = "16.4"
|
What is the flange width (mm) for cross section area (cm 2) 16.4?
|
CREATE TABLE table_2071644_1 (flange_width__mm_ VARCHAR, cross_section_area__cm_2__ VARCHAR)
|
SELECT hl_birkett FROM table_1320857_1 WHERE wh_archer = "R. Cochrane"
|
Who is h.l birkett if w.h. archer is r. cochrane?
|
CREATE TABLE table_1320857_1 (hl_birkett VARCHAR, wh_archer VARCHAR)
|
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "NEOPLASM OF UNCERTAIN BEHAVIOR OF OTHER LYMPHATIC AND HEMATOPOIETIC TISSUES\BONE MARROW TRANSPLANT"
|
count the number of patients who had emergency admission with neoplasm of uncertain behavior of other lymphatic and hematopoietic tissues/bone marrow transplant as primary disease.
|
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 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 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
|
SELECT lyon__32_ FROM table_20711545_1 WHERE seed = 5
|
In what round was lyon (32) a 5 seed?
|
CREATE TABLE table_20711545_1 (lyon__32_ VARCHAR, seed VARCHAR)
|
SELECT ht_brewer FROM table_1320857_1 WHERE je_armstrong = "A.J. Wilson"
|
Who is h.t. brewer when j.e. armstrong is a.j. wilson?
|
CREATE TABLE table_1320857_1 (ht_brewer VARCHAR, je_armstrong VARCHAR)
|
SELECT PostTypeId, COUNT(PostTypeId) FROM Posts GROUP BY PostTypeId
|
select PostTypeId, count(PostTypeId) from user Posts by PostTypeId.
|
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 ReviewTaskResultTypes (
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 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 TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
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 ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
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 PostHistoryTypes (
Id number,
Name 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,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
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 PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
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 PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
|
SELECT COUNT(marseille__32_draw_) FROM table_20711545_1 WHERE seed = 2
|
How many items were recorded marseille (32 draw) was a 2 seed?
|
CREATE TABLE table_20711545_1 (marseille__32_draw_ VARCHAR, seed VARCHAR)
|
SELECT ht_brewer FROM table_1320857_1 WHERE je_armstrong = "C.P. Greeks"
|
Who is h.t. brewer when je armstrong is c.p. greeks?
|
CREATE TABLE table_1320857_1 (ht_brewer VARCHAR, je_armstrong VARCHAR)
|
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE program_course.course_id = course.course_id AND program_course.course_id = course.course_id AND program.name LIKE '%CS%' AND program.program_id = program_course.program_id AND semester.semester = 'Summer' AND semester.semester_id = course_offering.semester AND semester.year = 2016
|
In Summer , name the classes that are available that count towards CS major .
|
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
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_projects varchar,
has_exams varchar,
num_reviews int,
clarity_score int,
easiness_score int,
helpfulness_score int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments int,
respected int,
participation int,
heavy_reading int,
tough_grader int,
hilarious int,
would_take_again int,
good_lecture int,
no_skip int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
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_project varchar,
has_final_exam varchar,
textbook varchar,
class_address varchar,
allow_audit varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
|
SELECT MAX(seed) FROM table_20711545_1 WHERE lyon__32_ = "DNQ"
|
What is the seed for lyon (32) was DNQ?
|
CREATE TABLE table_20711545_1 (seed INTEGER, lyon__32_ VARCHAR)
|
SELECT part_2 FROM table_13241993_3 WHERE part_1 = "January 31, 2008"
|
What was the air date of part 2 of the episode whose part 1 was aired on January 31, 2008?
|
CREATE TABLE table_13241993_3 (part_2 VARCHAR, part_1 VARCHAR)
|
SELECT "Socket" FROM table_76109 WHERE "Release date" = 'september 10, 2009' AND "Order part number" = 'amm300dbo22gq'
|
What is the socket with an order part number of amm300dbo22gq and a September 10, 2009 release date?
|
CREATE TABLE table_76109 (
"Model number" text,
"Frequency" text,
"L2 cache" text,
"FPU width" text,
"Multi 1" text,
"Socket" text,
"Release date" text,
"Order part number" text
)
|
SELECT paris__48___byes_ FROM table_20711545_1 WHERE seed = 3
|
What was the result for Paris(48-byes) for 3 seed?
|
CREATE TABLE table_20711545_1 (paris__48___byes_ VARCHAR, seed VARCHAR)
|
SELECT title FROM table_13241993_3 WHERE part_3 = "February 7, 2008"
|
What's the name of the episode whose part 3 aired on February 7, 2008?
|
CREATE TABLE table_13241993_3 (title VARCHAR, part_3 VARCHAR)
|
SELECT Status, AVG(Population) FROM city GROUP BY Status ORDER BY AVG(Population) DESC
|
Give me a histogram for what are the statuses and average populations of each city?, could you sort Y from high to low order?
|
CREATE TABLE city (
City_ID int,
Official_Name text,
Status text,
Area_km_2 real,
Population real,
Census_Ranking text
)
CREATE TABLE competition_record (
Competition_ID int,
Farm_ID int,
Rank int
)
CREATE TABLE farm (
Farm_ID int,
Year int,
Total_Horses real,
Working_Horses real,
Total_Cattle real,
Oxen real,
Bulls real,
Cows real,
Pigs real,
Sheep_and_Goats real
)
CREATE TABLE farm_competition (
Competition_ID int,
Year int,
Theme text,
Host_city_ID int,
Hosts text
)
|
SELECT mccain_percentage FROM table_20722805_1 WHERE obama_percentage = "64.39%"
|
What was McCain's percentage when Obama had 64.39% of the vote?
|
CREATE TABLE table_20722805_1 (mccain_percentage VARCHAR, obama_percentage VARCHAR)
|
SELECT part_1 FROM table_13241993_3 WHERE part_2 = "December 2, 2007"
|
What's the air date of part 1 of the episode whose part 2 aired on December 2, 2007?
|
CREATE TABLE table_13241993_3 (part_1 VARCHAR, part_2 VARCHAR)
|
SELECT "Injured" FROM table_61197 WHERE "Location" = 'skierlik'
|
What is the injured that has skierlik as the location?
|
CREATE TABLE table_61197 (
"Date" text,
"Year" real,
"Location" text,
"Country" text,
"Killed" text,
"Injured" text
)
|
SELECT MIN(mccain_number) FROM table_20722805_1 WHERE obama_percentage = "48.35%"
|
What was McCain's vote when Obama had 48.35%
|
CREATE TABLE table_20722805_1 (mccain_number INTEGER, obama_percentage VARCHAR)
|
SELECT COUNT(part_6) FROM table_13241993_3 WHERE episode__number = 5
|
How many part 6 parts are there in the episode number 5?
|
CREATE TABLE table_13241993_3 (part_6 VARCHAR, episode__number VARCHAR)
|
SELECT "Incumbent" FROM table_18480 WHERE "First elected" = '1944'
|
Who is the incumbent first elected in 1944?
|
CREATE TABLE table_18480 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
|
SELECT MIN(obama_number) FROM table_20722805_1 WHERE obama_percentage = "32.12%"
|
How many votes did Obama have at 32.12%
|
CREATE TABLE table_20722805_1 (obama_number INTEGER, obama_percentage VARCHAR)
|
SELECT record FROM table_13258823_2 WHERE opponent = "Atlanta Falcons"
|
Name the record with opponent atlanta falcons
|
CREATE TABLE table_13258823_2 (record VARCHAR, opponent VARCHAR)
|
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "M" AND procedures.short_title = "Sm-to-sm bowel anastom"
|
how many male patients had sm-to-sm bowel anastom?
|
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 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
|
SELECT parish FROM table_20722805_1 WHERE mccain_percentage = "45.37%"
|
What parish did McCain have 45.37% of the votes?
|
CREATE TABLE table_20722805_1 (parish VARCHAR, mccain_percentage VARCHAR)
|
SELECT COUNT(opponent) FROM table_13258823_2 WHERE game_site = "Arrowhead Stadium"
|
Name the number of opponent with arrowhead stadium
|
CREATE TABLE table_13258823_2 (opponent VARCHAR, game_site VARCHAR)
|
SELECT name, COUNT(name) FROM constructors AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY name ORDER BY COUNT(name) DESC
|
Find the names of Japanese constructors that have once earned more than 5 points, and count them by a bar chart, could you order total number from high to low order please?
|
CREATE TABLE constructors (
constructorId INTEGER,
constructorRef TEXT,
name TEXT,
nationality TEXT,
url TEXT
)
CREATE TABLE circuits (
circuitId INTEGER,
circuitRef TEXT,
name TEXT,
location TEXT,
country TEXT,
lat REAL,
lng REAL,
alt TEXT,
url TEXT
)
CREATE TABLE pitStops (
raceId INTEGER,
driverId INTEGER,
stop INTEGER,
lap INTEGER,
time TEXT,
duration TEXT,
milliseconds INTEGER
)
CREATE TABLE status (
statusId INTEGER,
status TEXT
)
CREATE TABLE lapTimes (
raceId INTEGER,
driverId INTEGER,
lap INTEGER,
position INTEGER,
time TEXT,
milliseconds INTEGER
)
CREATE TABLE drivers (
driverId INTEGER,
driverRef TEXT,
number TEXT,
code TEXT,
forename TEXT,
surname TEXT,
dob TEXT,
nationality TEXT,
url TEXT
)
CREATE TABLE qualifying (
qualifyId INTEGER,
raceId INTEGER,
driverId INTEGER,
constructorId INTEGER,
number INTEGER,
position INTEGER,
q1 TEXT,
q2 TEXT,
q3 TEXT
)
CREATE TABLE seasons (
year INTEGER,
url TEXT
)
CREATE TABLE constructorResults (
constructorResultsId INTEGER,
raceId INTEGER,
constructorId INTEGER,
points REAL,
status TEXT
)
CREATE TABLE races (
raceId INTEGER,
year INTEGER,
round INTEGER,
circuitId INTEGER,
name TEXT,
date TEXT,
time TEXT,
url TEXT
)
CREATE TABLE driverStandings (
driverStandingsId INTEGER,
raceId INTEGER,
driverId INTEGER,
points REAL,
position INTEGER,
positionText TEXT,
wins INTEGER
)
CREATE TABLE results (
resultId INTEGER,
raceId INTEGER,
driverId INTEGER,
constructorId INTEGER,
number INTEGER,
grid INTEGER,
position TEXT,
positionText TEXT,
positionOrder INTEGER,
points REAL,
laps TEXT,
time TEXT,
milliseconds TEXT,
fastestLap TEXT,
rank TEXT,
fastestLapTime TEXT,
fastestLapSpeed TEXT,
statusId INTEGER
)
CREATE TABLE constructorStandings (
constructorStandingsId INTEGER,
raceId INTEGER,
constructorId INTEGER,
points REAL,
position INTEGER,
positionText TEXT,
wins INTEGER
)
|
SELECT MAX(mccain_number) FROM table_20722805_1 WHERE parish = "Webster"
|
What is the total number of votes McCain had in Webster?
|
CREATE TABLE table_20722805_1 (mccain_number INTEGER, parish VARCHAR)
|
SELECT date FROM table_13258823_2 WHERE record = "1-0"
|
Name the date with the record of 1-0
|
CREATE TABLE table_13258823_2 (date VARCHAR, record VARCHAR)
|
SELECT "Lyricist" FROM table_109 WHERE "Length" = '6:14'
|
Which lyricist has a song with a length of 6:14?
|
CREATE TABLE table_109 (
"Track #" real,
"Song" text,
"Singers" text,
"Picturization" text,
"Length" text,
"Lyricist" text
)
|
SELECT originalairdate FROM table_20726262_2 WHERE production_code = "1WAB06"
|
What was the original air date for the episode with production code 1wab06?
|
CREATE TABLE table_20726262_2 (originalairdate VARCHAR, production_code VARCHAR)
|
SELECT record FROM table_13258823_2 WHERE date = "September 15, 1985"
|
Name the record for september 15, 1985
|
CREATE TABLE table_13258823_2 (record VARCHAR, date VARCHAR)
|
SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'excise lg intestine les') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 83466) AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')
|
has patient 83466 undergone any procedures for excise lg intestine les in a year before?
|
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name 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 d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
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 cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label 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 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 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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime 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
)
|
SELECT title FROM table_20726262_2 WHERE directedby = "Paris Barclay"
|
What title episode did Paris Barclay direct?
|
CREATE TABLE table_20726262_2 (title VARCHAR, directedby VARCHAR)
|
SELECT MIN(no_in_series) FROM table_13273629_2 WHERE written_by = "Elizabeth Devine"
|
What's the series number of the episode that's written by Elizabeth Devine?
|
CREATE TABLE table_13273629_2 (no_in_series INTEGER, written_by VARCHAR)
|
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age >= 60) AND STRFTIME('%y', treatment.treatmenttime) = '2102' GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 5
|
what are the five most frequently ordered procedures for patients in the age 60 or above in 2102?
|
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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
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 treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime 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 microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
|
SELECT production_code FROM table_20726262_2 WHERE no_in_series = 1
|
What was the production code for episode #1?
|
CREATE TABLE table_20726262_2 (production_code VARCHAR, no_in_series VARCHAR)
|
SELECT original_air_date FROM table_13273629_2 WHERE directed_by = "Carey Meyer"
|
When was the episode directed by Carey Meyer aired for the first time?
|
CREATE TABLE table_13273629_2 (original_air_date VARCHAR, directed_by VARCHAR)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.