Instruction: find out the age and lab test fluid to be checked for patient with patient id 2560.

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

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

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

Response: SELECT demographic.age, lab.fluid FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "2560"

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 out the age and lab test fluid to be checked for patient with patient id 2560. ### Input: CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

CREATE TABLE 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
) ### Response: SELECT demographic.age, lab.fluid FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "2560"


Instruction: What is the urban sub-area with an East Dunbartonshire council area and a population of 19,020?

Input:
CREATE TABLE table_37692 (
    "Rank" text,
    "Urban sub-area" text,
    "Population" text,
    "Status" text,
    "Council area" text
)

Response: SELECT "Urban sub-area" FROM table_37692 WHERE "Council area" = 'east dunbartonshire' AND "Population" = '19,020'

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 urban sub-area with an East Dunbartonshire council area and a population of 19,020? ### Input: CREATE TABLE table_37692 (
    "Rank" text,
    "Urban sub-area" text,
    "Population" text,
    "Status" text,
    "Council area" text
) ### Response: SELECT "Urban sub-area" FROM table_37692 WHERE "Council area" = 'east dunbartonshire' AND "Population" = '19,020'


Instruction: List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.

Input:
CREATE TABLE player (
    pid number,
    pname text,
    ycard text,
    hs number
)

CREATE TABLE college (
    cname text,
    state text,
    enr number
)

CREATE TABLE tryout (
    pid number,
    cname text,
    ppos text,
    decision text
)

Response: SELECT cname FROM college WHERE enr > 18000 ORDER BY cname

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 name of the colleges whose enrollment is greater 18000 sorted by the college's name. ### Input: CREATE TABLE player (
    pid number,
    pname text,
    ycard text,
    hs number
)

CREATE TABLE college (
    cname text,
    state text,
    enr number
)

CREATE TABLE tryout (
    pid number,
    cname text,
    ppos text,
    decision text
) ### Response: SELECT cname FROM college WHERE enr > 18000 ORDER BY cname


Instruction: What are the memories and carriers of phones Show bar chart, and show by the mean memory in g in descending.

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

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

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

Response: SELECT Carrier, AVG(Memory_in_G) FROM phone GROUP BY Carrier ORDER BY AVG(Memory_in_G) 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: What are the memories and carriers of phones Show bar chart, and show by the mean memory in g in descending. ### Input: CREATE TABLE phone_market (
    Market_ID int,
    Phone_ID text,
    Num_of_stock int
)

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

CREATE TABLE phone (
    Name text,
    Phone_ID int,
    Memory_in_G int,
    Carrier text,
    Price real
) ### Response: SELECT Carrier, AVG(Memory_in_G) FROM phone GROUP BY Carrier ORDER BY AVG(Memory_in_G) DESC


Instruction: what is the number of patients whose death status is 1 and diagnoses icd9 code is 261?

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.icd9_code = "261"

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 number of patients whose death status is 1 and diagnoses icd9 code is 261? ### Input: 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 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
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.icd9_code = "261"


Instruction: which tag is used in questions with the highest average score, excluding tags used in less than 5 q.

