Instruction: what is discharge time and procedure icd9 code of subject id 65759?

Input:
CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
)

CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
)

CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

CREATE TABLE diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

Response: SELECT demographic.dischtime, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "65759"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is discharge time and procedure icd9 code of subject id 65759? ### Input: CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
)

CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
)

CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

CREATE TABLE diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
) ### Response: SELECT demographic.dischtime, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "65759"


Instruction: give me the number of patients whose days of hospital stay is greater than 1 and procedure short title is hemodialysis?

Input:
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
)

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
)

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "1" AND procedures.short_title = "Hemodialysis"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose days of hospital stay is greater than 1 and procedure short title is hemodialysis? ### Input: 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
)

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
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "1" AND procedures.short_title = "Hemodialysis"


Instruction: What is the earliest year a SG has over 650 assists?

Input:
CREATE TABLE table_55647 (
    "Player" text,
    "Pos." text,
    "From" real,
    "School/Country" text,
    "Rebs" real,
    "Asts" real
)

Response: SELECT MIN("From") FROM table_55647 WHERE "Pos." = 'sg' AND "Asts" > '650'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the earliest year a SG has over 650 assists? ### Input: CREATE TABLE table_55647 (
    "Player" text,
    "Pos." text,
    "From" real,
    "School/Country" text,
    "Rebs" real,
    "Asts" real
) ### Response: SELECT MIN("From") FROM table_55647 WHERE "Pos." = 'sg' AND "Asts" > '650'


Instruction: Which patients have hispanic or latino-puerto rican ethnic background?

Input:
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
)

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which patients have hispanic or latino-puerto rican ethnic background? ### Input: 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
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN"


Instruction: What is on the reverse side of the 100 coin?

Input:
CREATE TABLE table_298883_5 (
    reverse VARCHAR,
    value VARCHAR
)

Response: SELECT reverse FROM table_298883_5 WHERE value = "₩100"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is on the reverse side of the 100 coin? ### Input: CREATE TABLE table_298883_5 (
    reverse VARCHAR,
    value VARCHAR
) ### Response: SELECT reverse FROM table_298883_5 WHERE value = "₩100"


Instruction: How many different numbers of cantons does the province with the Armenian name have?

Input:
CREATE TABLE table_23887174_1 (
    number_of_cantons__gavars_ VARCHAR,
    armenian_name VARCHAR
)

Response: SELECT COUNT(number_of_cantons__gavars_) FROM table_23887174_1 WHERE armenian_name = "Վասպուրական"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many different numbers of cantons does the province with the Armenian name have? ### Input: CREATE TABLE table_23887174_1 (
    number_of_cantons__gavars_ VARCHAR,
    armenian_name VARCHAR
) ### Response: SELECT COUNT(number_of_cantons__gavars_) FROM table_23887174_1 WHERE armenian_name = "Վասպուրական"


Instruction: What is the Name of the Players with a Rank of 18?

Input:
CREATE TABLE table_name_67 (
    name VARCHAR,
    rank VARCHAR
)

Response: SELECT name FROM table_name_67 WHERE rank = 18

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Name of the Players with a Rank of 18? ### Input: CREATE TABLE table_name_67 (
    name VARCHAR,
    rank VARCHAR
) ### Response: SELECT name FROM table_name_67 WHERE rank = 18


Instruction: What year for geelong player john roberts?

Input:
CREATE TABLE table_name_77 (
    year VARCHAR,
    opponent VARCHAR,
    player VARCHAR
)

Response: SELECT year FROM table_name_77 WHERE opponent = "geelong" AND player = "john roberts"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What year for geelong player john roberts? ### Input: CREATE TABLE table_name_77 (
    year VARCHAR,
    opponent VARCHAR,
    player VARCHAR
) ### Response: SELECT year FROM table_name_77 WHERE opponent = "geelong" AND player = "john roberts"


Instruction: What is the start source of the irl country, which ended on 13 April?

Input:
CREATE TABLE table_46537 (
    "Name" text,
    "Country" text,
    "Loan Club" text,
    "Started" text,
    "Ended" text,
    "Start Source" text
)

Response: SELECT "Start Source" FROM table_46537 WHERE "Country" = 'irl' AND "Ended" = '13 april'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the start source of the irl country, which ended on 13 April? ### Input: CREATE TABLE table_46537 (
    "Name" text,
    "Country" text,
    "Loan Club" text,
    "Started" text,
    "Ended" text,
    "Start Source" text
) ### Response: SELECT "Start Source" FROM table_46537 WHERE "Country" = 'irl' AND "Ended" = '13 april'


Instruction: What is Country, when Time is 1:29.43.60?

Input:
CREATE TABLE table_name_68 (
    country VARCHAR,
    time VARCHAR
)

Response: SELECT country FROM table_name_68 WHERE time = "1:29.43.60"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is Country, when Time is 1:29.43.60? ### Input: CREATE TABLE table_name_68 (
    country VARCHAR,
    time VARCHAR
) ### Response: SELECT country FROM table_name_68 WHERE time = "1:29.43.60"


Instruction: How long was the 16 staged event in 1997?

Input:
CREATE TABLE table_name_38 (
    distance VARCHAR,
    stages VARCHAR,
    year VARCHAR
)

Response: SELECT distance FROM table_name_38 WHERE stages = "16" AND year = "1997"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How long was the 16 staged event in 1997? ### Input: CREATE TABLE table_name_38 (
    distance VARCHAR,
    stages VARCHAR,
    year VARCHAR
) ### Response: SELECT distance FROM table_name_38 WHERE stages = "16" AND year = "1997"


Instruction: What is Wu Xing ( ) with Korean (RR) of (im)?

Input:
CREATE TABLE table_name_80 (
    wu_xing___五行__ VARCHAR,
    korean___rr__ VARCHAR
)

Response: SELECT wu_xing___五行__ FROM table_name_80 WHERE korean___rr__ = "임 (im)"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is Wu Xing ( ) with Korean (RR) of (im)? ### Input: CREATE TABLE table_name_80 (
    wu_xing___五行__ VARCHAR,
    korean___rr__ VARCHAR
) ### Response: SELECT wu_xing___五行__ FROM table_name_80 WHERE korean___rr__ = "임 (im)"


Instruction: max number of dupes on a question.

Input:
CREATE TABLE PostTypes (
    Id number,
    Name text
)

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

