Instruction: When was 11-8 the record?

Input:
CREATE TABLE table_name_43 (
    date VARCHAR,
    record VARCHAR
)

Response: SELECT date FROM table_name_43 WHERE record = "11-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: When was 11-8 the record? ### Input: CREATE TABLE table_name_43 (
    date VARCHAR,
    record VARCHAR
) ### Response: SELECT date FROM table_name_43 WHERE record = "11-8"


Instruction: provide the number of patients whose primary disease is left colon cancer and age is less than 67?

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

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

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

CREATE TABLE 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 WHERE demographic.diagnosis = "LEFT COLON CANCER" AND demographic.age < "67"

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: provide the number of patients whose primary disease is left colon cancer and age is less than 67? ### Input: CREATE TABLE diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

CREATE TABLE 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 WHERE demographic.diagnosis = "LEFT COLON CANCER" AND demographic.age < "67"


Instruction: What is the smallest share for a timeslot ranking less than 4 and fewer viewers than 8.78 million?

Input:
CREATE TABLE table_name_67 (
    share INTEGER,
    viewers__m_ VARCHAR,
    timeslot_rank VARCHAR
)

Response: SELECT MIN(share) FROM table_name_67 WHERE viewers__m_ < 8.78 AND timeslot_rank < 4

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 smallest share for a timeslot ranking less than 4 and fewer viewers than 8.78 million? ### Input: CREATE TABLE table_name_67 (
    share INTEGER,
    viewers__m_ VARCHAR,
    timeslot_rank VARCHAR
) ### Response: SELECT MIN(share) FROM table_name_67 WHERE viewers__m_ < 8.78 AND timeslot_rank < 4


Instruction: What surface was played on with a score of 6 4, 6 3 and on 4 May 1992?

Input:
CREATE TABLE table_41299 (
    "Date" text,
    "Tournament" text,
    "Surface" text,
    "Partnering" text,
    "Opponent in the final" text,
    "Score" text
)

Response: SELECT "Surface" FROM table_41299 WHERE "Score" = '6–4, 6–3' AND "Date" = '4 may 1992'

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 surface was played on with a score of 6 4, 6 3 and on 4 May 1992? ### Input: CREATE TABLE table_41299 (
    "Date" text,
    "Tournament" text,
    "Surface" text,
    "Partnering" text,
    "Opponent in the final" text,
    "Score" text
) ### Response: SELECT "Surface" FROM table_41299 WHERE "Score" = '6–4, 6–3' AND "Date" = '4 may 1992'


Instruction: Average Accepted Answer Score by Question Score for Users Like Me.

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

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE PostTypes (
    Id number,
    Name text
)

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

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

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

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

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

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

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

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

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

Response: SELECT Questions.Score AS QuestionScore, AVG(Answers.Score) AS AnswerScore FROM Posts AS Questions INNER JOIN PostTags ON Questions.Id = PostTags.PostId INNER JOIN Tags ON PostTags.TagId = Tags.Id INNER JOIN Posts AS Answers ON Answers.Id = Questions.AcceptedAnswerId WHERE Questions.Score BETWEEN 1 AND 20 AND Tags.TagName IN ('javascript', 'css', 'html', 'css3', 'html5') AND Answers.OwnerUserId = 918414 GROUP BY Questions.Score

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: Average Accepted Answer Score by Question Score for Users Like Me. ### Input: CREATE TABLE ReviewTasks (
    Id number,
    ReviewTaskTypeId number,
    CreationDate time,
    DeletionDate time,
    ReviewTaskStateId number,
    PostId number,
    SuggestedEditId number,
    CompletedByReviewTaskId number
)

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE PostTypes (
    Id number,
    Name text
)

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

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

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

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

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

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

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

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

CREATE TABLE ReviewRejectionReasons (
    Id number,
    Name text,
    Description text,
    PostTypeId number
) ### Response: SELECT Questions.Score AS QuestionScore, AVG(Answers.Score) AS AnswerScore FROM Posts AS Questions INNER JOIN PostTags ON Questions.Id = PostTags.PostId INNER JOIN Tags ON PostTags.TagId = Tags.Id INNER JOIN Posts AS Answers ON Answers.Id = Questions.AcceptedAnswerId WHERE Questions.Score BETWEEN 1 AND 20 AND Tags.TagName IN ('javascript', 'css', 'html', 'css3', 'html5') AND Answers.OwnerUserId = 918414 GROUP BY Questions.Score


Instruction: WHAT IS THE MANUFACTURER WITH 24 LAPS, AND +1.965 TIME/RETIRED?

Input:
CREATE TABLE table_47681 (
    "Rider" text,
    "Manufacturer" text,
    "Laps" text,
    "Time/Retired" text,
    "Grid" text
)