Input:
CREATE TABLE Comments (
    Id number,
    PostId number,
    Score number,
    Text text,
    CreationDate time,
    UserDisplayName text,
    UserId number,
    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 TagSynonyms (
    Id number,
    SourceTagName text,
    TargetTagName text,
    CreationDate time,
    OwnerUserId number,
    AutoRenameCount number,
    LastAutoRename time,
    Score number,
    ApprovedByUserId number,
    ApprovalDate time
)

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

CREATE TABLE PostLinks (
    Id number,
    CreationDate time,
    PostId number,
    RelatedPostId number,
    LinkTypeId 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 Badges (
    Id number,
    UserId number,
    Name text,
    Date time,
    Class number,
    TagBased boolean
)

CREATE TABLE ReviewTaskTypes (
    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 PostFeedback (
    Id number,
    PostId number,
    IsAnonymous boolean,
    VoteTypeId number,
    CreationDate time
)

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

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

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

CREATE TABLE ReviewTaskResults (
    Id number,
    ReviewTaskId number,
    ReviewTaskResultTypeId number,
    CreationDate time,
    RejectionReasonId number,
    Comment 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 PostNoticeTypes (
    Id number,
    ClassId number,
    Name text,
    Body text,
    IsHidden boolean,
    Predefined boolean,
    PostNoticeDurationId number
)

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

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

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

Response: SELECT Tags.TagName, AVG(CAST(Posts.Score AS FLOAT)) AS avg, COUNT(Posts.Id) AS count FROM Tags LEFT JOIN Posts ON Posts.Tags LIKE '%' + Tags.TagName + '%' GROUP BY Tags.TagName HAVING COUNT(Posts.Id) >= 5 ORDER BY avg 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: which tag is used in questions with the highest average score, excluding tags used in less than 5 q. ### Input: CREATE TABLE Comments (
    Id number,
    PostId number,
    Score number,
    Text text,
    CreationDate time,
    UserDisplayName text,
    UserId number,
    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 TagSynonyms (
    Id number,
    SourceTagName text,
    TargetTagName text,
    CreationDate time,
    OwnerUserId number,
    AutoRenameCount number,
    LastAutoRename time,
    Score number,
    ApprovedByUserId number,
    ApprovalDate time
)

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

CREATE TABLE PostLinks (
    Id number,
    CreationDate time,
    PostId number,
    RelatedPostId number,
    LinkTypeId 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 Badges (
    Id number,
    UserId number,
    Name text,
    Date time,
    Class number,
    TagBased boolean
)

CREATE TABLE ReviewTaskTypes (
    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 PostFeedback (
    Id number,
    PostId number,
    IsAnonymous boolean,
    VoteTypeId number,
    CreationDate time
)

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

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

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

CREATE TABLE ReviewTaskResults (
    Id number,
    ReviewTaskId number,
    ReviewTaskResultTypeId number,
    CreationDate time,
    RejectionReasonId number,
    Comment 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 PostNoticeTypes (
    Id number,
    ClassId number,
    Name text,
    Body text,
    IsHidden boolean,
    Predefined boolean,
    PostNoticeDurationId number
)

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

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

CREATE TABLE Tags (
    Id number,
    TagName text,
    Count number,
    ExcerptPostId number,
    WikiPostId number
) ### Response: SELECT Tags.TagName, AVG(CAST(Posts.Score AS FLOAT)) AS avg, COUNT(Posts.Id) AS count FROM Tags LEFT JOIN Posts ON Posts.Tags LIKE '%' + Tags.TagName + '%' GROUP BY Tags.TagName HAVING COUNT(Posts.Id) >= 5 ORDER BY avg DESC LIMIT 1


Instruction: When the Total is less than 1, and Bronze is 0, how many Gold medals are there?

Input:
CREATE TABLE table_51383 (
    "Rank" real,
    "Nation" text,
    "Gold" real,
    "Silver" real,
    "Bronze" real,
    "Total" real
)

Response: SELECT SUM("Gold") FROM table_51383 WHERE "Bronze" = '0' AND "Total" < '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: When the Total is less than 1, and Bronze is 0, how many Gold medals are there? ### Input: CREATE TABLE table_51383 (
    "Rank" real,
    "Nation" text,
    "Gold" real,
    "Silver" real,
    "Bronze" real,
    "Total" real
) ### Response: SELECT SUM("Gold") FROM table_51383 WHERE "Bronze" = '0' AND "Total" < '1'


Instruction: March of 29 involves what highest scoring game?

Input:
CREATE TABLE table_name_40 (
    game INTEGER,
    march VARCHAR
)

Response: SELECT MAX(game) FROM table_name_40 WHERE march = 29

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: March of 29 involves what highest scoring game? ### Input: CREATE TABLE table_name_40 (
    game INTEGER,
    march VARCHAR
) ### Response: SELECT MAX(game) FROM table_name_40 WHERE march = 29


Instruction: The episode with production code 9abx02 was originally aired on what date?

Input:
CREATE TABLE table_72086 (
    "No. in set" real,
    "No. in series" real,
    "Title" text,
    "Directed by" text,
    "Written by" text,
    "Original air date" text,
    "Production code" text
)

Response: SELECT "Original air date" FROM table_72086 WHERE "Production code" = '9ABX02'

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: The episode with production code 9abx02 was originally aired on what date? ### Input: CREATE TABLE table_72086 (
    "No. in set" real,
    "No. in series" real,
    "Title" text,
    "Directed by" text,
    "Written by" text,
    "Original air date" text,
    "Production code" text
) ### Response: SELECT "Original air date" FROM table_72086 WHERE "Production code" = '9ABX02'


Instruction: What is the percentage of females where in India and are maharashtra?

Input:
CREATE TABLE table_19423 (
    "State/UT Code" real,
    "India/State/UT" text,
    "Literate Persons (%)" text,
    "Males (%)" text,
    "Females (%)" text
)

Response: SELECT "Females (%)" FROM table_19423 WHERE "India/State/UT" = 'Maharashtra'

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 percentage of females where in India and are maharashtra? ### Input: CREATE TABLE table_19423 (
    "State/UT Code" real,
    "India/State/UT" text,
    "Literate Persons (%)" text,
    "Males (%)" text,
    "Females (%)" text
) ### Response: SELECT "Females (%)" FROM table_19423 WHERE "India/State/UT" = 'Maharashtra'


Instruction: Show the name of cities in the county that has the largest number of police officers.

Input:
CREATE TABLE county_public_safety (
    county_id number,
    name text,
    population number,
    police_officers number,
    residents_per_officer number,
    case_burden number,
    crime_rate number,
    police_force text,
    location text
)

CREATE TABLE city (
    city_id number,
    county_id number,
    name text,
    white number,
    black number,
    amerindian number,
    asian number,
    multiracial number,
    hispanic number
)

Response: SELECT name FROM city WHERE county_id = (SELECT county_id FROM county_public_safety ORDER BY police_officers 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: Show the name of cities in the county that has the largest number of police officers. ### Input: CREATE TABLE county_public_safety (
    county_id number,
    name text,
    population number,
    police_officers number,
    residents_per_officer number,
    case_burden number,
    crime_rate number,
    police_force text,
    location text
)

CREATE TABLE city (
    city_id number,
    county_id number,
    name text,
    white number,
    black number,
    amerindian number,
    asian number,
    multiracial number,
    hispanic number
) ### Response: SELECT name FROM city WHERE county_id = (SELECT county_id FROM county_public_safety ORDER BY police_officers DESC LIMIT 1)


Instruction: What is the skip that has a third of Anna Sloan in season 2012-13?

Input:
CREATE TABLE table_50536 (
    "Season" text,
    "Skip" text,
    "Third" text,
    "Second" text,
    "Lead" text
)

Response: SELECT "Skip" FROM table_50536 WHERE "Third" = 'anna sloan' AND "Season" = '2012-13'

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 skip that has a third of Anna Sloan in season 2012-13? ### Input: CREATE TABLE table_50536 (
    "Season" text,
    "Skip" text,
    "Third" text,
    "Second" text,
    "Lead" text
) ### Response: SELECT "Skip" FROM table_50536 WHERE "Third" = 'anna sloan' AND "Season" = '2012-13'


Instruction: since 57 months ago, had patient 84042 been prescribed hydromorphone p.f., fentanyl patch, or vial?

Input:
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 inputevents_cv (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    amount number
)

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

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

CREATE TABLE d_icd_procedures (
    row_id number,
    icd9_code text,
    short_title text,
    long_title 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 labevents (
    row_id number,
    subject_id number,
    hadm_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
)

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

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

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

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

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

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

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

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

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

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

Response: SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 84042) AND prescriptions.drug IN ('hydromorphone p.f.', 'fentanyl patch', 'vial') AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-57 month')

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: since 57 months ago, had patient 84042 been prescribed hydromorphone p.f., fentanyl patch, or vial? ### Input: 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 inputevents_cv (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    amount number
)

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

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

CREATE TABLE d_icd_procedures (
    row_id number,
    icd9_code text,
    short_title text,
    long_title 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 labevents (
    row_id number,
    subject_id number,
    hadm_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
)

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

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

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

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

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

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

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

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

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

CREATE TABLE d_items (
    row_id number,
    itemid number,
    label text,
    linksto text
) ### Response: SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 84042) AND prescriptions.drug IN ('hydromorphone p.f.', 'fentanyl patch', 'vial') AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-57 month')


Instruction: I want the time/retired for grid of 24

Input:
CREATE TABLE table_name_12 (
    time_retired VARCHAR,
    grid VARCHAR
)

Response: SELECT time_retired FROM table_name_12 WHERE grid = 24

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: I want the time/retired for grid of 24 ### Input: CREATE TABLE table_name_12 (
    time_retired VARCHAR,
    grid VARCHAR
) ### Response: SELECT time_retired FROM table_name_12 WHERE grid = 24


Instruction: Which spine has 12 issues?

Input:
CREATE TABLE table_38310 (
    "Start month" text,
    "End month" text,
    "Cover" text,
    "Spine" text,
    "Indicia" text,
    "Masthead" text,
    "Number of issues" real
)

Response: SELECT "Spine" FROM table_38310 WHERE "Number of issues" = '12'

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 spine has 12 issues? ### Input: CREATE TABLE table_38310 (
    "Start month" text,
    "End month" text,
    "Cover" text,
    "Spine" text,
    "Indicia" text,
    "Masthead" text,
    "Number of issues" real
) ### Response: SELECT "Spine" FROM table_38310 WHERE "Number of issues" = '12'