CREATE TABLE CloseAsOffTopicReasonTypes (
    Id number,
    IsUniversal boolean,
    InputTitle text,
    MarkdownInputGuidance text,
    MarkdownPostOwnerGuidance text,
    MarkdownPrivilegedUserGuidance text,
    MarkdownConcensusDescription text,
    CreationDate time,
    CreationModeratorId number,
    ApprovalDate time,
    ApprovalModeratorId number,
    DeactivationDate time,
    DeactivationModeratorId number
)

CREATE TABLE SuggestedEditVotes (
    Id number,
    SuggestedEditId number,
    UserId number,
    VoteTypeId number,
    CreationDate time,
    TargetUserId number,
    TargetRepChange number
)

CREATE TABLE FlagTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE TagSynonyms (
    Id number,
    SourceTagName text,
    TargetTagName text,
    CreationDate time,
    OwnerUserId number,
    AutoRenameCount number,
    LastAutoRename time,
    Score number,
    ApprovedByUserId number,
    ApprovalDate time
)

CREATE TABLE ReviewTaskStates (
    Id number,
    Name text,
    Description text
)

CREATE TABLE ReviewTasks (
    Id number,
    ReviewTaskTypeId number,
    CreationDate time,
    DeletionDate time,
    ReviewTaskStateId number,
    PostId number,
    SuggestedEditId number,
    CompletedByReviewTaskId number
)

CREATE TABLE PostNotices (
    Id number,
    PostId number,
    PostNoticeTypeId number,
    CreationDate time,
    DeletionDate time,
    ExpiryDate time,
    Body text,
    OwnerUserId number,
    DeletionUserId number
)

CREATE TABLE Votes (
    Id number,
    PostId number,
    VoteTypeId number,
    UserId number,
    CreationDate time,
    BountyAmount number
)

CREATE TABLE PostNoticeTypes (
    Id number,
    ClassId number,
    Name text,
    Body text,
    IsHidden boolean,
    Predefined boolean,
    PostNoticeDurationId number
)

CREATE TABLE ReviewTaskResults (
    Id number,
    ReviewTaskId number,
    ReviewTaskResultTypeId number,
    CreationDate time,
    RejectionReasonId number,
    Comment text
)

CREATE TABLE SuggestedEdits (
    Id number,
    PostId number,
    CreationDate time,
    ApprovalDate time,
    RejectionDate time,
    OwnerUserId number,
    Comment text,
    Text text,
    Title text,
    Tags text,
    RevisionGUID other
)

CREATE TABLE Comments (
    Id number,
    PostId number,
    Score number,
    Text text,
    CreationDate time,
    UserDisplayName text,
    UserId number,
    ContentLicense text
)

CREATE TABLE PostLinks (
    Id number,
    CreationDate time,
    PostId number,
    RelatedPostId number,
    LinkTypeId number
)

CREATE TABLE PostsWithDeleted (
    Id number,
    PostTypeId number,
    AcceptedAnswerId number,
    ParentId number,
    CreationDate time,
    DeletionDate time,
    Score number,
    ViewCount number,
    Body text,
    OwnerUserId number,
    OwnerDisplayName text,
    LastEditorUserId number,
    LastEditorDisplayName text,
    LastEditDate time,
    LastActivityDate time,
    Title text,
    Tags text,
    AnswerCount number,
    CommentCount number,
    FavoriteCount number,
    ClosedDate time,
    CommunityOwnedDate time,
    ContentLicense text
)

CREATE TABLE PostFeedback (
    Id number,
    PostId number,
    IsAnonymous boolean,
    VoteTypeId number,
    CreationDate time
)

CREATE TABLE CloseReasonTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE PostHistory (
    Id number,
    PostHistoryTypeId number,
    PostId number,
    RevisionGUID other,
    CreationDate time,
    UserId number,
    UserDisplayName text,
    Comment text,
    Text text,
    ContentLicense text
)

CREATE TABLE ReviewRejectionReasons (
    Id number,
    Name text,
    Description text,
    PostTypeId number
)

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

CREATE TABLE ReviewTaskTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE Users (
    Id number,
    Reputation number,
    CreationDate time,
    DisplayName text,
    LastAccessDate time,
    WebsiteUrl text,
    Location text,
    AboutMe text,
    Views number,
    UpVotes number,
    DownVotes number,
    ProfileImageUrl text,
    EmailHash text,
    AccountId number
)

CREATE TABLE Badges (
    Id number,
    UserId number,
    Name text,
    Date time,
    Class number,
    TagBased boolean
)

CREATE TABLE Posts (
    Id number,
    PostTypeId number,
    AcceptedAnswerId number,
    ParentId number,
    CreationDate time,
    DeletionDate time,
    Score number,
    ViewCount number,
    Body text,
    OwnerUserId number,
    OwnerDisplayName text,
    LastEditorUserId number,
    LastEditorDisplayName text,
    LastEditDate time,
    LastActivityDate time,
    Title text,
    Tags text,
    AnswerCount number,
    CommentCount number,
    FavoriteCount number,
    ClosedDate time,
    CommunityOwnedDate time,
    ContentLicense text
)

CREATE TABLE PendingFlags (
    Id number,
    FlagTypeId number,
    PostId number,
    CreationDate time,
    CloseReasonTypeId number,
    CloseAsOffTopicReasonTypeId number,
    DuplicateOfQuestionId number,
    BelongsOnBaseHostAddress text
)

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

CREATE TABLE ReviewTaskResultTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE Tags (
    Id number,
    TagName text,
    Count number,
    ExcerptPostId number,
    WikiPostId number
)

Response: SELECT pl.PostId AS "post_link", COUNT(*) FROM PostLinks AS pl INNER JOIN Posts AS p ON p.Id = pl.PostId WHERE LinkTypeId = 3 GROUP BY PostId HAVING COUNT(*) > 2 ORDER BY 2 DESC

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: max number of dupes on a question. ### Input: CREATE TABLE PostTypes (
    Id number,
    Name text
)

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

CREATE TABLE CloseAsOffTopicReasonTypes (
    Id number,
    IsUniversal boolean,
    InputTitle text,
    MarkdownInputGuidance text,
    MarkdownPostOwnerGuidance text,
    MarkdownPrivilegedUserGuidance text,
    MarkdownConcensusDescription text,
    CreationDate time,
    CreationModeratorId number,
    ApprovalDate time,
    ApprovalModeratorId number,
    DeactivationDate time,
    DeactivationModeratorId number
)