Response: SELECT "Manufacturer" FROM table_47681 WHERE "Laps" = '24' AND "Time/Retired" = '+1.965'

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 MANUFACTURER WITH 24 LAPS, AND +1.965 TIME/RETIRED? ### Input: CREATE TABLE table_47681 (
    "Rider" text,
    "Manufacturer" text,
    "Laps" text,
    "Time/Retired" text,
    "Grid" text
) ### Response: SELECT "Manufacturer" FROM table_47681 WHERE "Laps" = '24' AND "Time/Retired" = '+1.965'


Instruction: in what year was the last design of passenger baseplates for vehicle registration issued in vermont ?

Input:
CREATE TABLE table_203_498 (
    id number,
    "first issued" text,
    "design" text,
    "slogan" text,
    "serial format" text,
    "serials issued" text,
    "notes" text
)

Response: SELECT MAX("first issued") FROM table_203_498

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 year was the last design of passenger baseplates for vehicle registration issued in vermont ? ### Input: CREATE TABLE table_203_498 (
    id number,
    "first issued" text,
    "design" text,
    "slogan" text,
    "serial format" text,
    "serials issued" text,
    "notes" text
) ### Response: SELECT MAX("first issued") FROM table_203_498


Instruction: What day was the oppenent the detroit lions?

Input:
CREATE TABLE table_19500 (
    "Week" real,
    "Date" text,
    "Opponent" text,
    "Final score" text,
    "Team record" text,
    "Game site" text,
    "Attendance" real
)

Response: SELECT "Date" FROM table_19500 WHERE "Opponent" = 'Detroit Lions'

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 day was the oppenent the detroit lions? ### Input: CREATE TABLE table_19500 (
    "Week" real,
    "Date" text,
    "Opponent" text,
    "Final score" text,
    "Team record" text,
    "Game site" text,
    "Attendance" real
) ### Response: SELECT "Date" FROM table_19500 WHERE "Opponent" = 'Detroit Lions'


Instruction: What is the market value of every comapny in the banking industry ordered by sales and profits? Return a bar chart.

Input:
CREATE TABLE gas_station (
    Station_ID int,
    Open_Year int,
    Location text,
    Manager_Name text,
    Vice_Manager_Name text,
    Representative_Name text
)

CREATE TABLE company (
    Company_ID int,
    Rank int,
    Company text,
    Headquarters text,
    Main_Industry text,
    Sales_billion real,
    Profits_billion real,
    Assets_billion real,
    Market_Value real
)

CREATE TABLE station_company (
    Station_ID int,
    Company_ID int,
    Rank_of_the_Year int
)

Response: SELECT Company, Market_Value FROM company WHERE Main_Industry = 'Banking' ORDER BY Sales_billion, Profits_billion

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 market value of every comapny in the banking industry ordered by sales and profits? Return a bar chart. ### Input: CREATE TABLE gas_station (
    Station_ID int,
    Open_Year int,
    Location text,
    Manager_Name text,
    Vice_Manager_Name text,
    Representative_Name text
)

CREATE TABLE company (
    Company_ID int,
    Rank int,
    Company text,
    Headquarters text,
    Main_Industry text,
    Sales_billion real,
    Profits_billion real,
    Assets_billion real,
    Market_Value real
)

CREATE TABLE station_company (
    Station_ID int,
    Company_ID int,
    Rank_of_the_Year int
) ### Response: SELECT Company, Market_Value FROM company WHERE Main_Industry = 'Banking' ORDER BY Sales_billion, Profits_billion


Instruction: tell me the name of the last specimen test patient 26612 had received in 12/2102?

Input:
CREATE TABLE diagnoses_icd (
    row_id number,
    subject_id number,
    hadm_id number,
    icd9_code text,
    charttime time
)

CREATE TABLE chartevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
)

CREATE TABLE outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value number
)

CREATE TABLE patients (
    row_id number,
    subject_id number,
    gender text,
    dob time,
    dod time
)

CREATE TABLE icustays (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    first_careunit text,
    last_careunit text,
    first_wardid number,
    last_wardid number,
    intime time,
    outtime time
)

CREATE TABLE procedures_icd (
    row_id number,
    subject_id number,
    hadm_id number,
    icd9_code text,
    charttime time
)

CREATE TABLE microbiologyevents (
    row_id number,
    subject_id number,
    hadm_id number,
    charttime time,
    spec_type_desc text,
    org_name text
)

CREATE TABLE transfers (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    eventtype text,
    careunit text,
    wardid number,
    intime time,
    outtime time
)