Instruction: Tell me the lowest year for shubert theatre

Input:
CREATE TABLE table_32109 (
    "Year" real,
    "Play" text,
    "Role" text,
    "Theatre" text,
    "Location" text
)

Response: SELECT MIN("Year") FROM table_32109 WHERE "Theatre" = 'shubert theatre'

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 lowest year for shubert theatre ### Input: CREATE TABLE table_32109 (
    "Year" real,
    "Play" text,
    "Role" text,
    "Theatre" text,
    "Location" text
) ### Response: SELECT MIN("Year") FROM table_32109 WHERE "Theatre" = 'shubert theatre'


Instruction: What is the least top division titles?

Input:
CREATE TABLE table_11250_4 (
    top_division_titles INTEGER
)

Response: SELECT MIN(top_division_titles) FROM table_11250_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 least top division titles? ### Input: CREATE TABLE table_11250_4 (
    top_division_titles INTEGER
) ### Response: SELECT MIN(top_division_titles) FROM table_11250_4


Instruction: calculate the duration of hospital stay of patient 010-20205's last hospital stay.

Input:
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 allergy (
    allergyid number,
    patientunitstayid number,
    drugname text,
    allergyname text,
    allergytime time
)

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

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

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 diagnosis (
    diagnosisid number,
    patientunitstayid number,
    diagnosisname text,
    diagnosistime time,
    icd9code text
)

Response: SELECT STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', patient.hospitaladmittime) FROM patient WHERE patient.uniquepid = '010-20205' AND NOT patient.hospitaladmittime IS NULL ORDER BY patient.hospitaladmittime 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: calculate the duration of hospital stay of patient 010-20205's last hospital stay. ### Input: 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 allergy (
    allergyid number,
    patientunitstayid number,
    drugname text,
    allergyname text,
    allergytime time
)

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

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

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 diagnosis (
    diagnosisid number,
    patientunitstayid number,
    diagnosisname text,
    diagnosistime time,
    icd9code text
) ### Response: SELECT STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', patient.hospitaladmittime) FROM patient WHERE patient.uniquepid = '010-20205' AND NOT patient.hospitaladmittime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1


Instruction: Which round has an opponent of Freiburg?

Input:
CREATE TABLE table_43511 (
    "Season" text,
    "Competition" text,
    "Round" text,
    "Opponent" text,
    "Home" text,
    "Away" text
)

Response: SELECT "Round" FROM table_43511 WHERE "Opponent" = 'freiburg'

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 round has an opponent of Freiburg? ### Input: CREATE TABLE table_43511 (
    "Season" text,
    "Competition" text,
    "Round" text,
    "Opponent" text,
    "Home" text,
    "Away" text
) ### Response: SELECT "Round" FROM table_43511 WHERE "Opponent" = 'freiburg'


Instruction: What's the Area with a Density of 263?

Input:
CREATE TABLE table_11104 (
    "Suburb" text,
    "Population (in 2008)" real,
    "Median age (in 2006)" text,
    "Mean household size (in 2006)" text,
    "Area (km\u00b2)" real,
    "Density (/km\u00b2)" real,
    "Date first settled as a suburb" real,
    "Gazetted as a Division Name" text
)

Response: SELECT AVG("Area (km\u00b2)") FROM table_11104 WHERE "Density (/km\u00b2)" = '263'

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 Area with a Density of 263? ### Input: CREATE TABLE table_11104 (
    "Suburb" text,
    "Population (in 2008)" real,
    "Median age (in 2006)" text,
    "Mean household size (in 2006)" text,
    "Area (km\u00b2)" real,
    "Density (/km\u00b2)" real,
    "Date first settled as a suburb" real,
    "Gazetted as a Division Name" text
) ### Response: SELECT AVG("Area (km\u00b2)") FROM table_11104 WHERE "Density (/km\u00b2)" = '263'


Instruction: For the years 1992-93, what position did he play for the Houston Rockets?

Input:
CREATE TABLE table_name_4 (
    position VARCHAR,
    years_for_rockets VARCHAR
)

Response: SELECT position FROM table_name_4 WHERE years_for_rockets = "1992-93"

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 the years 1992-93, what position did he play for the Houston Rockets? ### Input: CREATE TABLE table_name_4 (
    position VARCHAR,
    years_for_rockets VARCHAR
) ### Response: SELECT position FROM table_name_4 WHERE years_for_rockets = "1992-93"


Instruction: What is the largest number of points they had?

Input:
CREATE TABLE table_23308178_8 (
    points INTEGER
)

Response: SELECT MAX(points) FROM table_23308178_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: What is the largest number of points they had? ### Input: CREATE TABLE table_23308178_8 (
    points INTEGER
) ### Response: SELECT MAX(points) FROM table_23308178_8


Instruction: Create a bar chart showing maximal revenue across name

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, MAX(Revenue) FROM Manufacturers GROUP BY Headquarter

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: Create a bar chart showing maximal revenue across name ### 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, MAX(Revenue) FROM Manufacturers GROUP BY Headquarter


Instruction: Tell me the total number of Bronze for futsal

Input:
CREATE TABLE table_10315 (
    "Sport" text,
    "Gold" real,
    "Silver" real,
    "Bronze" real,
    "Total" real
)

Response: SELECT COUNT("Bronze") FROM table_10315 WHERE "Sport" = 'futsal'

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 total number of Bronze for futsal ### Input: CREATE TABLE table_10315 (
    "Sport" text,
    "Gold" real,
    "Silver" real,
    "Bronze" real,
    "Total" real
) ### Response: SELECT COUNT("Bronze") FROM table_10315 WHERE "Sport" = 'futsal'