CREATE TABLE SuggestedEditVotes (
    Id number,
    SuggestedEditId number,
    UserId number,
    VoteTypeId number,
    CreationDate time,
    TargetUserId number,
    TargetRepChange number
)

CREATE TABLE FlagTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE TagSynonyms (
    Id number,
    SourceTagName text,
    TargetTagName text,
    CreationDate time,
    OwnerUserId number,
    AutoRenameCount number,
    LastAutoRename time,
    Score number,
    ApprovedByUserId number,
    ApprovalDate time
)

CREATE TABLE ReviewTaskStates (
    Id number,
    Name text,
    Description text
)

CREATE TABLE ReviewTasks (
    Id number,
    ReviewTaskTypeId number,
    CreationDate time,
    DeletionDate time,
    ReviewTaskStateId number,
    PostId number,
    SuggestedEditId number,
    CompletedByReviewTaskId number
)

CREATE TABLE PostNotices (
    Id number,
    PostId number,
    PostNoticeTypeId number,
    CreationDate time,
    DeletionDate time,
    ExpiryDate time,
    Body text,
    OwnerUserId number,
    DeletionUserId number
)

CREATE TABLE Votes (
    Id number,
    PostId number,
    VoteTypeId number,
    UserId number,
    CreationDate time,
    BountyAmount number
)

CREATE TABLE PostNoticeTypes (
    Id number,
    ClassId number,
    Name text,
    Body text,
    IsHidden boolean,
    Predefined boolean,
    PostNoticeDurationId number
)

CREATE TABLE ReviewTaskResults (
    Id number,
    ReviewTaskId number,
    ReviewTaskResultTypeId number,
    CreationDate time,
    RejectionReasonId number,
    Comment text
)

CREATE TABLE SuggestedEdits (
    Id number,
    PostId number,
    CreationDate time,
    ApprovalDate time,
    RejectionDate time,
    OwnerUserId number,
    Comment text,
    Text text,
    Title text,
    Tags text,
    RevisionGUID other
)

CREATE TABLE Comments (
    Id number,
    PostId number,
    Score number,
    Text text,
    CreationDate time,
    UserDisplayName text,
    UserId number,
    ContentLicense text
)

CREATE TABLE PostLinks (
    Id number,
    CreationDate time,
    PostId number,
    RelatedPostId number,
    LinkTypeId number
)

CREATE TABLE PostsWithDeleted (
    Id number,
    PostTypeId number,
    AcceptedAnswerId number,
    ParentId number,
    CreationDate time,
    DeletionDate time,
    Score number,
    ViewCount number,
    Body text,
    OwnerUserId number,
    OwnerDisplayName text,
    LastEditorUserId number,
    LastEditorDisplayName text,
    LastEditDate time,
    LastActivityDate time,
    Title text,
    Tags text,
    AnswerCount number,
    CommentCount number,
    FavoriteCount number,
    ClosedDate time,
    CommunityOwnedDate time,
    ContentLicense text
)

CREATE TABLE PostFeedback (
    Id number,
    PostId number,
    IsAnonymous boolean,
    VoteTypeId number,
    CreationDate time
)

CREATE TABLE CloseReasonTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE PostHistory (
    Id number,
    PostHistoryTypeId number,
    PostId number,
    RevisionGUID other,
    CreationDate time,
    UserId number,
    UserDisplayName text,
    Comment text,
    Text text,
    ContentLicense text
)

CREATE TABLE ReviewRejectionReasons (
    Id number,
    Name text,
    Description text,
    PostTypeId number
)

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

CREATE TABLE ReviewTaskTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE Users (
    Id number,
    Reputation number,
    CreationDate time,
    DisplayName text,
    LastAccessDate time,
    WebsiteUrl text,
    Location text,
    AboutMe text,
    Views number,
    UpVotes number,
    DownVotes number,
    ProfileImageUrl text,
    EmailHash text,
    AccountId number
)

CREATE TABLE Badges (
    Id number,
    UserId number,
    Name text,
    Date time,
    Class number,
    TagBased boolean
)

CREATE TABLE Posts (
    Id number,
    PostTypeId number,
    AcceptedAnswerId number,
    ParentId number,
    CreationDate time,
    DeletionDate time,
    Score number,
    ViewCount number,
    Body text,
    OwnerUserId number,
    OwnerDisplayName text,
    LastEditorUserId number,
    LastEditorDisplayName text,
    LastEditDate time,
    LastActivityDate time,
    Title text,
    Tags text,
    AnswerCount number,
    CommentCount number,
    FavoriteCount number,
    ClosedDate time,
    CommunityOwnedDate time,
    ContentLicense text
)

CREATE TABLE PendingFlags (
    Id number,
    FlagTypeId number,
    PostId number,
    CreationDate time,
    CloseReasonTypeId number,
    CloseAsOffTopicReasonTypeId number,
    DuplicateOfQuestionId number,
    BelongsOnBaseHostAddress text
)

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

CREATE TABLE ReviewTaskResultTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE Tags (
    Id number,
    TagName text,
    Count number,
    ExcerptPostId number,
    WikiPostId number
) ### Response: SELECT pl.PostId AS "post_link", COUNT(*) FROM PostLinks AS pl INNER JOIN Posts AS p ON p.Id = pl.PostId WHERE LinkTypeId = 3 GROUP BY PostId HAVING COUNT(*) > 2 ORDER BY 2 DESC


Instruction: Users' search by Name and AboutME.

Input:
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 Votes (
    Id number,
    PostId number,
    VoteTypeId number,
    UserId number,
    CreationDate time,
    BountyAmount number
)