CREATE TABLE d_icd_diagnoses (
    row_id number,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE admissions (
    row_id number,
    subject_id number,
    hadm_id number,
    admittime time,
    dischtime time,
    admission_type text,
    admission_location text,
    discharge_location text,
    insurance text,
    language text,
    marital_status text,
    ethnicity text,
    age number
)

CREATE TABLE labevents (
    row_id number,
    subject_id number,
    hadm_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
)

CREATE TABLE cost (
    row_id number,
    subject_id number,
    hadm_id number,
    event_type text,
    event_id number,
    chargetime time,
    cost number
)

CREATE TABLE d_items (
    row_id number,
    itemid number,
    label text,
    linksto text
)

CREATE TABLE prescriptions (
    row_id number,
    subject_id number,
    hadm_id number,
    startdate time,
    enddate time,
    drug text,
    dose_val_rx text,
    dose_unit_rx text,
    route text
)

CREATE TABLE d_labitems (
    row_id number,
    itemid number,
    label text
)

CREATE TABLE inputevents_cv (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    amount number
)

CREATE TABLE d_icd_procedures (
    row_id number,
    icd9_code text,
    short_title text,
    long_title text
)

Response: SELECT microbiologyevents.spec_type_desc FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26612) AND STRFTIME('%y-%m', microbiologyevents.charttime) = '2102-12' ORDER BY microbiologyevents.charttime 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: tell me the name of the last specimen test patient 26612 had received in 12/2102? ### Input: CREATE TABLE diagnoses_icd (
    row_id number,
    subject_id number,
    hadm_id number,
    icd9_code text,
    charttime time
)

CREATE TABLE chartevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
)

CREATE TABLE outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value number
)

CREATE TABLE patients (
    row_id number,
    subject_id number,
    gender text,
    dob time,
    dod time
)

CREATE TABLE icustays (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    first_careunit text,
    last_careunit text,
    first_wardid number,
    last_wardid number,
    intime time,
    outtime time
)

CREATE TABLE procedures_icd (
    row_id number,
    subject_id number,
    hadm_id number,
    icd9_code text,
    charttime time
)

CREATE TABLE microbiologyevents (
    row_id number,
    subject_id number,
    hadm_id number,
    charttime time,
    spec_type_desc text,
    org_name text
)

CREATE TABLE transfers (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    eventtype text,
    careunit text,
    wardid number,
    intime time,
    outtime time
)

CREATE TABLE d_icd_diagnoses (
    row_id number,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE admissions (
    row_id number,
    subject_id number,
    hadm_id number,
    admittime time,
    dischtime time,
    admission_type text,
    admission_location text,
    discharge_location text,
    insurance text,
    language text,
    marital_status text,
    ethnicity text,
    age number
)

CREATE TABLE labevents (
    row_id number,
    subject_id number,
    hadm_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
)

CREATE TABLE cost (
    row_id number,
    subject_id number,
    hadm_id number,
    event_type text,
    event_id number,
    chargetime time,
    cost number
)

CREATE TABLE d_items (
    row_id number,
    itemid number,
    label text,
    linksto text
)

CREATE TABLE prescriptions (
    row_id number,
    subject_id number,
    hadm_id number,
    startdate time,
    enddate time,
    drug text,
    dose_val_rx text,
    dose_unit_rx text,
    route text
)

CREATE TABLE d_labitems (
    row_id number,
    itemid number,
    label text
)

CREATE TABLE inputevents_cv (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    amount number
)

CREATE TABLE d_icd_procedures (
    row_id number,
    icd9_code text,
    short_title text,
    long_title text
) ### Response: SELECT microbiologyevents.spec_type_desc FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26612) AND STRFTIME('%y-%m', microbiologyevents.charttime) = '2102-12' ORDER BY microbiologyevents.charttime DESC LIMIT 1


Instruction: what are the new prescriptions today of patient 006-47576 compared to the prescriptions yesterday?

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 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 medication (
    medicationid number,
    patientunitstayid number,
    drugname text,
    dosage text,
    routeadmin text,
    drugstarttime time,
    drugstoptime time
)

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

CREATE TABLE microlab (
    microlabid number,
    patientunitstayid number,
    culturesite text,
    organism text,
    culturetakentime time
)

CREATE TABLE lab (
    labid number,
    patientunitstayid number,
    labname text,
    labresult number,
    labresulttime time
)

CREATE TABLE diagnosis (
    diagnosisid number,
    patientunitstayid number,
    diagnosisname text,
    diagnosistime time,
    icd9code text
)

CREATE TABLE 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 cost (
    costid number,
    uniquepid text,
    patienthealthsystemstayid number,
    eventtype text,
    eventid number,
    chargetime time,
    cost number
)

Response: SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '006-47576') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '006-47576') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-1 day')

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 are the new prescriptions today of patient 006-47576 compared to the prescriptions yesterday? ### 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 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 medication (
    medicationid number,
    patientunitstayid number,
    drugname text,
    dosage text,
    routeadmin text,
    drugstarttime time,
    drugstoptime time
)

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

CREATE TABLE microlab (
    microlabid number,
    patientunitstayid number,
    culturesite text,
    organism text,
    culturetakentime time
)