Instruction: When 2005 is the year played what is the lowest year drafted?

Input:
CREATE TABLE table_18373863_2 (
    year_drafted INTEGER,
    years_played VARCHAR
)

Response: SELECT MIN(year_drafted) FROM table_18373863_2 WHERE years_played = "2005"

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 2005 is the year played what is the lowest year drafted? ### Input: CREATE TABLE table_18373863_2 (
    year_drafted INTEGER,
    years_played VARCHAR
) ### Response: SELECT MIN(year_drafted) FROM table_18373863_2 WHERE years_played = "2005"


Instruction: Give me the comparison about School_ID over the ACC_Road , and group by attribute ACC_Home by a bar chart, and order by the bars in desc.

Input:
CREATE TABLE university (
    School_ID int,
    School text,
    Location text,
    Founded real,
    Affiliation text,
    Enrollment real,
    Nickname text,
    Primary_conference text
)

CREATE TABLE basketball_match (
    Team_ID int,
    School_ID int,
    Team_Name text,
    ACC_Regular_Season text,
    ACC_Percent text,
    ACC_Home text,
    ACC_Road text,
    All_Games text,
    All_Games_Percent int,
    All_Home text,
    All_Road text,
    All_Neutral text
)

Response: SELECT ACC_Road, School_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road 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: Give me the comparison about School_ID over the ACC_Road , and group by attribute ACC_Home by a bar chart, and order by the bars in desc. ### Input: CREATE TABLE university (
    School_ID int,
    School text,
    Location text,
    Founded real,
    Affiliation text,
    Enrollment real,
    Nickname text,
    Primary_conference text
)

CREATE TABLE basketball_match (
    Team_ID int,
    School_ID int,
    Team_Name text,
    ACC_Regular_Season text,
    ACC_Percent text,
    ACC_Home text,
    ACC_Road text,
    All_Games text,
    All_Games_Percent int,
    All_Home text,
    All_Road text,
    All_Neutral text
) ### Response: SELECT ACC_Road, School_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road DESC


Instruction: What's the general classification of stage 3 with David Loosli as the mountains classification?

Input:
CREATE TABLE table_59025 (
    "Stage" text,
    "Winner" text,
    "General Classification" text,
    "Mountains Classification" text,
    "Points Classification" text,
    "Sprints classification" text,
    "Team Classification" text
)

Response: SELECT "General Classification" FROM table_59025 WHERE "Mountains Classification" = 'david loosli' AND "Stage" = '3'

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 general classification of stage 3 with David Loosli as the mountains classification? ### Input: CREATE TABLE table_59025 (
    "Stage" text,
    "Winner" text,
    "General Classification" text,
    "Mountains Classification" text,
    "Points Classification" text,
    "Sprints classification" text,
    "Team Classification" text
) ### Response: SELECT "General Classification" FROM table_59025 WHERE "Mountains Classification" = 'david loosli' AND "Stage" = '3'


Instruction: When was Mount Tahoma established?

Input:
CREATE TABLE table_19156 (
    "High School" text,
    "Type" text,
    "Established" real,
    "Enrollment" real,
    "Mascot" text,
    "WIAA Classification" text,
    "Notes" text
)

Response: SELECT MAX("Established") FROM table_19156 WHERE "High School" = 'Mount Tahoma'

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 Mount Tahoma established? ### Input: CREATE TABLE table_19156 (
    "High School" text,
    "Type" text,
    "Established" real,
    "Enrollment" real,
    "Mascot" text,
    "WIAA Classification" text,
    "Notes" text
) ### Response: SELECT MAX("Established") FROM table_19156 WHERE "High School" = 'Mount Tahoma'


Instruction: Who directed episode 266 in the series?

Input:
CREATE TABLE table_2221484_2 (
    directed_by VARCHAR,
    series__number VARCHAR
)

Response: SELECT directed_by FROM table_2221484_2 WHERE series__number = 266

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 directed episode 266 in the series? ### Input: CREATE TABLE table_2221484_2 (
    directed_by VARCHAR,
    series__number VARCHAR
) ### Response: SELECT directed_by FROM table_2221484_2 WHERE series__number = 266


Instruction: When did the Tournament of the Tour Championship take place?

Input:
CREATE TABLE table_name_10 (
    date VARCHAR,
    tournament VARCHAR
)

Response: SELECT date FROM table_name_10 WHERE tournament = "the tour championship"

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 did the Tournament of the Tour Championship take place? ### Input: CREATE TABLE table_name_10 (
    date VARCHAR,
    tournament VARCHAR
) ### Response: SELECT date FROM table_name_10 WHERE tournament = "the tour championship"


Instruction: What province has the largest city of Birjand?

Input:
CREATE TABLE table_48114 (
    "Province" text,
    "Largest city" text,
    "2nd Largest" text,
    "3rd Largest" text,
    "4th largest" text
)

Response: SELECT "Province" FROM table_48114 WHERE "Largest city" = 'birjand'

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 province has the largest city of Birjand? ### Input: CREATE TABLE table_48114 (
    "Province" text,
    "Largest city" text,
    "2nd Largest" text,
    "3rd Largest" text,
    "4th largest" text
) ### Response: SELECT "Province" FROM table_48114 WHERE "Largest city" = 'birjand'


Instruction: Group and count details for the events using a pie chart.

Input:
CREATE TABLE Events (
    Event_ID INTEGER,
    Service_ID INTEGER,
    Event_Details VARCHAR(255)
)

CREATE TABLE Participants_in_Events (
    Event_ID INTEGER,
    Participant_ID INTEGER
)

CREATE TABLE Participants (
    Participant_ID INTEGER,
    Participant_Type_Code CHAR(15),
    Participant_Details VARCHAR(255)
)

CREATE TABLE Services (
    Service_ID INTEGER,
    Service_Type_Code CHAR(15)
)

Response: SELECT Event_Details, COUNT(Event_Details) FROM Events GROUP BY Event_Details

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: Group and count details for the events using a pie chart. ### Input: CREATE TABLE Events (
    Event_ID INTEGER,
    Service_ID INTEGER,
    Event_Details VARCHAR(255)
)

CREATE TABLE Participants_in_Events (
    Event_ID INTEGER,
    Participant_ID INTEGER
)

CREATE TABLE Participants (
    Participant_ID INTEGER,
    Participant_Type_Code CHAR(15),
    Participant_Details VARCHAR(255)
)

