answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT COUNT(*) FROM Votes JOIN Posts ON Votes.PostId = Posts.Id WHERE Votes.VoteTypeId IN (3) AND Votes.CreationDate >= DATEADD(DAY, -30, GETDATE()) AND Posts.PostTypeId IN (2) | Number of down votes on answers in past 30 days. | CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress 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 PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTaskResultTypes (
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 VoteTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId 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 CloseReasonTypes (
Id number,
Name text,
Description text
)
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 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 PostTypes (
Id number,
Name text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
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 ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId 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 Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense 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 ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
) |
SELECT title FROM table_2626495_1 WHERE written_by = "Daphne Field" | what is the title of the episode daphne field wrote? | CREATE TABLE table_2626495_1 (title VARCHAR, written_by VARCHAR) |
SELECT brazil_scorers FROM table_name_35 WHERE score = "2-1" | What Brazil scorers have a 2-1 Score? | CREATE TABLE table_name_35 (brazil_scorers VARCHAR, score VARCHAR) |
SELECT COUNT("Rank") FROM table_21123 WHERE "Profits (billion $)" = '9.52' | Name the number of rank for 9.52 profits | CREATE TABLE table_21123 (
"Rank" real,
"Company" text,
"Country" text,
"Industry" text,
"Sales (billion $)" text,
"Profits (billion $)" text,
"Assets (billion $)" text,
"Market Value (billion $)" text
) |
SELECT directed_by FROM table_2626495_1 WHERE written_by = "James Clavell" | who directed the episode james clavell wrote? | CREATE TABLE table_2626495_1 (directed_by VARCHAR, written_by VARCHAR) |
SELECT competition FROM table_name_76 WHERE score = "1-2" | What Competition's Score was 1-2? | CREATE TABLE table_name_76 (competition VARCHAR, score VARCHAR) |
SELECT Position, COUNT(*) FROM match_season GROUP BY Position | Show the position of players and the corresponding number of players with a bar chart. | CREATE TABLE player (
Player_ID int,
Player text,
Years_Played text,
Total_WL text,
Singles_WL text,
Doubles_WL text,
Team int
)
CREATE TABLE country (
Country_id int,
Country_name text,
Capital text,
Official_native_language text
)
CREATE TABLE match_season (
Season real,
Player text,
Position text,
Country int,
Team int,
Draft_Pick_Number int,
Draft_Class text,
College text
)
CREATE TABLE team (
Team_id int,
Name text
) |
SELECT COUNT(originalairdate) FROM table_2626495_1 WHERE directed_by = "Maury Geraghty" | how many times was the episode directed by maury geraghty originally aired? | CREATE TABLE table_2626495_1 (originalairdate VARCHAR, directed_by VARCHAR) |
SELECT AVG(points) FROM table_name_90 WHERE opponent = "calgary flames" AND january > 22 | Which Points have an Opponent of calgary flames, and a January larger than 22? | CREATE TABLE table_name_90 (points INTEGER, opponent VARCHAR, january VARCHAR) |
SELECT * FROM table_train_185 WHERE anxiety = 1 OR panic_disorder = 1 | uncontrolled anxiety or panic disorder | CREATE TABLE table_train_185 (
"id" int,
"dyscrasia" bool,
"bleeding" int,
"panic_disorder" bool,
"renal_disease" bool,
"anxiety" bool,
"creatinine_clearance_cl" float,
"alcohol_abuse" bool,
"retinopathy" bool,
"NOUSE" float
) |
SELECT film_festival FROM table_26282750_1 WHERE participants_recipients = "Isao Tomita" | What Film Festival had participants/recipients of Isao Tomita? | CREATE TABLE table_26282750_1 (film_festival VARCHAR, participants_recipients VARCHAR) |
SELECT SUM(points) FROM table_name_36 WHERE record = "21–20–6" | Which Points have a Record of 21–20–6? | CREATE TABLE table_name_36 (points INTEGER, record VARCHAR) |
SELECT MIN(game) FROM table_name_58 WHERE record = "26-24-9" | What is the lowest game number when the record was 26-24-9? | CREATE TABLE table_name_58 (
game INTEGER,
record VARCHAR
) |
SELECT participants_recipients FROM table_26282750_1 WHERE category = "Best Female Actor" | Who was the participant or recipient for the Best Female Actor? | CREATE TABLE table_26282750_1 (participants_recipients VARCHAR, category VARCHAR) |
SELECT AVG(january) FROM table_name_2 WHERE game = 50 | Which January has a Game of 50? | CREATE TABLE table_name_2 (january INTEGER, game VARCHAR) |
SELECT MAX(STU_GPA), AVG(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE | What is the relationship between average and highest student GPA for every department? Give me a scatter chart grouping by department code. | CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER numeric,
DEPT_CODE varchar(18),
STU_PHONE varchar(4),
PROF_NUM int
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
EMP_HIREDATE datetime,
EMP_DOB datetime
) |
SELECT date_of_ceremony FROM table_26282750_1 WHERE participants_recipients = "Takakazu Watanabe" | What date was the participant/recipient takakazu watanabe? | CREATE TABLE table_26282750_1 (date_of_ceremony VARCHAR, participants_recipients VARCHAR) |
SELECT record FROM table_name_79 WHERE opponent = "pittsburgh pirates" AND date = "may 5" | Which Record has an Opponent of pittsburgh pirates, and a Date of may 5? | CREATE TABLE table_name_79 (record VARCHAR, opponent VARCHAR, date VARCHAR) |
SELECT num.TagName AS Tag, ROW_NUMBER() OVER (ORDER BY rate.Rate DESC) AS Rank, ROW_NUMBER() OVER (ORDER BY num.Num DESC) AS TotalRank, rate.Rate AS Questions, num.Num AS QuestionsTotal FROM (SELECT COUNT(PostId) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AND Posts.CreationDate < '2018-03-09' AND Posts.CreationDate > '2017-12-31' GROUP BY TagName) AS rate INNER JOIN (SELECT COUNT(PostId) AS Num, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId GROUP BY TagName HAVING COUNT(PostId) > 800) AS num ON rate.TagName = num.TagName ORDER BY rate.rate DESC | Most Popular Tags of 2018. | CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId 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 ReviewTaskStates (
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 PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
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 PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId 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 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 Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount 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 ReviewTaskResultTypes (
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 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 PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress 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 VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
) |
SELECT film_festival FROM table_26282750_1 WHERE category = "Best Male Actor" | What film festival had the Best Male Actor? | CREATE TABLE table_26282750_1 (film_festival VARCHAR, category VARCHAR) |
SELECT AVG(attendance) FROM table_name_32 WHERE opponent = "pittsburgh pirates" AND date = "may 5" | Which Attendance has an Opponent of pittsburgh pirates, and a Date of may 5? | CREATE TABLE table_name_32 (attendance INTEGER, opponent VARCHAR, date VARCHAR) |
SELECT COUNT("Opponent") FROM table_29569 WHERE "Game" = '69' | How many games were numbered 69? | CREATE TABLE table_29569 (
"Game" real,
"March" real,
"Opponent" text,
"Score" text,
"Location/Attendance" text,
"Record" text,
"Points" real,
"Decision" text
) |
SELECT category FROM table_26282750_1 WHERE participants_recipients = "Otōto" | What category was the the participant/recipient otōto? | CREATE TABLE table_26282750_1 (category VARCHAR, participants_recipients VARCHAR) |
SELECT MAX(attendance) FROM table_name_24 WHERE record = "15-28" | Which Attendance is the highest one that has a Record of 15-28? | CREATE TABLE table_name_24 (attendance INTEGER, record VARCHAR) |
SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM semester INNER JOIN course_offering ON semester.semester_id = course_offering.semester INNER JOIN course ON course.course_id = course_offering.course_id WHERE course.name LIKE '%Applied Russian%' AND semester.semester = 'FA' AND semester.year = 2016 | When can I take Applied Russian ? | CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
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 jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE area (
course_id int,
area 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 instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction 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 semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
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 comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
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 program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
) |
SELECT performance_order FROM table_26267849_11 WHERE artist = "Velasco Brothers" | Name the performance order of the velasco brothers | CREATE TABLE table_26267849_11 (performance_order VARCHAR, artist VARCHAR) |
SELECT date FROM table_name_86 WHERE loss = "jeriome robertson" | What is the date of the match where Jeriome Robertson lost? | CREATE TABLE table_name_86 (date VARCHAR, loss VARCHAR) |
SELECT AVG(demographic.days_stay) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" | calculate the average days for which patients with white-russian ethnic background were hospitalized. | 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
)
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
) |
SELECT COUNT(semi_finals_result) FROM table_26267849_11 WHERE performance_order = 12 | Name the number of semi final results for 12 performance order | CREATE TABLE table_26267849_11 (semi_finals_result VARCHAR, performance_order VARCHAR) |
SELECT score FROM table_name_97 WHERE save = "postponed rescheduled for june 24" | What is the score of the match with a save postponed rescheduled for June 24? | CREATE TABLE table_name_97 (score VARCHAR, save VARCHAR) |
SELECT player FROM table_name_98 WHERE to_par = "–2" AND country = "united states" | Who has a To par of 2, and a Country of united states? | CREATE TABLE table_name_98 (
player VARCHAR,
to_par VARCHAR,
country VARCHAR
) |
SELECT performance_order FROM table_26267849_11 WHERE percentage_of_votes = "2.15%" | Name the performance order for 2.15% | CREATE TABLE table_26267849_11 (performance_order VARCHAR, percentage_of_votes VARCHAR) |
SELECT date FROM table_name_49 WHERE opponent = "brother elephants" AND save = "||4,117" | What is the date of the match with Brother Elephants as the opponent and a save of ||4,117? | CREATE TABLE table_name_49 (date VARCHAR, opponent VARCHAR, save VARCHAR) |
SELECT downstream FROM table_name_88 WHERE upstream = "384 kbit" | What is Downstream, when Upstream is '384 kbit'? | CREATE TABLE table_name_88 (
downstream VARCHAR,
upstream VARCHAR
) |
SELECT percentage_of_votes FROM table_26267849_11 WHERE finished = "3rd" | Name the percentage of votes for 3rd finished | CREATE TABLE table_26267849_11 (percentage_of_votes VARCHAR, finished VARCHAR) |
SELECT MIN(round) FROM table_name_3 WHERE name = "jon olinger" AND pick__number < 24 | What is the least round number for Jon Olinger, who was picked before pick # 24? | CREATE TABLE table_name_3 (round INTEGER, name VARCHAR, pick__number VARCHAR) |
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'sputum, tracheal specimen' AND STRFTIME('%y', microlab.culturetakentime) <= '2104') | what was the number of patients that were tested until 2104 for sputum, tracheal specimen microbiology? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime 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 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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
) |
SELECT percentage_of_votes FROM table_26267849_11 WHERE act = "Violinist" | Name the percentage of votes for violinist | CREATE TABLE table_26267849_11 (percentage_of_votes VARCHAR, act VARCHAR) |
SELECT MAX(pick__number) FROM table_name_5 WHERE position = "defensive tackle" AND round < 7 | Before round 7, what is the greatest Pick # for a player that plays defensive tackle? | CREATE TABLE table_name_5 (pick__number INTEGER, position VARCHAR, round VARCHAR) |
SELECT margin_of_victory FROM table_name_25 WHERE tournament = "pga championship" | What is the margin of victory for PGA Championship? | CREATE TABLE table_name_25 (
margin_of_victory VARCHAR,
tournament VARCHAR
) |
SELECT hometown FROM table_26267849_2 WHERE age_s_ = "16" | what are all the hometown where the average age is 16 | CREATE TABLE table_26267849_2 (hometown VARCHAR, age_s_ VARCHAR) |
SELECT record FROM table_name_49 WHERE visitor = "boston bruins" AND date = "december 8" | What was the record on december 8 when the boston bruins visited? | CREATE TABLE table_name_49 (record VARCHAR, visitor VARCHAR, date VARCHAR) |
SELECT "Country" FROM table_64947 WHERE "Player" = 'larry mize' | What country is Larry Mize from? | CREATE TABLE table_64947 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
) |
SELECT population__2011_ FROM table_26321719_1 WHERE name = "Beaubassin East" | What is the population in 2011 for the name Beaubassin East? | CREATE TABLE table_26321719_1 (population__2011_ VARCHAR, name VARCHAR) |
SELECT score FROM table_name_39 WHERE date = "november 3" | what was the score on november 3? | CREATE TABLE table_name_39 (score VARCHAR, date VARCHAR) |
SELECT "Regional County Municipality" FROM table_11047 WHERE "Type" = 'm' AND "Code" < '91015' | what is the regional county municipality when the type is m and the code is less than 91015? | CREATE TABLE table_11047 (
"Code" real,
"Type" text,
"Name" text,
"Area (km 2 )" real,
"Population" real,
"Regional County Municipality" text,
"Region" real
) |
SELECT population_density FROM table_26321719_1 WHERE name = "Beaubassin East" | What is every population density if name is Beaubassin East? | CREATE TABLE table_26321719_1 (population_density VARCHAR, name VARCHAR) |
SELECT visitor FROM table_name_29 WHERE date = "november 17" | who visited on november 17? | CREATE TABLE table_name_29 (visitor VARCHAR, date VARCHAR) |
SELECT COUNT(silver) FROM table_name_81 WHERE gold > 0 AND rank = "14" AND bronze > 4 | What is number of silver for the country with more than 0 gold, rank of 14, and more than 4 bronze? | CREATE TABLE table_name_81 (
silver VARCHAR,
bronze VARCHAR,
gold VARCHAR,
rank VARCHAR
) |
SELECT area__km²_ FROM table_26321719_1 WHERE population_density = "100.8" | What is every value for area for population density of 100.8? | CREATE TABLE table_26321719_1 (area__km²_ VARCHAR, population_density VARCHAR) |
SELECT name FROM table_name_96 WHERE years = "1974" | What is the name of the head coach of 1974? | CREATE TABLE table_name_96 (name VARCHAR, years VARCHAR) |
SELECT AVG("Year") FROM table_42964 WHERE "Result" < '20.31' AND "World Rank" = '5th' | What Year has a Result smaller than 20.31, and a World Rank of 5th? | CREATE TABLE table_42964 (
"Year" real,
"Result" real,
"World Rank" text,
"Location" text,
"Date" text
) |
SELECT change___percentage_ FROM table_26321719_1 WHERE area__km²_ = "1835.01" | What is every value for change% for area of 1835.01? | CREATE TABLE table_26321719_1 (change___percentage_ VARCHAR, area__km²_ VARCHAR) |
SELECT AVG(seasons) FROM table_name_65 WHERE name = "terri drake" AND lost < 9 | What is the average number of seasons for Terri Drake who lost less than 9? | CREATE TABLE table_name_65 (seasons INTEGER, name VARCHAR, lost VARCHAR) |
SELECT MAX(after) FROM table_24108789_4 WHERE player = "Steve Stricker" | What is the latest after when the player is Steve Stricker? | CREATE TABLE table_24108789_4 (
after INTEGER,
player VARCHAR
) |
SELECT COUNT(name) FROM table_26321719_1 WHERE area__km²_ = "8.12" | How many names correspond to an area of 8.12? | CREATE TABLE table_26321719_1 (name VARCHAR, area__km²_ VARCHAR) |
SELECT MIN(seasons) FROM table_name_36 WHERE years = "1982" AND lost > 9 | What is the lowest number of seasons that the head coach of 1982 had with larger than 9 losses? | CREATE TABLE table_name_36 (seasons INTEGER, years VARCHAR, lost VARCHAR) |
SELECT COUNT(*) FROM treatment WHERE treatment.treatmentname = 'cultures - csf' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-5 year') | how many times has cultures - csf procedure been performed since 5 years ago? | 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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime 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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
) |
SELECT area__km²_ FROM table_26321719_1 WHERE change___percentage_ = "-3.6" | What is every value for area if change% is -3.6? | CREATE TABLE table_26321719_1 (area__km²_ VARCHAR, change___percentage_ VARCHAR) |
SELECT webcast FROM table_name_86 WHERE format = "spanish contemporary" AND website = "xhnoe.com" | Which webcast was in Spanish contemporary on xhnoe.com? | CREATE TABLE table_name_86 (webcast VARCHAR, format VARCHAR, website VARCHAR) |
SELECT "Location" FROM table_65996 WHERE "Driver" = 'george heath' | Which location was won by George Heath? | CREATE TABLE table_65996 (
"Year" real,
"Formula" text,
"Driver" text,
"Constructor" text,
"Location" text,
"Report" text
) |
SELECT hdi_2012 FROM table_26313243_1 WHERE country = "Dominica" | Name the hdi 2012 for dominica | CREATE TABLE table_26313243_1 (hdi_2012 VARCHAR, country VARCHAR) |
SELECT MAX(frequency) FROM table_name_79 WHERE website = "uncionfeypoder.com" | What is the highest frequency from uncionfeypoder.com? | CREATE TABLE table_name_79 (frequency INTEGER, website VARCHAR) |
SELECT prescriptions.drug_type, prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "BusPIRone" | what is drug type and drug code of drug name buspirone? | 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
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT fsi_2012 FROM table_26313243_1 WHERE cpi_2012 = "42.7" | Name the fsi 2012 for 42.7 cpi | CREATE TABLE table_26313243_1 (fsi_2012 VARCHAR, cpi_2012 VARCHAR) |
SELECT format FROM table_name_73 WHERE brand = "digital 94.9" | What is the format for Digital 94.9? | CREATE TABLE table_name_73 (format VARCHAR, brand VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.itemid = "51269" | Provide the number of patients whose admission type is elective and item id is 51269. | 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 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
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) |
SELECT gdp__ppp__per_capita___intl_$___2011 FROM table_26313243_1 WHERE country = "Haiti" | Name the gdp per capita for haiti | CREATE TABLE table_26313243_1 (gdp__ppp__per_capita___intl_$___2011 VARCHAR, country VARCHAR) |
SELECT population FROM table_name_51 WHERE deed_number = "21352021" | What is the population for Deed number of 21352021? | CREATE TABLE table_name_51 (population VARCHAR, deed_number VARCHAR) |
SELECT "School" FROM table_63670 WHERE "Team Name" = 'pirates' | What school has a team called the Pirates? | CREATE TABLE table_63670 (
"School" text,
"City" text,
"Team Name" text,
"Enrollment 08-09" real,
"IHSAA Class" text,
"IHSAA Class Football" text,
"County" text,
"Year Joined (Or Joining)" real,
"Previous Conference" text
) |
SELECT COUNT(round_of_16) FROM table_26335424_86 WHERE round_of_32 = "Lakpa Tashi Sherpa ( BHU ) W PTS 12-5" | How many times was lakpa tashi sherpa ( bhu ) w pts 12-5 in round of 32? | CREATE TABLE table_26335424_86 (round_of_16 VARCHAR, round_of_32 VARCHAR) |
SELECT AVG(area__km²_) FROM table_name_30 WHERE excised_from = "shire of cook" AND population < 463 AND name_of_community = "wujal wujal (bloomfield river)" | What is the average Area (km²) that shows Excised from shire of cook and a Population smaller than 463 for the community of wujal wujal (bloomfield river)? | CREATE TABLE table_name_30 (area__km²_ INTEGER, name_of_community VARCHAR, excised_from VARCHAR, population VARCHAR) |
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 = 'TAMPA' AND date_day.day_number = 4 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'NEWARK' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code | i need to book a flight from NEWARK to TAMPA on 4 4 | CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,
time_elapsed int,
to_airport varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_miles int,
pressurized varchar
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
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,
round_trip_required varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
) |
SELECT athlete FROM table_26335424_86 WHERE quarterfinals = "Nabil Talal ( JOR ) L PTS 3-3" | If the quarterfinals was nabil talal ( jor ) l pts 3-3, who was the athlete? | CREATE TABLE table_26335424_86 (athlete VARCHAR, quarterfinals VARCHAR) |
SELECT deed_number FROM table_name_24 WHERE population > 869 AND name_of_community = "woorabinda" | What was the deed number with a population of more than 869 in the woorabinda community? | CREATE TABLE table_name_24 (deed_number VARCHAR, population VARCHAR, name_of_community VARCHAR) |
SELECT "Driver" FROM table_44914 WHERE "Grid" = '1' | Who is the driver with 1 grid? | CREATE TABLE table_44914 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) |
SELECT round_of_32 FROM table_26335424_86 WHERE quarterfinals = "Did not advance" AND event = "Bantamweight (-63kg)" | If the event was bantamweight (-63kg), and the quarterfinals did not advance, then who was in round of 32? | CREATE TABLE table_26335424_86 (round_of_32 VARCHAR, quarterfinals VARCHAR, event VARCHAR) |
SELECT MIN(population) FROM table_name_72 WHERE area__km²_ = 1115.4 | What is the smallest population with an Area (km²) of 1115.4? | CREATE TABLE table_name_72 (population INTEGER, area__km²_ VARCHAR) |
SELECT manuals FROM table_name_89 WHERE kind = "r" AND opus = "144" | What are the manuals with a kind of r, and an opus of 144? | CREATE TABLE table_name_89 (
manuals VARCHAR,
kind VARCHAR,
opus VARCHAR
) |
SELECT semifinals FROM table_26335424_86 WHERE round_of_16 = "Yulius Fernando ( INA ) L PTS 5-6" | If the round of 16 was yulius fernando ( ina ) l pts 5-6, what was the semifinals? | CREATE TABLE table_26335424_86 (semifinals VARCHAR, round_of_16 VARCHAR) |
SELECT MAX(area__km²_) FROM table_name_29 WHERE deed_number = "21352022" AND population > 184 | What is the largest Area (km²) for Deed number of 21352022 with a Population of more than 184? | CREATE TABLE table_name_29 (area__km²_ INTEGER, deed_number VARCHAR, population VARCHAR) |
SELECT "name" FROM table_204_291 WHERE "points" > 2600 AND "nation" = 'canada' | name a competitor that scored more that 2600 points and was from canada . | CREATE TABLE table_204_291 (
id number,
"rank" number,
"name" text,
"nation" text,
"cp" number,
"fp" number,
"points" number,
"placings" number
) |
SELECT event FROM table_26335424_86 WHERE round_of_32 = "Sawatvilay Phimmasone ( LAO ) W PTS 9-7" | If round of 32 is sawatvilay phimmasone ( lao ) w pts 9-7, what was the event? | CREATE TABLE table_26335424_86 (event VARCHAR, round_of_32 VARCHAR) |
SELECT result FROM table_name_84 WHERE goal < 4 AND date = "16 october 2012" | What is the result of the match on 16 October 2012 with less than 4 goals? | CREATE TABLE table_name_84 (result VARCHAR, goal VARCHAR, date VARCHAR) |
SELECT DISTINCT flight_id FROM flight WHERE (((arrival_time <= 2100 AND arrival_time >= 2000) AND to_airport IN (SELECT AIRPORT_SERVICEalias0.airport_code FROM airport_service AS AIRPORT_SERVICEalias0 WHERE AIRPORT_SERVICEalias0.city_code IN (SELECT CITYalias0.city_code FROM city AS CITYalias0 WHERE CITYalias0.city_name = 'DENVER'))) AND flight_days = 'DAILY') | list all of the DAILY flights arriving in DENVER from 2000 to 2100 | CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,
time_elapsed int,
to_airport varchar
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_miles int,
pressurized varchar
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code 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,
round_trip_required varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE days (
days_code varchar,
day_name varchar
) |
SELECT MAX(elected) FROM table_26336739_1 WHERE incumbent = "Saxby Chambliss" | What date was the district incumbent Saxby Chambliss elected? | CREATE TABLE table_26336739_1 (elected INTEGER, incumbent VARCHAR) |
SELECT opposition FROM table_name_53 WHERE year < 1977 AND city = "manchester" | Which Opposition has a Year smaller than 1977, and a City of manchester? | CREATE TABLE table_name_53 (opposition VARCHAR, year VARCHAR, city VARCHAR) |
SELECT "Median family income" FROM table_63129 WHERE "Per capita income" = '$24,114' | What is the median family income when the per capita is $24,114? | CREATE TABLE table_63129 (
"County" text,
"Per capita income" text,
"Median household income" text,
"Median family income" text,
"Population" real,
"Number of households" real
) |
SELECT status FROM table_26336739_1 WHERE incumbent = "Bob Barr" | What is the status in the district with the incumbent Bob Barr? | CREATE TABLE table_26336739_1 (status VARCHAR, incumbent VARCHAR) |
SELECT MIN(score) FROM table_name_75 WHERE year = 1868 | Which Score is the lowest one that has a Year of 1868? | CREATE TABLE table_name_75 (score INTEGER, year VARCHAR) |
SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, return a line chart about the change of commission_pct over hire_date . | CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
) |
SELECT COUNT(elected) FROM table_26336739_1 WHERE incumbent = "Saxby Chambliss" | How many elected catagories are there for the district with Saxby Chambliss as the incumbent? | CREATE TABLE table_26336739_1 (elected VARCHAR, incumbent VARCHAR) |
SELECT venue FROM table_name_97 WHERE year > 1868 AND opposition = "derbyshire" | Which Venue has a Year larger than 1868, and an Opposition of derbyshire? | CREATE TABLE table_name_97 (venue VARCHAR, year VARCHAR, opposition VARCHAR) |
SELECT conv FROM table_name_49 WHERE pens = "0" AND player = "severo koroduadua waqanibau" | How many conversions did Severo Koroduadua Waqanibau have when he has 0 pens? | CREATE TABLE table_name_49 (
conv VARCHAR,
pens VARCHAR,
player VARCHAR
) |
SELECT result FROM table_26336739_1 WHERE elected = 1986 | What was the result for the district with an election in 1986 | CREATE TABLE table_26336739_1 (result VARCHAR, elected VARCHAR) |
SELECT city FROM table_name_85 WHERE score < 30 AND venue = "aigburth" | Which City has a Score smaller than 30, and a Venue of aigburth? | CREATE TABLE table_name_85 (city VARCHAR, score VARCHAR, venue VARCHAR) |
SELECT "Opponent" FROM table_42384 WHERE "Attendance" = '37,845' | Who is the opponent for the game with 37,845 people in attendance? | CREATE TABLE table_42384 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) |
SELECT COUNT(party) FROM table_26336739_1 WHERE incumbent = "Mac Collins" | how many party classifications are there for the incumbent Mac Collins? | CREATE TABLE table_26336739_1 (party VARCHAR, incumbent VARCHAR) |
SELECT position FROM table_name_7 WHERE height = "188cm" | What is the Position of the player with a Height off 188cm? | CREATE TABLE table_name_7 (position VARCHAR, height VARCHAR) |
SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE | For all employees who have the letters D or S in their first name, give me the trend about commission_pct over hire_date , and I want to rank x axis from low to high order. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.