CREATE TABLE PostLinks (
    Id number,
    CreationDate time,
    PostId number,
    RelatedPostId number,
    LinkTypeId 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 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 Comments (
    Id number,
    PostId number,
    Score number,
    Text text,
    CreationDate time,
    UserDisplayName text,
    UserId number,
    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 ReviewTaskStates (
    Id number,
    Name text,
    Description text
)

CREATE TABLE SuggestedEditVotes (
    Id number,
    SuggestedEditId number,
    UserId number,
    VoteTypeId number,
    CreationDate time,
    TargetUserId number,
    TargetRepChange number
)

CREATE TABLE PostHistoryTypes (
    Id number,
    Name 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 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 TagSynonyms (
    Id number,
    SourceTagName text,
    TargetTagName text,
    CreationDate time,
    OwnerUserId number,
    AutoRenameCount number,
    LastAutoRename time,
    Score number,
    ApprovedByUserId number,
    ApprovalDate time
)

CREATE TABLE ReviewTaskResults (
    Id number,
    ReviewTaskId number,
    ReviewTaskResultTypeId number,
    CreationDate time,
    RejectionReasonId number,
    Comment text
)

CREATE TABLE PostNoticeTypes (
    Id number,
    ClassId number,
    Name text,
    Body text,
    IsHidden boolean,
    Predefined boolean,
    PostNoticeDurationId 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 Tags (
    Id number,
    TagName text,
    Count number,
    ExcerptPostId number,
    WikiPostId number
)

CREATE TABLE CloseReasonTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE ReviewTaskTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE Badges (
    Id number,
    UserId number,
    Name text,
    Date time,
    Class number,
    TagBased boolean
)

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

CREATE TABLE PostFeedback (
    Id number,
    PostId number,
    IsAnonymous boolean,
    VoteTypeId number,
    CreationDate time
)

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

CREATE TABLE ReviewRejectionReasons (
    Id number,
    Name text,
    Description text,
    PostTypeId number
)

CREATE TABLE FlagTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE ReviewTaskResultTypes (
    Id number,
    Name text,
    Description text
)

Response: SELECT DISTINCT u.Id AS "user_link", CONCAT('https://stackoverflow.com/users/', u.Id) AS "profile_link", u.DisplayName, u.Location, u.WebsiteUrl, u.AboutMe, u.Views, u.Reputation, u.UpVotes, u.DownVotes, u.EmailHash FROM Users AS u WHERE UPPER(u.AboutMe) LIKE UPPER('%##AboutMe##%') AND UPPER(DisplayName) LIKE UPPER('%##DisplayName##%')

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Users' search by Name and AboutME. ### Input: 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 Votes (
    Id number,
    PostId number,
    VoteTypeId number,
    UserId number,
    CreationDate time,
    BountyAmount number
)

CREATE TABLE PostLinks (
    Id number,
    CreationDate time,
    PostId number,
    RelatedPostId number,
    LinkTypeId 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 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 Comments (
    Id number,
    PostId number,
    Score number,
    Text text,
    CreationDate time,
    UserDisplayName text,
    UserId number,
    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 ReviewTaskStates (
    Id number,
    Name text,
    Description text
)

CREATE TABLE SuggestedEditVotes (
    Id number,
    SuggestedEditId number,
    UserId number,
    VoteTypeId number,
    CreationDate time,
    TargetUserId number,
    TargetRepChange number
)

CREATE TABLE PostHistoryTypes (
    Id number,
    Name 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 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 TagSynonyms (
    Id number,
    SourceTagName text,
    TargetTagName text,
    CreationDate time,
    OwnerUserId number,
    AutoRenameCount number,
    LastAutoRename time,
    Score number,
    ApprovedByUserId number,
    ApprovalDate time
)

CREATE TABLE ReviewTaskResults (
    Id number,
    ReviewTaskId number,
    ReviewTaskResultTypeId number,
    CreationDate time,
    RejectionReasonId number,
    Comment text
)

CREATE TABLE PostNoticeTypes (
    Id number,
    ClassId number,
    Name text,
    Body text,
    IsHidden boolean,
    Predefined boolean,
    PostNoticeDurationId 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 Tags (
    Id number,
    TagName text,
    Count number,
    ExcerptPostId number,
    WikiPostId number
)

CREATE TABLE CloseReasonTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE ReviewTaskTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE Badges (
    Id number,
    UserId number,
    Name text,
    Date time,
    Class number,
    TagBased boolean
)

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

CREATE TABLE PostFeedback (
    Id number,
    PostId number,
    IsAnonymous boolean,
    VoteTypeId number,
    CreationDate time
)

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

CREATE TABLE ReviewRejectionReasons (
    Id number,
    Name text,
    Description text,
    PostTypeId number
)

CREATE TABLE FlagTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE ReviewTaskResultTypes (
    Id number,
    Name text,
    Description text
) ### Response: SELECT DISTINCT u.Id AS "user_link", CONCAT('https://stackoverflow.com/users/', u.Id) AS "profile_link", u.DisplayName, u.Location, u.WebsiteUrl, u.AboutMe, u.Views, u.Reputation, u.UpVotes, u.DownVotes, u.EmailHash FROM Users AS u WHERE UPPER(u.AboutMe) LIKE UPPER('%##AboutMe##%') AND UPPER(DisplayName) LIKE UPPER('%##DisplayName##%')


Instruction: Which player is from south africa?

Input:
CREATE TABLE table_62584 (
    "Player" text,
    "Country" text,
    "Year(s) won" text,
    "Total" real,
    "To par" real
)

Response: SELECT "Player" FROM table_62584 WHERE "Country" = 'south africa'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which player is from south africa? ### Input: CREATE TABLE table_62584 (
    "Player" text,
    "Country" text,
    "Year(s) won" text,
    "Total" real,
    "To par" real
) ### Response: SELECT "Player" FROM table_62584 WHERE "Country" = 'south africa'


Instruction: What is the upstream with the price 65 chf?

Input:
CREATE TABLE table_44728 (
    "Internet Plan" text,
    "Downstream" text,
    "Upstream" text,
    "Bandwidth Included" text,
    "Price" text
)

Response: SELECT "Upstream" FROM table_44728 WHERE "Price" = '65 chf'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the upstream with the price 65 chf? ### Input: CREATE TABLE table_44728 (
    "Internet Plan" text,
    "Downstream" text,
    "Upstream" text,
    "Bandwidth Included" text,
    "Price" text
) ### Response: SELECT "Upstream" FROM table_44728 WHERE "Price" = '65 chf'


Instruction: What's the Order with an Elector of Marino Bulcani?

Input:
CREATE TABLE table_71578 (
    "Elector" text,
    "Order" text,
    "Title" text,
    "Elevated" text,
    "Elevator" text
)

Response: SELECT "Order" FROM table_71578 WHERE "Elector" = 'marino bulcani'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the Order with an Elector of Marino Bulcani? ### Input: CREATE TABLE table_71578 (
    "Elector" text,
    "Order" text,
    "Title" text,
    "Elevated" text,
    "Elevator" text
) ### Response: SELECT "Order" FROM table_71578 WHERE "Elector" = 'marino bulcani'


Instruction: Which Finish has a To par of 1, and a Year(s) won of 1955?

Input:
CREATE TABLE table_name_61 (
    finish VARCHAR,
    to_par VARCHAR,
    year_s__won VARCHAR
)

Response: SELECT finish FROM table_name_61 WHERE to_par = "–1" AND year_s__won = "1955"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Finish has a To par of 1, and a Year(s) won of 1955? ### Input: CREATE TABLE table_name_61 (
    finish VARCHAR,
    to_par VARCHAR,
    year_s__won VARCHAR
) ### Response: SELECT finish FROM table_name_61 WHERE to_par = "–1" AND year_s__won = "1955"


Instruction: What nationality has a year larger than 2009 with a position of power forward?

Input:
CREATE TABLE table_name_32 (
    nationality VARCHAR,
    year VARCHAR,
    position VARCHAR
)

Response: SELECT nationality FROM table_name_32 WHERE year > 2009 AND position = "power forward"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What nationality has a year larger than 2009 with a position of power forward? ### Input: CREATE TABLE table_name_32 (
    nationality VARCHAR,
    year VARCHAR,
    position VARCHAR
) ### Response: SELECT nationality FROM table_name_32 WHERE year > 2009 AND position = "power forward"


Instruction: Where was the location attendance when Minnesota played?

Input:
CREATE TABLE table_8150 (
    "Game" real,
    "Date" text,
    "Team" text,
    "Score" text,
    "High points" text,
    "High rebounds" text,
    "High assists" text,
    "Location Attendance" text,
    "Record" text
)

Response: SELECT "Location Attendance" FROM table_8150 WHERE "Team" = 'minnesota'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Where was the location attendance when Minnesota played? ### Input: CREATE TABLE table_8150 (
    "Game" real,
    "Date" text,
    "Team" text,
    "Score" text,
    "High points" text,
    "High rebounds" text,
    "High assists" text,
    "Location Attendance" text,
    "Record" text
) ### Response: SELECT "Location Attendance" FROM table_8150 WHERE "Team" = 'minnesota'


Instruction: Find the names of all the tracks that contain the word 'you'.

Input:
CREATE TABLE customer (
    customerid number,
    firstname text,
    lastname text,
    company text,
    address text,
    city text,
    state text,
    country text,
    postalcode text,
    phone text,
    fax text,
    email text,
    supportrepid number
)

CREATE TABLE employee (
    employeeid number,
    lastname text,
    firstname text,
    title text,
    reportsto number,
    birthdate time,
    hiredate time,
    address text,
    city text,
    state text,
    country text,
    postalcode text,
    phone text,
    fax text,
    email text
)

CREATE TABLE playlist (
    playlistid number,
    name text
)

CREATE TABLE invoice (
    invoiceid number,
    customerid number,
    invoicedate time,
    billingaddress text,
    billingcity text,
    billingstate text,
    billingcountry text,
    billingpostalcode text,
    total number
)

CREATE TABLE invoiceline (
    invoicelineid number,
    invoiceid number,
    trackid number,
    unitprice number,
    quantity number
)

CREATE TABLE playlisttrack (
    playlistid number,
    trackid number
)

CREATE TABLE mediatype (
    mediatypeid number,
    name text
)

CREATE TABLE artist (
    artistid number,
    name text
)

CREATE TABLE album (
    albumid number,
    title text,
    artistid number
)

CREATE TABLE genre (
    genreid number,
    name text
)

CREATE TABLE track (
    trackid number,
    name text,
    albumid number,
    mediatypeid number,
    genreid number,
    composer text,
    milliseconds number,
    bytes number,
    unitprice number
)

Response: SELECT name FROM track WHERE name LIKE '%you%'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the names of all the tracks that contain the word 'you'. ### Input: CREATE TABLE customer (
    customerid number,
    firstname text,
    lastname text,
    company text,
    address text,
    city text,
    state text,
    country text,
    postalcode text,
    phone text,
    fax text,
    email text,
    supportrepid number
)