CREATE TABLE Services (
    Service_ID INTEGER,
    Service_Type_Code CHAR(15)
) ### Response: SELECT Event_Details, COUNT(Event_Details) FROM Events GROUP BY Event_Details


Instruction: How much Area (km 2) has a Common of collegno, and a Population smaller than 50137?

Input:
CREATE TABLE table_name_60 (
    area__km_2__ VARCHAR,
    common_of VARCHAR,
    population VARCHAR
)

Response: SELECT COUNT(area__km_2__) FROM table_name_60 WHERE common_of = "collegno" AND population < 50137

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 much Area (km 2) has a Common of collegno, and a Population smaller than 50137? ### Input: CREATE TABLE table_name_60 (
    area__km_2__ VARCHAR,
    common_of VARCHAR,
    population VARCHAR
) ### Response: SELECT COUNT(area__km_2__) FROM table_name_60 WHERE common_of = "collegno" AND population < 50137


Instruction: What 7:00 has a 10:00 of dirty sexy money?

Input:
CREATE TABLE table_67978 (
    "7:00" text,
    "7:30" text,
    "8:00" text,
    "8:30" text,
    "9:00" text,
    "9:30" text,
    "10:00" text,
    "10:30" text
)

Response: SELECT "7:00" FROM table_67978 WHERE "10:00" = 'dirty sexy money'

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 7:00 has a 10:00 of dirty sexy money? ### Input: CREATE TABLE table_67978 (
    "7:00" text,
    "7:30" text,
    "8:00" text,
    "8:30" text,
    "9:00" text,
    "9:30" text,
    "10:00" text,
    "10:30" text
) ### Response: SELECT "7:00" FROM table_67978 WHERE "10:00" = 'dirty sexy money'


Instruction: Did I mark all my questions as accepted?.