CREATE TABLE lab (
    labid number,
    patientunitstayid number,
    labname text,
    labresult number,
    labresulttime time
)

CREATE TABLE diagnosis (
    diagnosisid number,
    patientunitstayid number,
    diagnosisname text,
    diagnosistime time,
    icd9code text
)

CREATE TABLE 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 cost (
    costid number,
    uniquepid text,
    patienthealthsystemstayid number,
    eventtype text,
    eventid number,
    chargetime time,
    cost number
) ### Response: SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '006-47576') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '006-47576') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-1 day')


Instruction: For those records from the products and each product's manufacturer, return a bar chart about the distribution of founder and the sum of code , and group by attribute founder, show by the X from high to low please.

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

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

Response: SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T2.Founder 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: For those records from the products and each product's manufacturer, return a bar chart about the distribution of founder and the sum of code , and group by attribute founder, show by the X from high to low please. ### Input: CREATE TABLE Manufacturers (
    Code INTEGER,
    Name VARCHAR(255),
    Headquarter VARCHAR(255),
    Founder VARCHAR(255),
    Revenue REAL
)

CREATE TABLE Products (
    Code INTEGER,
    Name VARCHAR(255),
    Price DECIMAL,
    Manufacturer INTEGER
) ### Response: SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T2.Founder DESC


Instruction: For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and price , and group by attribute headquarter, and rank y-axis from low to high order please.

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

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

Response: SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Price

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: For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and price , and group by attribute headquarter, and rank y-axis from low to high order please. ### Input: CREATE TABLE Manufacturers (
    Code INTEGER,
    Name VARCHAR(255),
    Headquarter VARCHAR(255),
    Founder VARCHAR(255),
    Revenue REAL
)

CREATE TABLE Products (
    Code INTEGER,
    Name VARCHAR(255),
    Price DECIMAL,
    Manufacturer INTEGER
) ### Response: SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Price


Instruction: When was the game that ended with a score of 6-4?

Input:
CREATE TABLE table_name_38 (
    date VARCHAR,
    score VARCHAR
)

Response: SELECT date FROM table_name_38 WHERE score = "6-4"

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: When was the game that ended with a score of 6-4? ### Input: CREATE TABLE table_name_38 (
    date VARCHAR,
    score VARCHAR
) ### Response: SELECT date FROM table_name_38 WHERE score = "6-4"


Instruction: How many goals were scored by Eugene Galekovi ?

Input:
CREATE TABLE table_name_54 (
    goals VARCHAR,
    player VARCHAR
)

Response: SELECT goals FROM table_name_54 WHERE player = "eugene galeković"

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 goals were scored by Eugene Galekovi ? ### Input: CREATE TABLE table_name_54 (
    goals VARCHAR,
    player VARCHAR
) ### Response: SELECT goals FROM table_name_54 WHERE player = "eugene galeković"


Instruction: Plot total number of memory in g by grouped by carrier as a bar graph, display by the sum memory in g in asc.

Input:
CREATE TABLE phone (
    Name text,
    Phone_ID int,
    Memory_in_G int,
    Carrier text,
    Price real
)

CREATE TABLE market (
    Market_ID int,
    District text,
    Num_of_employees int,
    Num_of_shops real,
    Ranking int
)

CREATE TABLE phone_market (
    Market_ID int,
    Phone_ID text,
    Num_of_stock int
)

Response: SELECT Carrier, SUM(Memory_in_G) FROM phone GROUP BY Carrier ORDER BY SUM(Memory_in_G)

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: Plot total number of memory in g by grouped by carrier as a bar graph, display by the sum memory in g in asc. ### Input: CREATE TABLE phone (
    Name text,
    Phone_ID int,
    Memory_in_G int,
    Carrier text,
    Price real
)

CREATE TABLE market (
    Market_ID int,
    District text,
    Num_of_employees int,
    Num_of_shops real,
    Ranking int
)

CREATE TABLE phone_market (
    Market_ID int,
    Phone_ID text,
    Num_of_stock int
) ### Response: SELECT Carrier, SUM(Memory_in_G) FROM phone GROUP BY Carrier ORDER BY SUM(Memory_in_G)


Instruction: Which Source has a Remainder of 15%, and a Topinka of 26%?

Input:
CREATE TABLE table_75308 (
    "Source" text,
    "Date" text,
    "Blagojevich (D)" text,
    "Topinka (R)" text,
    "Remainder" text
)

Response: SELECT "Source" FROM table_75308 WHERE "Remainder" = '15%' AND "Topinka (R)" = '26%'

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 Source has a Remainder of 15%, and a Topinka of 26%? ### Input: CREATE TABLE table_75308 (
    "Source" text,
    "Date" text,
    "Blagojevich (D)" text,
    "Topinka (R)" text,
    "Remainder" text
) ### Response: SELECT "Source" FROM table_75308 WHERE "Remainder" = '15%' AND "Topinka (R)" = '26%'