CREATE TABLE employee (
    employeeid number,
    lastname text,
    firstname text,
    title text,
    reportsto number,
    birthdate time,
    hiredate time,
    address text,
    city text,
    state text,
    country text,
    postalcode text,
    phone text,
    fax text,
    email text
)

CREATE TABLE playlist (
    playlistid number,
    name text
)

CREATE TABLE invoice (
    invoiceid number,
    customerid number,
    invoicedate time,
    billingaddress text,
    billingcity text,
    billingstate text,
    billingcountry text,
    billingpostalcode text,
    total number
)

CREATE TABLE invoiceline (
    invoicelineid number,
    invoiceid number,
    trackid number,
    unitprice number,
    quantity number
)

CREATE TABLE playlisttrack (
    playlistid number,
    trackid number
)

CREATE TABLE mediatype (
    mediatypeid number,
    name text
)

CREATE TABLE artist (
    artistid number,
    name text
)

CREATE TABLE album (
    albumid number,
    title text,
    artistid number
)

CREATE TABLE genre (
    genreid number,
    name text
)

CREATE TABLE track (
    trackid number,
    name text,
    albumid number,
    mediatypeid number,
    genreid number,
    composer text,
    milliseconds number,
    bytes number,
    unitprice number
) ### Response: SELECT name FROM track WHERE name LIKE '%you%'


Instruction: In what season did the team get in the conference finals of the playoffs?

Input:
CREATE TABLE table_2031 (
    "Year" real,
    "Division" real,
    "League" text,
    "Regular Season" text,
    "Playoffs" text,
    "Open Cup" text
)

Response: SELECT "Regular Season" FROM table_2031 WHERE "Playoffs" = 'Conference Finals'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In what season did the team get in the conference finals of the playoffs? ### Input: CREATE TABLE table_2031 (
    "Year" real,
    "Division" real,
    "League" text,
    "Regular Season" text,
    "Playoffs" text,
    "Open Cup" text
) ### Response: SELECT "Regular Season" FROM table_2031 WHERE "Playoffs" = 'Conference Finals'


Instruction: What was the crowd size when the away team scored 7.19 (61)?

Input:
CREATE TABLE table_33397 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
)