Input:
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 FlagTypes (
    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 PostTags (
    PostId number,
    TagId number
)

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

CREATE TABLE CloseReasonTypes (
    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 PostNoticeTypes (
    Id number,
    ClassId number,
    Name text,
    Body text,
    IsHidden boolean,
    Predefined boolean,
    PostNoticeDurationId 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 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 ReviewRejectionReasons (
    Id number,
    Name text,
    Description text,
    PostTypeId number
)

CREATE TABLE PostTypes (
    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 PendingFlags (
    Id number,
    FlagTypeId number,
    PostId number,
    CreationDate time,
    CloseReasonTypeId number,
    CloseAsOffTopicReasonTypeId number,
    DuplicateOfQuestionId number,
    BelongsOnBaseHostAddress text
)

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

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

CREATE TABLE ReviewTaskTypes (
    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 Tags (
    Id number,
    TagName text,
    Count number,
    ExcerptPostId number,
    WikiPostId number
)

CREATE TABLE ReviewTaskStates (
    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 PostFeedback (
    Id number,
    PostId number,
    IsAnonymous boolean,
    VoteTypeId number,
    CreationDate time
)

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

Response: SELECT Id AS "post_link", * FROM Posts WHERE PostTypeId = 1 AND AcceptedAnswerId IS NULL AND ClosedDate IS NULL AND AnswerCount > 0 AND OwnerUserId = '##ownerid##'

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: Did I mark all my questions as accepted?. ### Input: 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 FlagTypes (
    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 PostTags (
    PostId number,
    TagId number
)

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

CREATE TABLE CloseReasonTypes (
    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 PostNoticeTypes (
    Id number,
    ClassId number,
    Name text,
    Body text,
    IsHidden boolean,
    Predefined boolean,
    PostNoticeDurationId 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 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 ReviewRejectionReasons (
    Id number,
    Name text,
    Description text,
    PostTypeId number
)

CREATE TABLE PostTypes (
    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 PendingFlags (
    Id number,
    FlagTypeId number,
    PostId number,
    CreationDate time,
    CloseReasonTypeId number,
    CloseAsOffTopicReasonTypeId number,
    DuplicateOfQuestionId number,
    BelongsOnBaseHostAddress text
)

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

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

CREATE TABLE ReviewTaskTypes (
    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 Tags (
    Id number,
    TagName text,
    Count number,
    ExcerptPostId number,
    WikiPostId number
)

CREATE TABLE ReviewTaskStates (
    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 PostFeedback (
    Id number,
    PostId number,
    IsAnonymous boolean,
    VoteTypeId number,
    CreationDate time
)

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
) ### Response: SELECT Id AS "post_link", * FROM Posts WHERE PostTypeId = 1 AND AcceptedAnswerId IS NULL AND ClosedDate IS NULL AND AnswerCount > 0 AND OwnerUserId = '##ownerid##'


Instruction: If the driver is Milka Duno, what is the name of the team?

Input:
CREATE TABLE table_21872 (
    "Fin. Pos" real,
    "Car No." real,
    "Driver" text,
    "Team" text,
    "Laps" real,
    "Time/Retired" text,
    "Grid" real,
    "Laps Led" real,
    "Points" text
)

Response: SELECT "Team" FROM table_21872 WHERE "Driver" = 'Milka Duno'

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: If the driver is Milka Duno, what is the name of the team? ### Input: CREATE TABLE table_21872 (
    "Fin. Pos" real,
    "Car No." real,
    "Driver" text,
    "Team" text,
    "Laps" real,
    "Time/Retired" text,
    "Grid" real,
    "Laps Led" real,
    "Points" text
) ### Response: SELECT "Team" FROM table_21872 WHERE "Driver" = 'Milka Duno'


Instruction: In what place did Dave Barr score?

Input:
CREATE TABLE table_8817 (
    "Place" text,
    "Player" text,
    "Country" text,
    "Score" text,
    "To par" text
)

Response: SELECT "Place" FROM table_8817 WHERE "Player" = 'dave barr'

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 place did Dave Barr score? ### Input: CREATE TABLE table_8817 (
    "Place" text,
    "Player" text,
    "Country" text,
    "Score" text,
    "To par" text
) ### Response: SELECT "Place" FROM table_8817 WHERE "Player" = 'dave barr'


Instruction: What is the average laps for a grid larger than 2, for a ferrari that got in an accident?

Input:
CREATE TABLE table_name_87 (
    laps INTEGER,
    constructor VARCHAR,
    grid VARCHAR,
    time_retired VARCHAR
)

Response: SELECT AVG(laps) FROM table_name_87 WHERE grid > 2 AND time_retired = "accident" AND constructor = "ferrari"

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 laps for a grid larger than 2, for a ferrari that got in an accident? ### Input: CREATE TABLE table_name_87 (
    laps INTEGER,
    constructor VARCHAR,
    grid VARCHAR,
    time_retired VARCHAR
) ### Response: SELECT AVG(laps) FROM table_name_87 WHERE grid > 2 AND time_retired = "accident" AND constructor = "ferrari"


Instruction: how many patients are diagnosed with primary disease copd exacerbation?

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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "COPD EXACERBATION"

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 are diagnosed with primary disease copd exacerbation? ### 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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "COPD EXACERBATION"


Instruction: What Country's Content is TV Locale?

Input:
CREATE TABLE table_40678 (
    "Television service" text,
    "Country" text,
    "Language" text,
    "Content" text,
    "HDTV" text,
    "Package/Option" text
)

Response: SELECT "Country" FROM table_40678 WHERE "Content" = 'tv locale'

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 Country's Content is TV Locale? ### Input: CREATE TABLE table_40678 (
    "Television service" text,
    "Country" text,
    "Language" text,
    "Content" text,
    "HDTV" text,
    "Package/Option" text
) ### Response: SELECT "Country" FROM table_40678 WHERE "Content" = 'tv locale'


Instruction: Who had the high rebounds when the record was 14 7?

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

Response: SELECT "High rebounds" FROM table_29843 WHERE "Record" = '14–7'

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 had the high rebounds when the record was 14 7? ### Input: CREATE TABLE table_29843 (
    "Game" real,
    "Date" text,
    "Team" text,
    "Score" text,
    "High points" text,
    "High rebounds" text,
    "High assists" text,
    "Location Attendance" text,
    "Record" text
) ### Response: SELECT "High rebounds" FROM table_29843 WHERE "Record" = '14–7'


Instruction: Name the money for p draig harrington

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

Response: SELECT "Money ( \u00a3 )" FROM table_68355 WHERE "Player" = 'pádraig harrington'

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 money for p draig harrington ### Input: CREATE TABLE table_68355 (
    "Place" text,
    "Player" text,
    "Country" text,
    "Score" text,
    "To par" text,
    "Money ( \u00a3 )" text
) ### Response: SELECT "Money ( \u00a3 )" FROM table_68355 WHERE "Player" = 'pádraig harrington'


Instruction: Which Date has a Record of 19 16 8?

Input:
CREATE TABLE table_64405 (
    "Date" text,
    "Opponent" text,
    "Score" text,
    "Loss" text,
    "Attendance" real,
    "Record" text,
    "Arena" text,
    "Points" real
)

Response: SELECT "Date" FROM table_64405 WHERE "Record" = '19–16–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 Date has a Record of 19 16 8? ### Input: CREATE TABLE table_64405 (
    "Date" text,
    "Opponent" text,
    "Score" text,
    "Loss" text,
    "Attendance" real,
    "Record" text,
    "Arena" text,
    "Points" real
) ### Response: SELECT "Date" FROM table_64405 WHERE "Record" = '19–16–8'


Instruction: Which Monday Mona/Mani also had a Thursday Thunor/Thor of Tongersdei?

Input:
CREATE TABLE table_66876 (
    "Sunday Sunna/S\u00f3l" text,
    "Monday Mona/ M\u00e1ni" text,
    "Tuesday Tiw/ Tyr" text,
    "Wednesday Woden / Odin" text,
    "Thursday Thunor / Thor" text,
    "Friday Frige or Freya" text,
    "Saturday Saturn" text
)

Response: SELECT "Monday Mona/ M\u00e1ni" FROM table_66876 WHERE "Thursday Thunor / Thor" = 'tongersdei'

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 Monday Mona/Mani also had a Thursday Thunor/Thor of Tongersdei? ### Input: CREATE TABLE table_66876 (
    "Sunday Sunna/S\u00f3l" text,
    "Monday Mona/ M\u00e1ni" text,
    "Tuesday Tiw/ Tyr" text,
    "Wednesday Woden / Odin" text,
    "Thursday Thunor / Thor" text,
    "Friday Frige or Freya" text,
    "Saturday Saturn" text
) ### Response: SELECT "Monday Mona/ M\u00e1ni" FROM table_66876 WHERE "Thursday Thunor / Thor" = 'tongersdei'


Instruction: What's the loss for September 16?

Input:
CREATE TABLE table_79725 (
    "Date" text,
    "Opponent" text,
    "Score" text,
    "Loss" text,
    "Record" text
)

Response: SELECT "Loss" FROM table_79725 WHERE "Date" = 'september 16'

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 loss for September 16? ### Input: CREATE TABLE table_79725 (
    "Date" text,
    "Opponent" text,
    "Score" text,
    "Loss" text,
    "Record" text
) ### Response: SELECT "Loss" FROM table_79725 WHERE "Date" = 'september 16'


Instruction: Name the number of week for game site being memorial stadium for buffalo bills

Input:
CREATE TABLE table_14940519_1 (
    week VARCHAR,
    game_site VARCHAR,
    opponent VARCHAR
)

Response: SELECT COUNT(week) FROM table_14940519_1 WHERE game_site = "Memorial Stadium" AND opponent = "Buffalo Bills"

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 number of week for game site being memorial stadium for buffalo bills ### Input: CREATE TABLE table_14940519_1 (
    week VARCHAR,
    game_site VARCHAR,
    opponent VARCHAR
) ### Response: SELECT COUNT(week) FROM table_14940519_1 WHERE game_site = "Memorial Stadium" AND opponent = "Buffalo Bills"


Instruction: Where did the Vit ria de Set bal club place in the 2006-2007 season?

Input:
CREATE TABLE table_51904 (
    "Club" text,
    "Head Coach" text,
    "City" text,
    "Stadium" text,
    "2006-2007 season" text
)

Response: SELECT "2006-2007 season" FROM table_51904 WHERE "Club" = 'vitória de setúbal'

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 did the Vit ria de Set bal club place in the 2006-2007 season? ### Input: CREATE TABLE table_51904 (
    "Club" text,
    "Head Coach" text,
    "City" text,
    "Stadium" text,
    "2006-2007 season" text
) ### Response: SELECT "2006-2007 season" FROM table_51904 WHERE "Club" = 'vitória de setúbal'


Instruction: How many students does each advisor have. Show scatter chart.