Instruction: What is the date of the Cubs game when the Cubs had a record of 1-0?

Input:
CREATE TABLE table_name_2 (
    date VARCHAR,
    record VARCHAR
)

Response: SELECT date FROM table_name_2 WHERE record = "1-0"

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 date of the Cubs game when the Cubs had a record of 1-0? ### Input: CREATE TABLE table_name_2 (
    date VARCHAR,
    record VARCHAR
) ### Response: SELECT date FROM table_name_2 WHERE record = "1-0"


Instruction: give the number of patients whose drug code is phen10i and lab test category is blood gas.

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "PHEN10I" AND lab."CATEGORY" = "Blood Gas"

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 the number of patients whose drug code is phen10i and lab test category is blood gas. ### 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 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
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "PHEN10I" AND lab."CATEGORY" = "Blood Gas"


Instruction: How many patients were admitted with pure hyperglyceridemia before 2187?

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2187" AND diagnoses.long_title = "Pure hyperglyceridemia"

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 patients were admitted with pure hyperglyceridemia before 2187? ### Input: 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 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
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2187" AND diagnoses.long_title = "Pure hyperglyceridemia"


Instruction: What is the name of the artist that issued the single on 23 February?

Input:
CREATE TABLE table_9850 (
    "Volume:Issue" text,
    "Issue Date(s)" text,
    "Weeks on Top" text,
    "Song" text,
    "Artist" text
)

Response: SELECT "Artist" FROM table_9850 WHERE "Issue Date(s)" = '23 february'

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 artist that issued the single on 23 February? ### Input: CREATE TABLE table_9850 (
    "Volume:Issue" text,
    "Issue Date(s)" text,
    "Weeks on Top" text,
    "Song" text,
    "Artist" text
) ### Response: SELECT "Artist" FROM table_9850 WHERE "Issue Date(s)" = '23 february'


Instruction: What is the result of the game on April 17 against Los Angeles?

Input:
CREATE TABLE table_8232 (
    "Game" text,
    "Date" text,
    "Home Team" text,
    "Result" text,
    "Road Team" text
)

Response: SELECT "Result" FROM table_8232 WHERE "Road Team" = 'los angeles' AND "Date" = 'april 17'

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 result of the game on April 17 against Los Angeles? ### Input: CREATE TABLE table_8232 (
    "Game" text,
    "Date" text,
    "Home Team" text,
    "Result" text,
    "Road Team" text
) ### Response: SELECT "Result" FROM table_8232 WHERE "Road Team" = 'los angeles' AND "Date" = 'april 17'


Instruction: List the record from the game where Wildcats had 48 points.

Input:
CREATE TABLE table_24561550_1 (
    record VARCHAR,
    wildcats_points VARCHAR
)

Response: SELECT record FROM table_24561550_1 WHERE wildcats_points = 48

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: List the record from the game where Wildcats had 48 points. ### Input: CREATE TABLE table_24561550_1 (
    record VARCHAR,
    wildcats_points VARCHAR
) ### Response: SELECT record FROM table_24561550_1 WHERE wildcats_points = 48


Instruction: show me the flights from PHILADELPHIA to DALLAS with 1 stop

Input:
CREATE TABLE airport_service (
    city_code varchar,
    airport_code varchar,
    miles_distant int,
    direction varchar,
    minutes_distant int
)

CREATE TABLE ground_service (
    city_code text,
    airport_code text,
    transport_type text,
    ground_fare int
)