Response: SELECT COUNT("Crowd") FROM table_33397 WHERE "Away team score" = '7.19 (61)'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the crowd size when the away team scored 7.19 (61)? ### Input: CREATE TABLE table_33397 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
) ### Response: SELECT COUNT("Crowd") FROM table_33397 WHERE "Away team score" = '7.19 (61)'


Instruction: what is the marital status and days of hospital stay of subject id 6983?

Input:
CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    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 prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

Response: SELECT demographic.marital_status, demographic.days_stay FROM demographic WHERE demographic.subject_id = "6983"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the marital status and days of hospital stay of subject id 6983? ### Input: CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    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 prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
) ### Response: SELECT demographic.marital_status, demographic.days_stay FROM demographic WHERE demographic.subject_id = "6983"


Instruction: Which driver was in 8 rounds with a chassis of dallara f306?

Input:
CREATE TABLE table_44017 (
    "Team" text,
    "Driver" text,
    "Class" text,
    "Chassis" text,
    "Rounds" text
)

Response: SELECT "Driver" FROM table_44017 WHERE "Chassis" = 'dallara f306' AND "Rounds" = '8'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which driver was in 8 rounds with a chassis of dallara f306? ### Input: CREATE TABLE table_44017 (
    "Team" text,
    "Driver" text,
    "Class" text,
    "Chassis" text,
    "Rounds" text
) ### Response: SELECT "Driver" FROM table_44017 WHERE "Chassis" = 'dallara f306' AND "Rounds" = '8'


Instruction: get the number of urgent hospital admission patients who have prescription for calcium carbonate.

Input:
CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
)

CREATE TABLE diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
)

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.drug = "Calcium Carbonate"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: get the number of urgent hospital admission patients who have prescription for calcium carbonate. ### Input: CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
)

CREATE TABLE diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.drug = "Calcium Carbonate"


Instruction: Which places have points larger than 10?

Input:
CREATE TABLE table_name_8 (
    points INTEGER,
    place INTEGER
)

Response: SELECT MIN(points) FROM table_name_8 WHERE place > 10

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which places have points larger than 10? ### Input: CREATE TABLE table_name_8 (
    points INTEGER,
    place INTEGER
) ### Response: SELECT MIN(points) FROM table_name_8 WHERE place > 10


Instruction: What is the Position for the brandon wheat kings (wchl)?

Input:
CREATE TABLE table_5865 (
    "Pick #" text,
    "Player" text,
    "Position" text,
    "Nationality" text,
    "NHL team" text,
    "College/junior/club team" text
)

Response: SELECT "Position" FROM table_5865 WHERE "College/junior/club team" = 'brandon wheat kings (wchl)'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Position for the brandon wheat kings (wchl)? ### Input: CREATE TABLE table_5865 (
    "Pick #" text,
    "Player" text,
    "Position" text,
    "Nationality" text,
    "NHL team" text,
    "College/junior/club team" text
) ### Response: SELECT "Position" FROM table_5865 WHERE "College/junior/club team" = 'brandon wheat kings (wchl)'


Instruction: Return a bar chart about the distribution of Date_of_Birth and Height , display in desc by the names please.

Input:
CREATE TABLE people (
    People_ID int,
    Sex text,
    Name text,
    Date_of_Birth text,
    Height real,
    Weight real
)

CREATE TABLE candidate (
    Candidate_ID int,
    People_ID int,
    Poll_Source text,
    Date text,
    Support_rate real,
    Consider_rate real,
    Oppose_rate real,
    Unsure_rate real
)

Response: SELECT Date_of_Birth, Height FROM people ORDER BY Date_of_Birth DESC

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart about the distribution of Date_of_Birth and Height , display in desc by the names please. ### Input: CREATE TABLE people (
    People_ID int,
    Sex text,
    Name text,
    Date_of_Birth text,
    Height real,
    Weight real
)

CREATE TABLE candidate (
    Candidate_ID int,
    People_ID int,
    Poll_Source text,
    Date text,
    Support_rate real,
    Consider_rate real,
    Oppose_rate real,
    Unsure_rate real
) ### Response: SELECT Date_of_Birth, Height FROM people ORDER BY Date_of_Birth DESC


Instruction: What was the Forbers rank (all companies) in 2012 for cenovus energy?

Input:
CREATE TABLE table_2971 (
    "April 2013 Cum. Rank" real,
    "Name" text,
    "Rank (all) 2012" real,
    "Rank (all) 2013" real,
    "2013 Rank (oil companies)" text,
    "2013 rev (bil. USD )" text,
    "2013 Profit (mil. USD )" real,
    "Assets (bil. USD )" text,
    "Market cap March 15 (mil. USD )" real
)

Response: SELECT "Rank (all) 2012" FROM table_2971 WHERE "Name" = 'Cenovus Energy'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the Forbers rank (all companies) in 2012 for cenovus energy? ### Input: CREATE TABLE table_2971 (
    "April 2013 Cum. Rank" real,
    "Name" text,
    "Rank (all) 2012" real,
    "Rank (all) 2013" real,
    "2013 Rank (oil companies)" text,
    "2013 rev (bil. USD )" text,
    "2013 Profit (mil. USD )" real,
    "Assets (bil. USD )" text,
    "Market cap March 15 (mil. USD )" real
) ### Response: SELECT "Rank (all) 2012" FROM table_2971 WHERE "Name" = 'Cenovus Energy'


Instruction: what is minimum age of patients whose marital status is single and primary disease is hypertension;rule out coronary artery disease\cardiac cath?

Input:
CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    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 lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
)

Response: SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "HYPERTENSION;RULE OUT CORONARY ARTERY DISEASE\CARDIAC CATH"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is minimum age of patients whose marital status is single and primary disease is hypertension;rule out coronary artery disease\cardiac cath? ### Input: CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    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 lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
) ### Response: SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "HYPERTENSION;RULE OUT CORONARY ARTERY DISEASE\CARDIAC CATH"


Instruction: Can ORALPATH 696 be used for ULCS ?