Input:
CREATE TABLE Student (
    StuID INTEGER,
    LName VARCHAR(12),
    Fname VARCHAR(12),
    Age INTEGER,
    Sex VARCHAR(1),
    Major INTEGER,
    Advisor INTEGER,
    city_code VARCHAR(3)
)

CREATE TABLE Has_Allergy (
    StuID INTEGER,
    Allergy VARCHAR(20)
)

CREATE TABLE Allergy_Type (
    Allergy VARCHAR(20),
    AllergyType VARCHAR(20)
)

Response: SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor

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 students does each advisor have. Show scatter chart. ### Input: CREATE TABLE Student (
    StuID INTEGER,
    LName VARCHAR(12),
    Fname VARCHAR(12),
    Age INTEGER,
    Sex VARCHAR(1),
    Major INTEGER,
    Advisor INTEGER,
    city_code VARCHAR(3)
)

CREATE TABLE Has_Allergy (
    StuID INTEGER,
    Allergy VARCHAR(20)
)

CREATE TABLE Allergy_Type (
    Allergy VARCHAR(20),
    AllergyType VARCHAR(20)
) ### Response: SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor


Instruction: tell me the maximum hospital cost if there is a gstr/ddnts nos w hmrhg this year?

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

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

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

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

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

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

CREATE TABLE d_icd_diagnoses (
    row_id number,
    icd9_code text,
    short_title text,
    long_title 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 patients (
    row_id number,
    subject_id number,
    gender text,
    dob time,
    dod time
)

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

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

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

CREATE TABLE d_labitems (
    row_id number,
    itemid number,
    label 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 d_icd_procedures (
    row_id number,
    icd9_code text,
    short_title text,
    long_title text
)

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

Response: SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'gstr/ddnts nos w hmrhg')) AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY cost.hadm_id) AS t1

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 maximum hospital cost if there is a gstr/ddnts nos w hmrhg this year? ### Input: CREATE TABLE outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value number
)

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

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

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

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

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

CREATE TABLE d_icd_diagnoses (
    row_id number,
    icd9_code text,
    short_title text,
    long_title 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 patients (
    row_id number,
    subject_id number,
    gender text,
    dob time,
    dod time
)

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

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

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

CREATE TABLE d_labitems (
    row_id number,
    itemid number,
    label 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 d_icd_procedures (
    row_id number,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE microbiologyevents (
    row_id number,
    subject_id number,
    hadm_id number,
    charttime time,
    spec_type_desc text,
    org_name text
) ### Response: SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'gstr/ddnts nos w hmrhg')) AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY cost.hadm_id) AS t1


Instruction: Name the birth of the person married 24 may 1935

Input:
CREATE TABLE table_68311 (
    "Name" text,
    "Birth" text,
    "Marriage" text,
    "Became Consort" text,
    "Ceased to be Consort" text,
    "Spouse" text
)

Response: SELECT "Birth" FROM table_68311 WHERE "Marriage" = '24 may 1935'

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 birth of the person married 24 may 1935 ### Input: CREATE TABLE table_68311 (
    "Name" text,
    "Birth" text,
    "Marriage" text,
    "Became Consort" text,
    "Ceased to be Consort" text,
    "Spouse" text
) ### Response: SELECT "Birth" FROM table_68311 WHERE "Marriage" = '24 may 1935'


Instruction: How many attended during the game with a score of 80-94?

Input:
CREATE TABLE table_name_52 (
    attendance INTEGER,
    score VARCHAR
)

Response: SELECT SUM(attendance) FROM table_name_52 WHERE score = "80-94"

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 attended during the game with a score of 80-94? ### Input: CREATE TABLE table_name_52 (
    attendance INTEGER,
    score VARCHAR
) ### Response: SELECT SUM(attendance) FROM table_name_52 WHERE score = "80-94"


Instruction: Draw a bar chart of asset make versus the number of asset make, and display in asc by the X.

Input:
CREATE TABLE Asset_Parts (
    asset_id INTEGER,
    part_id INTEGER
)

CREATE TABLE Skills (
    skill_id INTEGER,
    skill_code VARCHAR(20),
    skill_description VARCHAR(255)
)

CREATE TABLE Fault_Log_Parts (
    fault_log_entry_id INTEGER,
    part_fault_id INTEGER,
    fault_status VARCHAR(10)
)

CREATE TABLE Staff (
    staff_id INTEGER,
    staff_name VARCHAR(255),
    gender VARCHAR(1),
    other_staff_details VARCHAR(255)
)

CREATE TABLE Maintenance_Engineers (
    engineer_id INTEGER,
    company_id INTEGER,
    first_name VARCHAR(50),
    last_name VARCHAR(50),
    other_details VARCHAR(255)
)

CREATE TABLE Third_Party_Companies (
    company_id INTEGER,
    company_type VARCHAR(5),
    company_name VARCHAR(255),
    company_address VARCHAR(255),
    other_company_details VARCHAR(255)
)

CREATE TABLE Fault_Log (
    fault_log_entry_id INTEGER,
    asset_id INTEGER,
    recorded_by_staff_id INTEGER,
    fault_log_entry_datetime DATETIME,
    fault_description VARCHAR(255),
    other_fault_details VARCHAR(255)
)

CREATE TABLE Parts (
    part_id INTEGER,
    part_name VARCHAR(255),
    chargeable_yn VARCHAR(1),
    chargeable_amount VARCHAR(20),
    other_part_details VARCHAR(255)
)

CREATE TABLE Part_Faults (
    part_fault_id INTEGER,
    part_id INTEGER,
    fault_short_name VARCHAR(20),
    fault_description VARCHAR(255),
    other_fault_details VARCHAR(255)
)

CREATE TABLE Engineer_Visits (
    engineer_visit_id INTEGER,
    contact_staff_id INTEGER,
    engineer_id INTEGER,
    fault_log_entry_id INTEGER,
    fault_status VARCHAR(10),
    visit_start_datetime DATETIME,
    visit_end_datetime DATETIME,
    other_visit_details VARCHAR(255)
)

CREATE TABLE Engineer_Skills (
    engineer_id INTEGER,
    skill_id INTEGER
)

CREATE TABLE Assets (
    asset_id INTEGER,
    maintenance_contract_id INTEGER,
    supplier_company_id INTEGER,
    asset_details VARCHAR(255),
    asset_make VARCHAR(20),
    asset_model VARCHAR(20),
    asset_acquired_date DATETIME,
    asset_disposed_date DATETIME,
    other_asset_details VARCHAR(255)
)

CREATE TABLE Maintenance_Contracts (
    maintenance_contract_id INTEGER,
    maintenance_contract_company_id INTEGER,
    contract_start_date DATETIME,
    contract_end_date DATETIME,
    other_contract_details VARCHAR(255)
)

CREATE TABLE Skills_Required_To_Fix (
    part_fault_id INTEGER,
    skill_id INTEGER
)

Response: SELECT asset_make, COUNT(asset_make) FROM Assets GROUP BY asset_make ORDER BY asset_make

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: Draw a bar chart of asset make versus the number of asset make, and display in asc by the X. ### Input: CREATE TABLE Asset_Parts (
    asset_id INTEGER,
    part_id INTEGER
)