CREATE TABLE month (
    month_number int,
    month_name 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 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 compartment_class (
    compartment varchar,
    class_type varchar
)

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 airline (
    airline_code varchar,
    airline_name text,
    note text
)

CREATE TABLE time_zone (
    time_zone_code text,
    time_zone_name text,
    hours_from_gmt 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 class_of_service (
    booking_class varchar,
    rank int,
    class_description text
)

CREATE TABLE time_interval (
    period text,
    begin_time int,
    end_time int
)

CREATE TABLE city (
    city_code varchar,
    city_name varchar,
    state_code varchar,
    country_name varchar,
    time_zone_code varchar
)

CREATE TABLE flight_fare (
    flight_id int,
    fare_id int
)

CREATE TABLE state (
    state_code text,
    state_name text,
    country_name 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 code_description (
    code varchar,
    description text
)

CREATE TABLE date_day (
    month_number int,
    day_number int,
    year int,
    day_name varchar
)

CREATE TABLE equipment_sequence (
    aircraft_code_sequence varchar,
    aircraft_code 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 days (
    days_code varchar,
    day_name varchar
)

CREATE TABLE flight_leg (
    flight_id int,
    leg_number int,
    leg_flight 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 dual_carrier (
    main_airline varchar,
    low_flight_number int,
    high_flight_number int,
    dual_airline varchar,
    service_name text
)

CREATE TABLE food_service (
    meal_code text,
    meal_number int,
    compartment text,
    meal_description varchar
)

Response: SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND flight.stops = 1 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PHILADELPHIA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code

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: show me the flights from PHILADELPHIA to DALLAS with 1 stop ### Input: CREATE TABLE airport_service (
    city_code varchar,
    airport_code varchar,
    miles_distant int,
    direction varchar,
    minutes_distant int
)

CREATE TABLE ground_service (
    city_code text,
    airport_code text,
    transport_type text,
    ground_fare int
)

CREATE TABLE month (
    month_number int,
    month_name 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 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 compartment_class (
    compartment varchar,
    class_type varchar
)

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 airline (
    airline_code varchar,
    airline_name text,
    note text
)

CREATE TABLE time_zone (
    time_zone_code text,
    time_zone_name text,
    hours_from_gmt 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 class_of_service (
    booking_class varchar,
    rank int,
    class_description text
)

CREATE TABLE time_interval (
    period text,
    begin_time int,
    end_time int
)

CREATE TABLE city (
    city_code varchar,
    city_name varchar,
    state_code varchar,
    country_name varchar,
    time_zone_code varchar
)

CREATE TABLE flight_fare (
    flight_id int,
    fare_id int
)

CREATE TABLE state (
    state_code text,
    state_name text,
    country_name 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 code_description (
    code varchar,
    description text
)

CREATE TABLE date_day (
    month_number int,
    day_number int,
    year int,
    day_name varchar
)

CREATE TABLE equipment_sequence (
    aircraft_code_sequence varchar,
    aircraft_code 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 days (
    days_code varchar,
    day_name varchar
)

CREATE TABLE flight_leg (
    flight_id int,
    leg_number int,
    leg_flight 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 dual_carrier (
    main_airline varchar,
    low_flight_number int,
    high_flight_number int,
    dual_airline varchar,
    service_name text
)

CREATE TABLE food_service (
    meal_code text,
    meal_number int,
    compartment text,
    meal_description varchar
) ### Response: SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND flight.stops = 1 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PHILADELPHIA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code


Instruction: Show all card type codes and the number of cards in each type.

Input:
CREATE TABLE customers (
    customer_id number,
    customer_first_name text,
    customer_last_name text,
    customer_address text,
    customer_phone text,
    customer_email text,
    other_customer_details text
)

CREATE TABLE financial_transactions (
    transaction_id number,
    previous_transaction_id number,
    account_id number,
    card_id number,
    transaction_type text,
    transaction_date time,
    transaction_amount number,
    transaction_comment text,
    other_transaction_details text
)

CREATE TABLE customers_cards (
    card_id number,
    customer_id number,
    card_type_code text,
    card_number text,
    date_valid_from time,
    date_valid_to time,
    other_card_details text
)

CREATE TABLE accounts (
    account_id number,
    customer_id number,
    account_name text,
    other_account_details text
)

Response: SELECT card_type_code, COUNT(*) FROM customers_cards GROUP BY card_type_code

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: Show all card type codes and the number of cards in each type. ### Input: CREATE TABLE customers (
    customer_id number,
    customer_first_name text,
    customer_last_name text,
    customer_address text,
    customer_phone text,
    customer_email text,
    other_customer_details text
)

CREATE TABLE financial_transactions (
    transaction_id number,
    previous_transaction_id number,
    account_id number,
    card_id number,
    transaction_type text,
    transaction_date time,
    transaction_amount number,
    transaction_comment text,
    other_transaction_details text
)

CREATE TABLE customers_cards (
    card_id number,
    customer_id number,
    card_type_code text,
    card_number text,
    date_valid_from time,
    date_valid_to time,
    other_card_details text
)

CREATE TABLE accounts (
    account_id number,
    customer_id number,
    account_name text,
    other_account_details text
) ### Response: SELECT card_type_code, COUNT(*) FROM customers_cards GROUP BY card_type_code


Instruction: Name the song choice for michael jackson

Input:
CREATE TABLE table_23048 (
    "Week #" text,
    "Theme" text,
    "Song choice" text,
    "Original artist" text,
    "Order #" text,
    "Result" text
)

Response: SELECT "Song choice" FROM table_23048 WHERE "Original artist" = 'Michael Jackson'

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 song choice for michael jackson ### Input: CREATE TABLE table_23048 (
    "Week #" text,
    "Theme" text,
    "Song choice" text,
    "Original artist" text,
    "Order #" text,
    "Result" text
) ### Response: SELECT "Song choice" FROM table_23048 WHERE "Original artist" = 'Michael Jackson'


Instruction: How many points did the ESC Riverrats Geretsried, who lost more than 3 games, score?

Input:
CREATE TABLE table_name_17 (
    points INTEGER,
    lost VARCHAR,
    name VARCHAR
)

Response: SELECT SUM(points) FROM table_name_17 WHERE lost > 3 AND name = "esc riverrats geretsried"

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 points did the ESC Riverrats Geretsried, who lost more than 3 games, score? ### Input: CREATE TABLE table_name_17 (
    points INTEGER,
    lost VARCHAR,
    name VARCHAR
) ### Response: SELECT SUM(points) FROM table_name_17 WHERE lost > 3 AND name = "esc riverrats geretsried"


Instruction: How big was the crowd when the away team was Richmond?

Input:
CREATE TABLE table_name_4 (
    crowd VARCHAR,
    away_team VARCHAR
)

Response: SELECT crowd FROM table_name_4 WHERE away_team = "richmond"

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 big was the crowd when the away team was Richmond? ### Input: CREATE TABLE table_name_4 (
    crowd VARCHAR,
    away_team VARCHAR
) ### Response: SELECT crowd FROM table_name_4 WHERE away_team = "richmond"


Instruction: Name the cyrillic name for melenci

Input:
CREATE TABLE table_3334 (
    "Settlement" text,
    "Cyrillic Name Other Names" text,
    "Type" text,
    "Population (2011)" real,
    "Largest ethnic group (2002)" text,
    "Dominant religion (2002)" text
)

Response: SELECT "Cyrillic Name Other Names" FROM table_3334 WHERE "Settlement" = 'Melenci'

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 cyrillic name for melenci ### Input: CREATE TABLE table_3334 (
    "Settlement" text,
    "Cyrillic Name Other Names" text,
    "Type" text,
    "Population (2011)" real,
    "Largest ethnic group (2002)" text,
    "Dominant religion (2002)" text
) ### Response: SELECT "Cyrillic Name Other Names" FROM table_3334 WHERE "Settlement" = 'Melenci'


Instruction: current alcohol abuse

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

Response: SELECT * FROM table_train_185 WHERE alcohol_abuse = 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: current alcohol abuse ### Input: 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
) ### Response: SELECT * FROM table_train_185 WHERE alcohol_abuse = 1


Instruction: For week number of the top 40, what was the results?

Input:
CREATE TABLE table_22736523_1 (
    result VARCHAR,
    week__number VARCHAR
)

Response: SELECT result FROM table_22736523_1 WHERE week__number = "Top 40"

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: For week number of the top 40, what was the results? ### Input: CREATE TABLE table_22736523_1 (
    result VARCHAR,
    week__number VARCHAR
) ### Response: SELECT result FROM table_22736523_1 WHERE week__number = "Top 40"


Instruction: Number of posts in past 30 days.

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

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

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

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

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 PostHistory (
    Id number,
    PostHistoryTypeId number,
    PostId number,
    RevisionGUID other,
    CreationDate time,
    UserId number,
    UserDisplayName text,
    Comment text,
    Text text,
    ContentLicense text
)

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

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 ReviewTaskTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

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

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

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

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name 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 PostTypes (
    Id number,
    Name text
)

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

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

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

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

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

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

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 CloseReasonTypes (
    Id number,
    Name text,
    Description text
)

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

Response: SELECT COUNT(*) FROM Posts WHERE PostTypeId IN (1, 2) AND CreationDate >= DATEADD(DAY, -30, GETDATE())

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: Number of posts in past 30 days. ### Input: CREATE TABLE FlagTypes (
    Id number,
    Name text,
    Description text
)

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

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

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

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 PostHistory (
    Id number,
    PostHistoryTypeId number,
    PostId number,
    RevisionGUID other,
    CreationDate time,
    UserId number,
    UserDisplayName text,
    Comment text,
    Text text,
    ContentLicense text
)

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

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 ReviewTaskTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

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

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

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

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name 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 PostTypes (
    Id number,
    Name text
)

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

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

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

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

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

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

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 CloseReasonTypes (
    Id number,
    Name text,
    Description text
)

CREATE TABLE PostNoticeTypes (
    Id number,
    ClassId number,
    Name text,
    Body text,
    IsHidden boolean,
    Predefined boolean,
    PostNoticeDurationId number
) ### Response: SELECT COUNT(*) FROM Posts WHERE PostTypeId IN (1, 2) AND CreationDate >= DATEADD(DAY, -30, GETDATE())


Instruction: What are the age groups for the Big League World Series?

Input:
CREATE TABLE table_name_26 (
    age_groups VARCHAR,
    competition_name VARCHAR
)

Response: SELECT age_groups FROM table_name_26 WHERE competition_name = "big league world series"

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 are the age groups for the Big League World Series? ### Input: CREATE TABLE table_name_26 (
    age_groups VARCHAR,
    competition_name VARCHAR
) ### Response: SELECT age_groups FROM table_name_26 WHERE competition_name = "big league world series"