Input:
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 jobs (
    job_id int,
    job_title varchar,
    description varchar,
    requirement varchar,
    city varchar,
    state varchar,
    country varchar,
    zip 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 comment_instructor (
    instructor_id int,
    student_id int,
    score int,
    comment_text varchar
)

CREATE TABLE instructor (
    instructor_id int,
    name varchar,
    uniqname 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 program_requirement (
    program_id int,
    category varchar,
    min_credit int,
    additional_req varchar
)

CREATE TABLE ta (
    campus_job_id int,
    student_id int,
    location varchar
)

CREATE TABLE offering_instructor (
    offering_instructor_id int,
    offering_id int,
    instructor_id int
)

CREATE TABLE area (
    course_id int,
    area 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 gsi (
    course_offering_id int,
    student_id 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 course_prerequisite (
    pre_course_id int,
    course_id int
)

Response: SELECT COUNT(*) > 0 FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'ORALPATH' AND course.number = 696 AND program_course.category LIKE '%ULCS%'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can ORALPATH 696 be used for ULCS ? ### Input: 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 jobs (
    job_id int,
    job_title varchar,
    description varchar,
    requirement varchar,
    city varchar,
    state varchar,
    country varchar,
    zip 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 comment_instructor (
    instructor_id int,
    student_id int,
    score int,
    comment_text varchar
)

CREATE TABLE instructor (
    instructor_id int,
    name varchar,
    uniqname 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 program_requirement (
    program_id int,
    category varchar,
    min_credit int,
    additional_req varchar
)

CREATE TABLE ta (
    campus_job_id int,
    student_id int,
    location varchar
)

CREATE TABLE offering_instructor (
    offering_instructor_id int,
    offering_id int,
    instructor_id int
)

CREATE TABLE area (
    course_id int,
    area 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 gsi (
    course_offering_id int,
    student_id 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 course_prerequisite (
    pre_course_id int,
    course_id int
) ### Response: SELECT COUNT(*) > 0 FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'ORALPATH' AND course.number = 696 AND program_course.category LIKE '%ULCS%'


Instruction: How many U.S. viewers (million) are there for the episode whose Production code is 3T7051?

Input:
CREATE TABLE table_13183076_3 (
    us_viewers__million_ VARCHAR,
    production_code VARCHAR
)

Response: SELECT us_viewers__million_ FROM table_13183076_3 WHERE production_code = "3T7051"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many U.S. viewers (million) are there for the episode whose Production code is 3T7051? ### Input: CREATE TABLE table_13183076_3 (
    us_viewers__million_ VARCHAR,
    production_code VARCHAR
) ### Response: SELECT us_viewers__million_ FROM table_13183076_3 WHERE production_code = "3T7051"


Instruction: Which Investing Dragon(s) belong to Episode 9 with the Entrepreneur Ashley Sayed?

Input:
CREATE TABLE table_71894 (
    "Episode" text,
    "First aired" text,
    "Entrepreneur(s)" text,
    "Company or product name" text,
    "Money requested (\u00a3)" text,
    "Investing Dragon(s)" text
)

Response: SELECT "Investing Dragon(s)" FROM table_71894 WHERE "Episode" = 'episode 9' AND "Entrepreneur(s)" = 'ashley sayed'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Investing Dragon(s) belong to Episode 9 with the Entrepreneur Ashley Sayed? ### Input: CREATE TABLE table_71894 (
    "Episode" text,
    "First aired" text,
    "Entrepreneur(s)" text,
    "Company or product name" text,
    "Money requested (\u00a3)" text,
    "Investing Dragon(s)" text
) ### Response: SELECT "Investing Dragon(s)" FROM table_71894 WHERE "Episode" = 'episode 9' AND "Entrepreneur(s)" = 'ashley sayed'


Instruction: Which advisors are advising more than 2 students?

Input:
CREATE TABLE voting_record (
    stuid number,
    registration_date text,
    election_cycle text,
    president_vote number,
    vice_president_vote number,
    secretary_vote number,
    treasurer_vote number,
    class_president_vote number,
    class_senator_vote number
)

CREATE TABLE student (
    stuid number,
    lname text,
    fname text,
    age number,
    sex text,
    major number,
    advisor number,
    city_code text
)

Response: SELECT advisor FROM student GROUP BY advisor HAVING COUNT(*) > 2

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which advisors are advising more than 2 students? ### Input: CREATE TABLE voting_record (
    stuid number,
    registration_date text,
    election_cycle text,
    president_vote number,
    vice_president_vote number,
    secretary_vote number,
    treasurer_vote number,
    class_president_vote number,
    class_senator_vote number
)

CREATE TABLE student (
    stuid number,
    lname text,
    fname text,
    age number,
    sex text,
    major number,
    advisor number,
    city_code text
) ### Response: SELECT advisor FROM student GROUP BY advisor HAVING COUNT(*) > 2


Instruction: What was willie wood's to par?

Input:
CREATE TABLE table_name_15 (
    to_par VARCHAR,
    player VARCHAR
)

Response: SELECT to_par FROM table_name_15 WHERE player = "willie wood"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was willie wood's to par? ### Input: CREATE TABLE table_name_15 (
    to_par VARCHAR,
    player VARCHAR
) ### Response: SELECT to_par FROM table_name_15 WHERE player = "willie wood"


Instruction: tell me the top five most common diagnoses of patients with an age of 20s until 2104?

Input:
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 intakeoutput (
    intakeoutputid number,
    patientunitstayid number,
    cellpath text,
    celllabel text,
    cellvaluenumeric number,
    intakeoutputtime 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
)

CREATE TABLE cost (
    costid number,
    uniquepid text,
    patienthealthsystemstayid number,
    eventtype text,
    eventid number,
    chargetime time,
    cost number
)

CREATE TABLE allergy (
    allergyid number,
    patientunitstayid number,
    drugname text,
    allergyname text,
    allergytime time
)

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
)

Response: SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104' GROUP BY diagnosis.diagnosisname) AS t1 WHERE t1.c1 <= 5

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: tell me the top five most common diagnoses of patients with an age of 20s until 2104? ### Input: 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 intakeoutput (
    intakeoutputid number,
    patientunitstayid number,
    cellpath text,
    celllabel text,
    cellvaluenumeric number,
    intakeoutputtime 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
)

CREATE TABLE cost (
    costid number,
    uniquepid text,
    patienthealthsystemstayid number,
    eventtype text,
    eventid number,
    chargetime time,
    cost number
)

CREATE TABLE allergy (
    allergyid number,
    patientunitstayid number,
    drugname text,
    allergyname text,
    allergytime time
)

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
) ### Response: SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104' GROUP BY diagnosis.diagnosisname) AS t1 WHERE t1.c1 <= 5


Instruction: Name the end date for robert goebbels