CREATE TABLE Skills (
    skill_id INTEGER,
    skill_code VARCHAR(20),
    skill_description VARCHAR(255)
)

CREATE TABLE Fault_Log_Parts (
    fault_log_entry_id INTEGER,
    part_fault_id INTEGER,
    fault_status VARCHAR(10)
)

CREATE TABLE Staff (
    staff_id INTEGER,
    staff_name VARCHAR(255),
    gender VARCHAR(1),
    other_staff_details VARCHAR(255)
)

CREATE TABLE Maintenance_Engineers (
    engineer_id INTEGER,
    company_id INTEGER,
    first_name VARCHAR(50),
    last_name VARCHAR(50),
    other_details VARCHAR(255)
)

CREATE TABLE Third_Party_Companies (
    company_id INTEGER,
    company_type VARCHAR(5),
    company_name VARCHAR(255),
    company_address VARCHAR(255),
    other_company_details VARCHAR(255)
)

CREATE TABLE Fault_Log (
    fault_log_entry_id INTEGER,
    asset_id INTEGER,
    recorded_by_staff_id INTEGER,
    fault_log_entry_datetime DATETIME,
    fault_description VARCHAR(255),
    other_fault_details VARCHAR(255)
)

CREATE TABLE Parts (
    part_id INTEGER,
    part_name VARCHAR(255),
    chargeable_yn VARCHAR(1),
    chargeable_amount VARCHAR(20),
    other_part_details VARCHAR(255)
)

CREATE TABLE Part_Faults (
    part_fault_id INTEGER,
    part_id INTEGER,
    fault_short_name VARCHAR(20),
    fault_description VARCHAR(255),
    other_fault_details VARCHAR(255)
)

CREATE TABLE Engineer_Visits (
    engineer_visit_id INTEGER,
    contact_staff_id INTEGER,
    engineer_id INTEGER,
    fault_log_entry_id INTEGER,
    fault_status VARCHAR(10),
    visit_start_datetime DATETIME,
    visit_end_datetime DATETIME,
    other_visit_details VARCHAR(255)
)

CREATE TABLE Engineer_Skills (
    engineer_id INTEGER,
    skill_id INTEGER
)

CREATE TABLE Assets (
    asset_id INTEGER,
    maintenance_contract_id INTEGER,
    supplier_company_id INTEGER,
    asset_details VARCHAR(255),
    asset_make VARCHAR(20),
    asset_model VARCHAR(20),
    asset_acquired_date DATETIME,
    asset_disposed_date DATETIME,
    other_asset_details VARCHAR(255)
)

CREATE TABLE Maintenance_Contracts (
    maintenance_contract_id INTEGER,
    maintenance_contract_company_id INTEGER,
    contract_start_date DATETIME,
    contract_end_date DATETIME,
    other_contract_details VARCHAR(255)
)

CREATE TABLE Skills_Required_To_Fix (
    part_fault_id INTEGER,
    skill_id INTEGER
) ### Response: SELECT asset_make, COUNT(asset_make) FROM Assets GROUP BY asset_make ORDER BY asset_make


Instruction: How many cop apps in the season with fewer than 12 league apps?

Input:
CREATE TABLE table_32374 (
    "Season" text,
    "Team" text,
    "League Apps" real,
    "League Goals" real,
    "Cup Apps" real,
    "Cup Goals" real
)

Response: SELECT SUM("Cup Apps") FROM table_32374 WHERE "League Apps" < '12'

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 cop apps in the season with fewer than 12 league apps? ### Input: CREATE TABLE table_32374 (
    "Season" text,
    "Team" text,
    "League Apps" real,
    "League Goals" real,
    "Cup Apps" real,
    "Cup Goals" real
) ### Response: SELECT SUM("Cup Apps") FROM table_32374 WHERE "League Apps" < '12'


Instruction: What competition has the club villareal?

Input:
CREATE TABLE table_name_89 (
    competition VARCHAR,
    club VARCHAR
)

Response: SELECT competition FROM table_name_89 WHERE club = "villareal"

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 competition has the club villareal? ### Input: CREATE TABLE table_name_89 (
    competition VARCHAR,
    club VARCHAR
) ### Response: SELECT competition FROM table_name_89 WHERE club = "villareal"


Instruction: when was joe clark first elected ?

Input:
CREATE TABLE table_203_214 (
    id number,
    "member" text,
    "party" text,
    "electorate" text,
    "state" text,
    "first elected" text
)

Response: SELECT "first elected" FROM table_203_214 WHERE "member" = 'joe clark'

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 joe clark first elected ? ### Input: CREATE TABLE table_203_214 (
    id number,
    "member" text,
    "party" text,
    "electorate" text,
    "state" text,
    "first elected" text
) ### Response: SELECT "first elected" FROM table_203_214 WHERE "member" = 'joe clark'


Instruction: Bar graph to show how many nationality from different nationality, list in desc by the total number.

Input:
CREATE TABLE mission (
    Mission_ID int,
    Ship_ID int,
    Code text,
    Launched_Year int,
    Location text,
    Speed_knots int,
    Fate text
)

CREATE TABLE ship (
    Ship_ID int,
    Name text,
    Type text,
    Nationality text,
    Tonnage int
)

Response: SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Nationality ORDER BY COUNT(Nationality) 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: Bar graph to show how many nationality from different nationality, list in desc by the total number. ### Input: CREATE TABLE mission (
    Mission_ID int,
    Ship_ID int,
    Code text,
    Launched_Year int,
    Location text,
    Speed_knots int,
    Fate text
)

CREATE TABLE ship (
    Ship_ID int,
    Name text,
    Type text,
    Nationality text,
    Tonnage int
) ### Response: SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Nationality ORDER BY COUNT(Nationality) DESC