Instruction: What is the money with a Score of 76-70-75-72=293?

Input:
CREATE TABLE table_58997 (
    "Place" text,
    "Player" text,
    "Country" text,
    "Score" text,
    "To par" real,
    "Money ( \u00a3 )" text
)

Response: SELECT "Money ( \u00a3 )" FROM table_58997 WHERE "Score" = '76-70-75-72=293'

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 money with a Score of 76-70-75-72=293? ### Input: CREATE TABLE table_58997 (
    "Place" text,
    "Player" text,
    "Country" text,
    "Score" text,
    "To par" real,
    "Money ( \u00a3 )" text
) ### Response: SELECT "Money ( \u00a3 )" FROM table_58997 WHERE "Score" = '76-70-75-72=293'


Instruction: give me the number of patients whose language is cape and age is less than 67?

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "CAPE" AND demographic.age < "67"

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 language is cape and age is less than 67? ### 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 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
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "CAPE" AND demographic.age < "67"


Instruction: Which year has an Organization of new york yankees, and a Team of johnson city yankees?

Input:
CREATE TABLE table_name_61 (
    year VARCHAR,
    organization VARCHAR,
    team VARCHAR
)

Response: SELECT year FROM table_name_61 WHERE organization = "new york yankees" AND team = "johnson city yankees"

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 year has an Organization of new york yankees, and a Team of johnson city yankees? ### Input: CREATE TABLE table_name_61 (
    year VARCHAR,
    organization VARCHAR,
    team VARCHAR
) ### Response: SELECT year FROM table_name_61 WHERE organization = "new york yankees" AND team = "johnson city yankees"