Input:
CREATE TABLE table_14845 (
    "Minister" text,
    "Party" text,
    "Start date" text,
    "End date" text,
    "Prime Minister" text
)

Response: SELECT "End date" FROM table_14845 WHERE "Minister" = 'robert goebbels'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the end date for robert goebbels ### Input: CREATE TABLE table_14845 (
    "Minister" text,
    "Party" text,
    "Start date" text,
    "End date" text,
    "Prime Minister" text
) ### Response: SELECT "End date" FROM table_14845 WHERE "Minister" = 'robert goebbels'


Instruction: Give me a scatter chart to show the star rating of the movie and reviewer id, group the title.

Input:
CREATE TABLE Reviewer (
    rID int,
    name text
)

CREATE TABLE Rating (
    rID int,
    mID int,
    stars int,
    ratingDate date
)

CREATE TABLE Movie (
    mID int,
    title text,
    year int,
    director text
)

Response: SELECT rID, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a scatter chart to show the star rating of the movie and reviewer id, group the title. ### Input: CREATE TABLE Reviewer (
    rID int,
    name text
)

CREATE TABLE Rating (
    rID int,
    mID int,
    stars int,
    ratingDate date
)

CREATE TABLE Movie (
    mID int,
    title text,
    year int,
    director text
) ### Response: SELECT rID, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title


Instruction: What's the production code of the episode titled 'He ain't a hottie, he's my brother'?

Input:
CREATE TABLE table_1806 (
    "No. in series" real,
    "No. in season" real,
    "Title" text,
    "Directed by" text,
    "Written by" text,
    "Original air date" text,
    "Prod. code" text,
    "Viewers (millions)" text
)

Response: SELECT "Prod. code" FROM table_1806 WHERE "Title" = 'He Ain''t a Hottie, He''s My Brother'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the production code of the episode titled 'He ain't a hottie, he's my brother'? ### Input: CREATE TABLE table_1806 (
    "No. in series" real,
    "No. in season" real,
    "Title" text,
    "Directed by" text,
    "Written by" text,
    "Original air date" text,
    "Prod. code" text,
    "Viewers (millions)" text
) ### Response: SELECT "Prod. code" FROM table_1806 WHERE "Title" = 'He Ain''t a Hottie, He''s My Brother'


Instruction: Give me a bar chart for how many name of each name, and order by the names in ascending.

Input:
CREATE TABLE Products (
    Code INTEGER,
    Name VARCHAR(255),
    Price DECIMAL,
    Manufacturer INTEGER
)

CREATE TABLE Manufacturers (
    Code INTEGER,
    Name VARCHAR(255),
    Headquarter VARCHAR(255),
    Founder VARCHAR(255),
    Revenue REAL
)

Response: SELECT Name, COUNT(Name) FROM Products GROUP BY Name ORDER BY Name

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a bar chart for how many name of each name, and order by the names in ascending. ### Input: CREATE TABLE Products (
    Code INTEGER,
    Name VARCHAR(255),
    Price DECIMAL,
    Manufacturer INTEGER
)

CREATE TABLE Manufacturers (
    Code INTEGER,
    Name VARCHAR(255),
    Headquarter VARCHAR(255),
    Founder VARCHAR(255),
    Revenue REAL
) ### Response: SELECT Name, COUNT(Name) FROM Products GROUP BY Name ORDER BY Name


Instruction: What is the home team score that played away team carlton?

Input:
CREATE TABLE table_name_60 (
    home_team VARCHAR,
    away_team VARCHAR
)

Response: SELECT home_team AS score FROM table_name_60 WHERE away_team = "carlton"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the home team score that played away team carlton? ### Input: CREATE TABLE table_name_60 (
    home_team VARCHAR,
    away_team VARCHAR
) ### Response: SELECT home_team AS score FROM table_name_60 WHERE away_team = "carlton"


Instruction: who received more votes , duncan hunter or alan keyes ?

Input:
CREATE TABLE table_204_951 (
    id number,
    "candidate" text,
    "votes" number,
    "percentage" text,
    "counties" number,
    "delegates" number
)

Response: SELECT "candidate" FROM table_204_951 WHERE "candidate" IN ('duncan hunter', 'alan keyes') ORDER BY "votes" DESC LIMIT 1

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: who received more votes , duncan hunter or alan keyes ? ### Input: CREATE TABLE table_204_951 (
    id number,
    "candidate" text,
    "votes" number,
    "percentage" text,
    "counties" number,
    "delegates" number
) ### Response: SELECT "candidate" FROM table_204_951 WHERE "candidate" IN ('duncan hunter', 'alan keyes') ORDER BY "votes" DESC LIMIT 1


Instruction: Count the number of patients on a sulfameth/trimethoprim ds prescription who were hospitalized for more than 17 days.

Input:
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
)

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
)

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "17" AND prescriptions.drug = "Sulfameth/Trimethoprim DS"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Count the number of patients on a sulfameth/trimethoprim ds prescription who were hospitalized for more than 17 days. ### Input: 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
)

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
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "17" AND prescriptions.drug = "Sulfameth/Trimethoprim DS"


Instruction: What is the sum of Game on february 28?

Input:
CREATE TABLE table_5067 (
    "Game" real,
    "Date" text,
    "Team" text,
    "Score" text,
    "High points" text,
    "High rebounds" text,
    "High assists" text,
    "Location Attendance" text,
    "Record" text
)

Response: SELECT SUM("Game") FROM table_5067 WHERE "Date" = 'february 28'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the sum of Game on february 28? ### Input: CREATE TABLE table_5067 (
    "Game" real,
    "Date" text,
    "Team" text,
    "Score" text,
    "High points" text,
    "High rebounds" text,
    "High assists" text,
    "Location Attendance" text,
    "Record" text
) ### Response: SELECT SUM("Game") FROM table_5067 WHERE "Date" = 'february 28'


Instruction: What type of game had a result of 1:2?

Input:
CREATE TABLE table_name_7 (
    type_of_game VARCHAR,
    results¹ VARCHAR
)

Response: SELECT type_of_game FROM table_name_7 WHERE results¹ = "1:2"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What type of game had a result of 1:2? ### Input: CREATE TABLE table_name_7 (
    type_of_game VARCHAR,
    results¹ VARCHAR
) ### Response: SELECT type_of_game FROM table_name_7 WHERE results¹ = "1:2"