Instruction: calculate the minimum age of patients who are 83 years of age or older and were hospitalized for 43 days.

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

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

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

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
)

Response: SELECT MIN(demographic.age) FROM demographic WHERE demographic.age >= "83" AND demographic.days_stay = "43"

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: calculate the minimum age of patients who are 83 years of age or older and were hospitalized for 43 days. ### Input: CREATE TABLE diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

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
) ### Response: SELECT MIN(demographic.age) FROM demographic WHERE demographic.age >= "83" AND demographic.days_stay = "43"


Instruction: What are the names of storms that did not affect two or more regions?

Input:
CREATE TABLE region (
    region_id number,
    region_code text,
    region_name text
)

CREATE TABLE affected_region (
    region_id number,
    storm_id number,
    number_city_affected number
)

CREATE TABLE storm (
    storm_id number,
    name text,
    dates_active text,
    max_speed number,
    damage_millions_usd number,
    number_deaths number
)

Response: SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id 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: What are the names of storms that did not affect two or more regions? ### Input: CREATE TABLE region (
    region_id number,
    region_code text,
    region_name text
)

CREATE TABLE affected_region (
    region_id number,
    storm_id number,
    number_city_affected number
)

CREATE TABLE storm (
    storm_id number,
    name text,
    dates_active text,
    max_speed number,
    damage_millions_usd number,
    number_deaths number
) ### Response: SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2


Instruction: What is the average pick of player paul maclean, who had a draft before 1978?

Input:
CREATE TABLE table_12802 (
    "Draft" real,
    "Round" real,
    "Pick" real,
    "Player" text,
    "Nationality" text
)

Response: SELECT AVG("Pick") FROM table_12802 WHERE "Player" = 'paul maclean' AND "Draft" < '1978'

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 average pick of player paul maclean, who had a draft before 1978? ### Input: CREATE TABLE table_12802 (
    "Draft" real,
    "Round" real,
    "Pick" real,
    "Player" text,
    "Nationality" text
) ### Response: SELECT AVG("Pick") FROM table_12802 WHERE "Player" = 'paul maclean' AND "Draft" < '1978'


Instruction: Name the class for boten

Input:
CREATE TABLE table_1745843_9 (
    class VARCHAR,
    part_3 VARCHAR
)

Response: SELECT class FROM table_1745843_9 WHERE part_3 = "boten"

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 class for boten ### Input: CREATE TABLE table_1745843_9 (
    class VARCHAR,
    part_3 VARCHAR
) ### Response: SELECT class FROM table_1745843_9 WHERE part_3 = "boten"


Instruction: Name the segment 1 for episode # 2/225

Input:
CREATE TABLE table_26635 (
    "Episode #" text,
    "Segment 1" text,
    "Segment 2" text,
    "Original airdate" text,
    "Lessons taught" text
)

Response: SELECT "Segment 1" FROM table_26635 WHERE "Episode #" = '2/225'

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 segment 1 for episode # 2/225 ### Input: CREATE TABLE table_26635 (
    "Episode #" text,
    "Segment 1" text,
    "Segment 2" text,
    "Original airdate" text,
    "Lessons taught" text
) ### Response: SELECT "Segment 1" FROM table_26635 WHERE "Episode #" = '2/225'