Instruction:
Questions Using Popular Tags In January 2019. Questions Using Popular Tags In January 2019
Tags with rate of use over 4 times on this site.

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

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

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

CREATE TABLE SuggestedEditVotes (
    Id number,
    SuggestedEditId number,
    UserId number,
    VoteTypeId number,
    CreationDate time,
    TargetUserId number,
    TargetRepChange 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 SuggestedEdits (
    Id number,
    PostId number,
    CreationDate time,
    ApprovalDate time,
    RejectionDate time,
    OwnerUserId number,
    Comment text,
    Text text,
    Title text,
    Tags text,
    RevisionGUID other
)

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

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

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

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

CREATE TABLE PostTypes (
    Id number,
    Name text
)

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

Response: SELECT Id AS "post_link", Id, CreationDate, AnswerCount, CommentCount, rate.TagId FROM Posts, PostTags, (SELECT COUNT(PostId) AS Rate, TagId FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AND Posts.CreationDate < '2019-03-01' AND Posts.CreationDate > '2019-01-01' GROUP BY TagId, TagName HAVING COUNT(PostId) > 4) AS rate WHERE rate.TagId = PostTags.TagId AND Posts.Id = PostId AND CreationDate > '2019-01-01' AND CreationDate < '2019-01-03' AND DeletionDate IS NULL AND AnswerCount > 0 AND CommentCount > 0

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Questions Using Popular Tags In January 2019. Questions Using Popular Tags In January 2019
Tags with rate of use over 4 times on this site. ### Input: CREATE TABLE PostHistory (
    Id number,
    PostHistoryTypeId number,
    PostId number,
    RevisionGUID other,
    CreationDate time,
    UserId number,
    UserDisplayName text,
    Comment text,
    Text text,
    ContentLicense text
)

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

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

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

CREATE TABLE SuggestedEditVotes (
    Id number,
    SuggestedEditId number,
    UserId number,
    VoteTypeId number,
    CreationDate time,
    TargetUserId number,
    TargetRepChange 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 SuggestedEdits (
    Id number,
    PostId number,
    CreationDate time,
    ApprovalDate time,
    RejectionDate time,
    OwnerUserId number,
    Comment text,
    Text text,
    Title text,
    Tags text,
    RevisionGUID other
)

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

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

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

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

CREATE TABLE PostTypes (
    Id number,
    Name text
)

CREATE TABLE ReviewTaskResultTypes (
    Id number,
    Name text,
    Description text
) ### Response: SELECT Id AS "post_link", Id, CreationDate, AnswerCount, CommentCount, rate.TagId FROM Posts, PostTags, (SELECT COUNT(PostId) AS Rate, TagId FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AND Posts.CreationDate < '2019-03-01' AND Posts.CreationDate > '2019-01-01' GROUP BY TagId, TagName HAVING COUNT(PostId) > 4) AS rate WHERE rate.TagId = PostTags.TagId AND Posts.Id = PostId AND CreationDate > '2019-01-01' AND CreationDate < '2019-01-03' AND DeletionDate IS NULL AND AnswerCount > 0 AND CommentCount > 0


Instruction: In what place is the player with a score of 72-66-75=213?

Input:
CREATE TABLE table_name_13 (
    place VARCHAR,
    score VARCHAR
)

Response: SELECT place FROM table_name_13 WHERE score = 72 - 66 - 75 = 213

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 is the player with a score of 72-66-75=213? ### Input: CREATE TABLE table_name_13 (
    place VARCHAR,
    score VARCHAR
) ### Response: SELECT place FROM table_name_13 WHERE score = 72 - 66 - 75 = 213


Instruction: What is the location attendance of the game with a 27-22 record?

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

Response: SELECT "Location Attendance" FROM table_38827 WHERE "Record" = '27-22'

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 location attendance of the game with a 27-22 record? ### Input: CREATE TABLE table_38827 (
    "Game" real,
    "Date" text,
    "Team" text,
    "Score" text,
    "High points" text,
    "High rebounds" text,
    "High assists" text,
    "Location Attendance" text,
    "Record" text
) ### Response: SELECT "Location Attendance" FROM table_38827 WHERE "Record" = '27-22'


Instruction: how many patients are admitted under urgency and followed the procedure colonoscopy?

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 diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.short_title = "Colonoscopy"

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 admitted under urgency and followed the procedure colonoscopy? ### 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 diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.short_title = "Colonoscopy"


Instruction: What is the amount of assists for richmond kickers and points larger than 24

Input:
CREATE TABLE table_name_32 (
    assists INTEGER,
    club VARCHAR,
    points VARCHAR
)

Response: SELECT SUM(assists) FROM table_name_32 WHERE club = "richmond kickers" AND points > 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: What is the amount of assists for richmond kickers and points larger than 24 ### Input: CREATE TABLE table_name_32 (
    assists INTEGER,
    club VARCHAR,
    points VARCHAR
) ### Response: SELECT SUM(assists) FROM table_name_32 WHERE club = "richmond kickers" AND points > 24


Instruction: what was the four most often given procedures for patients 40s?

Input:
CREATE TABLE vitalperiodic (
    vitalperiodicid number,
    patientunitstayid number,
    temperature number,
    sao2 number,
    heartrate number,
    respiration number,
    systemicsystolic number,
    systemicdiastolic number,
    systemicmean number,
    observationtime time
)

CREATE TABLE patient (
    uniquepid text,
    patienthealthsystemstayid number,
    patientunitstayid number,
    gender text,
    age text,
    ethnicity text,
    hospitalid number,
    wardid number,
    admissionheight number,
    admissionweight number,
    dischargeweight number,
    hospitaladmittime time,
    hospitaladmitsource text,
    unitadmittime time,
    unitdischargetime time,
    hospitaldischargetime time,
    hospitaldischargestatus text
)

CREATE TABLE intakeoutput (
    intakeoutputid number,
    patientunitstayid number,
    cellpath text,
    celllabel text,
    cellvaluenumeric number,
    intakeoutputtime time
)

CREATE TABLE treatment (
    treatmentid number,
    patientunitstayid number,
    treatmentname text,
    treatmenttime time
)

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

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

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

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

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

CREATE TABLE medication (
    medicationid number,
    patientunitstayid number,
    drugname text,
    dosage text,
    routeadmin text,
    drugstarttime time,
    drugstoptime time
)

Response: SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 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 was the four most often given procedures for patients 40s? ### Input: CREATE TABLE vitalperiodic (
    vitalperiodicid number,
    patientunitstayid number,
    temperature number,
    sao2 number,
    heartrate number,
    respiration number,
    systemicsystolic number,
    systemicdiastolic number,
    systemicmean number,
    observationtime time
)

CREATE TABLE patient (
    uniquepid text,
    patienthealthsystemstayid number,
    patientunitstayid number,
    gender text,
    age text,
    ethnicity text,
    hospitalid number,
    wardid number,
    admissionheight number,
    admissionweight number,
    dischargeweight number,
    hospitaladmittime time,
    hospitaladmitsource text,
    unitadmittime time,
    unitdischargetime time,
    hospitaldischargetime time,
    hospitaldischargestatus text
)

CREATE TABLE intakeoutput (
    intakeoutputid number,
    patientunitstayid number,
    cellpath text,
    celllabel text,
    cellvaluenumeric number,
    intakeoutputtime time
)

CREATE TABLE treatment (
    treatmentid number,
    patientunitstayid number,
    treatmentname text,
    treatmenttime time
)

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

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

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

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

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

CREATE TABLE medication (
    medicationid number,
    patientunitstayid number,
    drugname text,
    dosage text,
    routeadmin text,
    drugstarttime time,
    drugstoptime time
) ### Response: SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 4


Instruction: Who was the Republican when the green was Harold Burbank?

Input:
CREATE TABLE table_name_27 (
    republican VARCHAR,
    green VARCHAR
)

Response: SELECT republican FROM table_name_27 WHERE green = "harold burbank"

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 was the Republican when the green was Harold Burbank? ### Input: CREATE TABLE table_name_27 (
    republican VARCHAR,
    green VARCHAR
) ### Response: SELECT republican FROM table_name_27 WHERE green = "harold burbank"


Instruction: How big (in km2) is Persarmenia?

Input:
CREATE TABLE table_26375 (
    "Province (ashkharh)" text,
    "Armenian name" text,
    "Area (km\u00b2)" real,
    "Number of cantons (gavars)" real,
    "Center" text
)

Response: SELECT "Area (km\u00b2)" FROM table_26375 WHERE "Province (ashkharh)" = 'Persarmenia'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How big (in km2) is Persarmenia? ### Input: CREATE TABLE table_26375 (
    "Province (ashkharh)" text,
    "Armenian name" text,
    "Area (km\u00b2)" real,
    "Number of cantons (gavars)" real,
    "Center" text
) ### Response: SELECT "Area (km\u00b2)" FROM table_26375 WHERE "Province (ashkharh)" = 'Persarmenia'


Instruction: What is the score March 27?

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

Response: SELECT score FROM table_name_55 WHERE date = "march 27"

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 score March 27? ### Input: CREATE TABLE table_name_55 (
    score VARCHAR,
    date VARCHAR
) ### Response: SELECT score FROM table_name_55 WHERE date = "march 27"


Instruction: Top 10 Meta users from Nigeria.

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

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

Response: SELECT * FROM Users WHERE Location LIKE '%Nigeria' ORDER BY Reputation DESC LIMIT 10

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Top 10 Meta users from Nigeria. ### 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 PostTypes (
    Id number,
    Name text
)

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

CREATE TABLE ReviewTaskResults (
    Id number,
    ReviewTaskId number,
    ReviewTaskResultTypeId number,
    CreationDate time,
    RejectionReasonId number,
    Comment text
) ### Response: SELECT * FROM Users WHERE Location LIKE '%Nigeria' ORDER BY Reputation DESC LIMIT 10


Instruction: How many pints does the Cambrian Welfare RFC have?

Input:
CREATE TABLE table_name_50 (
    points_for VARCHAR,
    club VARCHAR
)

Response: SELECT points_for FROM table_name_50 WHERE club = "cambrian welfare rfc"

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 pints does the Cambrian Welfare RFC have? ### Input: CREATE TABLE table_name_50 (
    points_for VARCHAR,
    club VARCHAR
) ### Response: SELECT points_for FROM table_name_50 WHERE club = "cambrian welfare rfc"


Instruction: What kind of Sanskrit has a Kannada of uttara ?

Input:
CREATE TABLE table_35105 (
    "Sanskrit \u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d" text,
    "Tamil \u0ba4\u0bae\u0bbf\u0bb4\u0bcd" text,
    "Telugu \u0c24\u0c46\u0c32\u0c41\u0c17\u0c41" text,
    "Kannada \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" text,
    "Malayalam \u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02" text,
    "Mongolian" text
)

Response: SELECT "Sanskrit \u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d" FROM table_35105 WHERE "Kannada \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" = 'uttara ಉತ್ತರಾ'

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 kind of Sanskrit has a Kannada of uttara ? ### Input: CREATE TABLE table_35105 (
    "Sanskrit \u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d" text,
    "Tamil \u0ba4\u0bae\u0bbf\u0bb4\u0bcd" text,
    "Telugu \u0c24\u0c46\u0c32\u0c41\u0c17\u0c41" text,
    "Kannada \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" text,
    "Malayalam \u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02" text,
    "Mongolian" text
) ### Response: SELECT "Sanskrit \u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d" FROM table_35105 WHERE "Kannada \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" = 'uttara ಉತ್ತರಾ'


Instruction: How is the marriage of who became queen on 30 October 1816 husband's accession?

Input:
CREATE TABLE table_6115 (
    "Name" text,
    "Birth" text,
    "Marriage" text,
    "Became Queen" text,
    "Ceased to be Queen" text,
    "Death" text,
    "Spouse" text
)

Response: SELECT "Marriage" FROM table_6115 WHERE "Became Queen" = '30 october 1816 husband''s accession'

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 is the marriage of who became queen on 30 October 1816 husband's accession? ### Input: CREATE TABLE table_6115 (
    "Name" text,
    "Birth" text,
    "Marriage" text,
    "Became Queen" text,
    "Ceased to be Queen" text,
    "Death" text,
    "Spouse" text
) ### Response: SELECT "Marriage" FROM table_6115 WHERE "Became Queen" = '30 october 1816 husband''s accession'


Instruction: How many customers live in Prague city?

Input:
CREATE TABLE media_types (
    id number,
    name text
)

CREATE TABLE employees (
    id number,
    last_name text,
    first_name text,
    title text,
    reports_to number,
    birth_date time,
    hire_date time,
    address text,
    city text,
    state text,
    country text,
    postal_code text,
    phone text,
    fax text,
    email text
)

CREATE TABLE invoices (
    id number,
    customer_id number,
    invoice_date time,
    billing_address text,
    billing_city text,
    billing_state text,
    billing_country text,
    billing_postal_code text,
    total number
)

CREATE TABLE genres (
    id number,
    name text
)

CREATE TABLE invoice_lines (
    id number,
    invoice_id number,
    track_id number,
    unit_price number,
    quantity number
)

CREATE TABLE artists (
    id number,
    name text
)

CREATE TABLE sqlite_sequence (
    name text,
    seq text
)

CREATE TABLE tracks (
    id number,
    name text,
    album_id number,
    media_type_id number,
    genre_id number,
    composer text,
    milliseconds number,
    bytes number,
    unit_price number
)

CREATE TABLE customers (
    id number,
    first_name text,
    last_name text,
    company text,
    address text,
    city text,
    state text,
    country text,
    postal_code text,
    phone text,
    fax text,
    email text,
    support_rep_id number
)

CREATE TABLE playlist_tracks (
    playlist_id number,
    track_id number
)

CREATE TABLE playlists (
    id number,
    name text
)

CREATE TABLE albums (
    id number,
    title text,
    artist_id number
)

Response: SELECT COUNT(*) FROM customers WHERE city = "Prague"

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 customers live in Prague city? ### Input: CREATE TABLE media_types (
    id number,
    name text
)

CREATE TABLE employees (
    id number,
    last_name text,
    first_name text,
    title text,
    reports_to number,
    birth_date time,
    hire_date time,
    address text,
    city text,
    state text,
    country text,
    postal_code text,
    phone text,
    fax text,
    email text
)

CREATE TABLE invoices (
    id number,
    customer_id number,
    invoice_date time,
    billing_address text,
    billing_city text,
    billing_state text,
    billing_country text,
    billing_postal_code text,
    total number
)

CREATE TABLE genres (
    id number,
    name text
)

CREATE TABLE invoice_lines (
    id number,
    invoice_id number,
    track_id number,
    unit_price number,
    quantity number
)

CREATE TABLE artists (
    id number,
    name text
)

CREATE TABLE sqlite_sequence (
    name text,
    seq text
)

CREATE TABLE tracks (
    id number,
    name text,
    album_id number,
    media_type_id number,
    genre_id number,
    composer text,
    milliseconds number,
    bytes number,
    unit_price number
)

CREATE TABLE customers (
    id number,
    first_name text,
    last_name text,
    company text,
    address text,
    city text,
    state text,
    country text,
    postal_code text,
    phone text,
    fax text,
    email text,
    support_rep_id number
)

CREATE TABLE playlist_tracks (
    playlist_id number,
    track_id number
)

CREATE TABLE playlists (
    id number,
    name text
)

CREATE TABLE albums (
    id number,
    title text,
    artist_id number
) ### Response: SELECT COUNT(*) FROM customers WHERE city = "Prague"


Instruction: What was the rating/share for 18-49 for the episode that had 5.90 million viewers?

Input:
CREATE TABLE table_23730973_5 (
    rating VARCHAR,
    viewers__millions_ VARCHAR
)

Response: SELECT rating / SHARE(18 - 49) FROM table_23730973_5 WHERE viewers__millions_ = "5.90"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the rating/share for 18-49 for the episode that had 5.90 million viewers? ### Input: CREATE TABLE table_23730973_5 (
    rating VARCHAR,
    viewers__millions_ VARCHAR
) ### Response: SELECT rating / SHARE(18 - 49) FROM table_23730973_5 WHERE viewers__millions_ = "5.90"


Instruction: Return a bar chart on what are the different ship flags, and how many ships have each?, list by the Y-axis in descending.

Input:
CREATE TABLE captain (
    Captain_ID int,
    Name text,
    Ship_ID int,
    age text,
    Class text,
    Rank text
)

CREATE TABLE Ship (
    Ship_ID int,
    Name text,
    Type text,
    Built_Year real,
    Class text,
    Flag text
)

Response: SELECT Flag, COUNT(*) FROM Ship GROUP BY Flag ORDER BY COUNT(*) DESC

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart on what are the different ship flags, and how many ships have each?, list by the Y-axis in descending. ### Input: CREATE TABLE captain (
    Captain_ID int,
    Name text,
    Ship_ID int,
    age text,
    Class text,
    Rank text
)

CREATE TABLE Ship (
    Ship_ID int,
    Name text,
    Type text,
    Built_Year real,
    Class text,
    Flag text
) ### Response: SELECT Flag, COUNT(*) FROM Ship GROUP BY Flag ORDER BY COUNT(*) DESC


Instruction: provide the admission time and marital status of subject id 6983.

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 diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

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

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the admission time and marital status of subject id 6983. ### 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 diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
) ### Response: SELECT demographic.marital_status, demographic.admittime FROM demographic WHERE demographic.subject_id = "6983"


Instruction: Which format has january 21, 2002 as the date?

Input:
CREATE TABLE table_44036 (
    "Region" text,
    "Date" text,
    "Label" text,
    "Format" text,
    "Catalog" text
)

Response: SELECT "Format" FROM table_44036 WHERE "Date" = 'january 21, 2002'

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 format has january 21, 2002 as the date? ### Input: CREATE TABLE table_44036 (
    "Region" text,
    "Date" text,
    "Label" text,
    "Format" text,
    "Catalog" text
) ### Response: SELECT "Format" FROM table_44036 WHERE "Date" = 'january 21, 2002'


Instruction: What is the link of rnaz that predicts an alignment of input?

Input:
CREATE TABLE table_34127 (
    "Name" text,
    "Number of sequences Number of sequences: ." text,
    "Alignment Alignment: predicts an alignment , ." text,
    "Structure Structure: predicts structure , ." text,
    "Link" text
)

Response: SELECT "Link" FROM table_34127 WHERE "Alignment Alignment: predicts an alignment , ." = 'input' AND "Name" = 'rnaz'

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 link of rnaz that predicts an alignment of input? ### Input: CREATE TABLE table_34127 (
    "Name" text,
    "Number of sequences Number of sequences: ." text,
    "Alignment Alignment: predicts an alignment , ." text,
    "Structure Structure: predicts structure , ." text,
    "Link" text
) ### Response: SELECT "Link" FROM table_34127 WHERE "Alignment Alignment: predicts an alignment , ." = 'input' AND "Name" = 'rnaz'


Instruction: What kind of Week 4 has a Week 9 of all housemates?

Input:
CREATE TABLE table_59962 (
    "Week 1" text,
    "Week 2" text,
    "Week 3" text,
    "Week 4" text,
    "Week 5" text,
    "Week 6" text,
    "Week 7" text,
    "Week 8" text,
    "Week 9" text,
    "Week 10 FINAL" text
)

Response: SELECT "Week 4" FROM table_59962 WHERE "Week 9" = 'all housemates'

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 kind of Week 4 has a Week 9 of all housemates? ### Input: CREATE TABLE table_59962 (
    "Week 1" text,
    "Week 2" text,
    "Week 3" text,
    "Week 4" text,
    "Week 5" text,
    "Week 6" text,
    "Week 7" text,
    "Week 8" text,
    "Week 9" text,
    "Week 10 FINAL" text
) ### Response: SELECT "Week 4" FROM table_59962 WHERE "Week 9" = 'all housemates'


Instruction: What was the transfer fee for the player moving in the winter window and ending in a year after 2010?

Input:
CREATE TABLE table_7726 (
    "Nat." text,
    "Name" text,
    "Moving from" text,
    "Type" text,
    "Transfer window" text,
    "Ends" real,
    "Transfer fee" text
)

Response: SELECT "Transfer fee" FROM table_7726 WHERE "Ends" > '2010' AND "Transfer window" = 'winter'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the transfer fee for the player moving in the winter window and ending in a year after 2010? ### Input: CREATE TABLE table_7726 (
    "Nat." text,
    "Name" text,
    "Moving from" text,
    "Type" text,
    "Transfer window" text,
    "Ends" real,
    "Transfer fee" text
) ### Response: SELECT "Transfer fee" FROM table_7726 WHERE "Ends" > '2010' AND "Transfer window" = 'winter'


Instruction: Role of narrator, and a Radio Station/Production Company of bbc audiobooks, and a Release/Air Date of 13 november 2008 is what sum of the year?

Input:
CREATE TABLE table_67776 (
    "Year" real,
    "Role" text,
    "Author" text,
    "Radio Station/Production Company" text,
    "Release/Air Date" text
)

Response: SELECT SUM("Year") FROM table_67776 WHERE "Role" = 'narrator' AND "Radio Station/Production Company" = 'bbc audiobooks' AND "Release/Air Date" = '13 november 2008'

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: Role of narrator, and a Radio Station/Production Company of bbc audiobooks, and a Release/Air Date of 13 november 2008 is what sum of the year? ### Input: CREATE TABLE table_67776 (
    "Year" real,
    "Role" text,
    "Author" text,
    "Radio Station/Production Company" text,
    "Release/Air Date" text
) ### Response: SELECT SUM("Year") FROM table_67776 WHERE "Role" = 'narrator' AND "Radio Station/Production Company" = 'bbc audiobooks' AND "Release/Air Date" = '13 november 2008'


Instruction: Show team id vs acc_percent as scatter plot use a different color for each All_Games

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

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

Response: SELECT Team_ID, ACC_Percent FROM basketball_match GROUP BY All_Games

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 team id vs acc_percent as scatter plot use a different color for each All_Games ### Input: CREATE TABLE basketball_match (
    Team_ID int,
    School_ID int,
    Team_Name text,
    ACC_Regular_Season text,
    ACC_Percent text,
    ACC_Home text,
    ACC_Road text,
    All_Games text,
    All_Games_Percent int,
    All_Home text,
    All_Road text,
    All_Neutral text
)

CREATE TABLE university (
    School_ID int,
    School text,
    Location text,
    Founded real,
    Affiliation text,
    Enrollment real,
    Nickname text,
    Primary_conference text
) ### Response: SELECT Team_ID, ACC_Percent FROM basketball_match GROUP BY All_Games


Instruction: what is the number of delegates younger than 20 ?

Input:
CREATE TABLE table_204_20 (
    id number,
    "represent" text,
    "contestant" text,
    "age" number,
    "height" text,
    "hometown" text
)

Response: SELECT COUNT("contestant") FROM table_204_20 WHERE "age" < 20

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 delegates younger than 20 ? ### Input: CREATE TABLE table_204_20 (
    id number,
    "represent" text,
    "contestant" text,
    "age" number,
    "height" text,
    "hometown" text
) ### Response: SELECT COUNT("contestant") FROM table_204_20 WHERE "age" < 20


Instruction: Which Team has a Qualification of entry to the 2004 chinese super league, and a 2002 Position smaller than 6, and a 2003 Position smaller than 9, and a Total Position larger than 3.5?

Input:
CREATE TABLE table_65384 (
    "Team" text,
    "2002 Position" real,
    "2003 Position" real,
    "Total Position" real,
    "Qualification" text
)

Response: SELECT "Team" FROM table_65384 WHERE "Qualification" = 'entry to the 2004 chinese super league' AND "2002 Position" < '6' AND "2003 Position" < '9' AND "Total Position" > '3.5'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Team has a Qualification of entry to the 2004 chinese super league, and a 2002 Position smaller than 6, and a 2003 Position smaller than 9, and a Total Position larger than 3.5? ### Input: CREATE TABLE table_65384 (
    "Team" text,
    "2002 Position" real,
    "2003 Position" real,
    "Total Position" real,
    "Qualification" text
) ### Response: SELECT "Team" FROM table_65384 WHERE "Qualification" = 'entry to the 2004 chinese super league' AND "2002 Position" < '6' AND "2003 Position" < '9' AND "Total Position" > '3.5'


Instruction: current plasma creatinine >= 0.5 mg / dl

Input:
CREATE TABLE table_train_111 (
    "id" int,
    "mini_mental_state_examination_mmse" int,
    "liver_disease" bool,
    "geriatric_depression_scale_gds" int,
    "rosen_modified_hachinski_ischemic_score" int,
    "plasma_creatinine" float,
    "NOUSE" float
)

Response: SELECT * FROM table_train_111 WHERE plasma_creatinine >= 0.5

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: current plasma creatinine >= 0.5 mg / dl ### Input: CREATE TABLE table_train_111 (
    "id" int,
    "mini_mental_state_examination_mmse" int,
    "liver_disease" bool,
    "geriatric_depression_scale_gds" int,
    "rosen_modified_hachinski_ischemic_score" int,
    "plasma_creatinine" float,
    "NOUSE" float
) ### Response: SELECT * FROM table_train_111 WHERE plasma_creatinine >= 0.5


Instruction: count the number of patients whose diagnoses short title is acute uri nos and lab test fluid is ascites?

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

CREATE TABLE 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 demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
)

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Acute uri NOS" AND lab.fluid = "Ascites"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose diagnoses short title is acute uri nos and lab test fluid is ascites? ### Input: CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

CREATE TABLE 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 demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
)

CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Acute uri NOS" AND lab.fluid = "Ascites"


Instruction: Which Winner has a Runner-up of larne, and a Season of 2003 04?

Input:
CREATE TABLE table_name_13 (
    winner VARCHAR,
    runner_up VARCHAR,
    season VARCHAR
)

Response: SELECT winner FROM table_name_13 WHERE runner_up = "larne" AND season = "2003–04"

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 Winner has a Runner-up of larne, and a Season of 2003 04? ### Input: CREATE TABLE table_name_13 (
    winner VARCHAR,
    runner_up VARCHAR,
    season VARCHAR
) ### Response: SELECT winner FROM table_name_13 WHERE runner_up = "larne" AND season = "2003–04"


Instruction: What year was USF founded?

Input:
CREATE TABLE table_262 (
    "University Name" text,
    "Acronym" text,
    "Date founded" real,
    "Website" text,
    "Official registration notes" text
)

Response: SELECT "Date founded" FROM table_262 WHERE "Acronym" = 'USF'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What year was USF founded? ### Input: CREATE TABLE table_262 (
    "University Name" text,
    "Acronym" text,
    "Date founded" real,
    "Website" text,
    "Official registration notes" text
) ### Response: SELECT "Date founded" FROM table_262 WHERE "Acronym" = 'USF'


Instruction: which country/countries has the same number of total metals as thailand ?

Input:
CREATE TABLE table_204_183 (
    id number,
    "rank" number,
    "nation" text,
    "gold" number,
    "silver" number,
    "bronze" number,
    "total" number
)

Response: SELECT "nation" FROM table_204_183 WHERE "nation" <> 'thailand' AND "total" = (SELECT "total" FROM table_204_183 WHERE "nation" = 'thailand')

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 country/countries has the same number of total metals as thailand ? ### Input: CREATE TABLE table_204_183 (
    id number,
    "rank" number,
    "nation" text,
    "gold" number,
    "silver" number,
    "bronze" number,
    "total" number
) ### Response: SELECT "nation" FROM table_204_183 WHERE "nation" <> 'thailand' AND "total" = (SELECT "total" FROM table_204_183 WHERE "nation" = 'thailand')


Instruction: Visualize a scatter chart about the correlation between Credits and DNO .

Input:
CREATE TABLE Minor_in (
    StuID INTEGER,
    DNO INTEGER
)

CREATE TABLE Enrolled_in (
    StuID INTEGER,
    CID VARCHAR(7),
    Grade VARCHAR(2)
)

CREATE TABLE Course (
    CID VARCHAR(7),
    CName VARCHAR(40),
    Credits INTEGER,
    Instructor INTEGER,
    Days VARCHAR(5),
    Hours VARCHAR(11),
    DNO INTEGER
)

CREATE TABLE Faculty (
    FacID INTEGER,
    Lname VARCHAR(15),
    Fname VARCHAR(15),
    Rank VARCHAR(15),
    Sex VARCHAR(1),
    Phone INTEGER,
    Room VARCHAR(5),
    Building VARCHAR(13)
)

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 Member_of (
    FacID INTEGER,
    DNO INTEGER,
    Appt_Type VARCHAR(15)
)

CREATE TABLE Department (
    DNO INTEGER,
    Division VARCHAR(2),
    DName VARCHAR(25),
    Room VARCHAR(5),
    Building VARCHAR(13),
    DPhone INTEGER
)

CREATE TABLE Gradeconversion (
    lettergrade VARCHAR(2),
    gradepoint FLOAT
)

Response: SELECT Credits, DNO FROM Course ORDER BY Credits

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: Visualize a scatter chart about the correlation between Credits and DNO . ### Input: CREATE TABLE Minor_in (
    StuID INTEGER,
    DNO INTEGER
)

CREATE TABLE Enrolled_in (
    StuID INTEGER,
    CID VARCHAR(7),
    Grade VARCHAR(2)
)

CREATE TABLE Course (
    CID VARCHAR(7),
    CName VARCHAR(40),
    Credits INTEGER,
    Instructor INTEGER,
    Days VARCHAR(5),
    Hours VARCHAR(11),
    DNO INTEGER
)

CREATE TABLE Faculty (
    FacID INTEGER,
    Lname VARCHAR(15),
    Fname VARCHAR(15),
    Rank VARCHAR(15),
    Sex VARCHAR(1),
    Phone INTEGER,
    Room VARCHAR(5),
    Building VARCHAR(13)
)

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 Member_of (
    FacID INTEGER,
    DNO INTEGER,
    Appt_Type VARCHAR(15)
)

CREATE TABLE Department (
    DNO INTEGER,
    Division VARCHAR(2),
    DName VARCHAR(25),
    Room VARCHAR(5),
    Building VARCHAR(13),
    DPhone INTEGER
)

CREATE TABLE Gradeconversion (
    lettergrade VARCHAR(2),
    gradepoint FLOAT
) ### Response: SELECT Credits, DNO FROM Course ORDER BY Credits


Instruction: During the week does 588 usually have 2 or 3 lectures ?

Input:
CREATE TABLE program (
    program_id int,
    name varchar,
    college varchar,
    introduction varchar
)

CREATE TABLE comment_instructor (
    instructor_id int,
    student_id int,
    score int,
    comment_text varchar
)

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

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

CREATE TABLE student (
    student_id int,
    lastname varchar,
    firstname varchar,
    program_id int,
    declare_major varchar,
    total_credit int,
    total_gpa float,
    entered_as varchar,
    admit_term int,
    predicted_graduation_semester int,
    degree varchar,
    minor varchar,
    internship varchar
)

CREATE TABLE requirement (
    requirement_id int,
    requirement varchar,
    college varchar
)

CREATE TABLE area (
    course_id int,
    area varchar
)

CREATE TABLE jobs (
    job_id int,
    job_title varchar,
    description varchar,
    requirement varchar,
    city varchar,
    state varchar,
    country varchar,
    zip int
)

CREATE TABLE student_record (
    student_id int,
    course_id int,
    semester int,
    grade varchar,
    how varchar,
    transfer_source varchar,
    earn_credit varchar,
    repeat_term varchar,
    test_id varchar
)

CREATE TABLE course_tags_count (
    course_id int,
    clear_grading int,
    pop_quiz int,
    group_projects int,
    inspirational int,
    long_lectures int,
    extra_credit int,
    few_tests int,
    good_feedback int,
    tough_tests int,
    heavy_papers int,
    cares_for_students int,
    heavy_assignments int,
    respected int,
    participation int,
    heavy_reading int,
    tough_grader int,
    hilarious int,
    would_take_again int,
    good_lecture int,
    no_skip int
)

CREATE TABLE instructor (
    instructor_id int,
    name varchar,
    uniqname varchar
)

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

CREATE TABLE program_course (
    program_id int,
    course_id int,
    workload int,
    category varchar
)

CREATE TABLE course (
    course_id int,
    name varchar,
    department varchar,
    number varchar,
    credits varchar,
    advisory_requirement varchar,
    enforced_requirement varchar,
    description varchar,
    num_semesters int,
    num_enrolled int,
    has_discussion varchar,
    has_lab varchar,
    has_projects varchar,
    has_exams varchar,
    num_reviews int,
    clarity_score int,
    easiness_score int,
    helpfulness_score int
)

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

CREATE TABLE semester (
    semester_id int,
    semester varchar,
    year int
)

CREATE TABLE program_requirement (
    program_id int,
    category varchar,
    min_credit int,
    additional_req varchar
)

CREATE TABLE course_offering (
    offering_id int,
    course_id int,
    semester int,
    section_number int,
    start_time time,
    end_time time,
    monday varchar,
    tuesday varchar,
    wednesday varchar,
    thursday varchar,
    friday varchar,
    saturday varchar,
    sunday varchar,
    has_final_project varchar,
    has_final_exam varchar,
    textbook varchar,
    class_address varchar,
    allow_audit varchar
)

Response: SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday, semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 588 AND semester.semester_id = course_offering.semester ORDER BY semester.semester_id DESC LIMIT 10

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: During the week does 588 usually have 2 or 3 lectures ? ### Input: CREATE TABLE program (
    program_id int,
    name varchar,
    college varchar,
    introduction varchar
)

CREATE TABLE comment_instructor (
    instructor_id int,
    student_id int,
    score int,
    comment_text varchar
)

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

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

CREATE TABLE student (
    student_id int,
    lastname varchar,
    firstname varchar,
    program_id int,
    declare_major varchar,
    total_credit int,
    total_gpa float,
    entered_as varchar,
    admit_term int,
    predicted_graduation_semester int,
    degree varchar,
    minor varchar,
    internship varchar
)

CREATE TABLE requirement (
    requirement_id int,
    requirement varchar,
    college varchar
)

CREATE TABLE area (
    course_id int,
    area varchar
)

CREATE TABLE jobs (
    job_id int,
    job_title varchar,
    description varchar,
    requirement varchar,
    city varchar,
    state varchar,
    country varchar,
    zip int
)

CREATE TABLE student_record (
    student_id int,
    course_id int,
    semester int,
    grade varchar,
    how varchar,
    transfer_source varchar,
    earn_credit varchar,
    repeat_term varchar,
    test_id varchar
)

CREATE TABLE course_tags_count (
    course_id int,
    clear_grading int,
    pop_quiz int,
    group_projects int,
    inspirational int,
    long_lectures int,
    extra_credit int,
    few_tests int,
    good_feedback int,
    tough_tests int,
    heavy_papers int,
    cares_for_students int,
    heavy_assignments int,
    respected int,
    participation int,
    heavy_reading int,
    tough_grader int,
    hilarious int,
    would_take_again int,
    good_lecture int,
    no_skip int
)

CREATE TABLE instructor (
    instructor_id int,
    name varchar,
    uniqname varchar
)

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

CREATE TABLE program_course (
    program_id int,
    course_id int,
    workload int,
    category varchar
)

CREATE TABLE course (
    course_id int,
    name varchar,
    department varchar,
    number varchar,
    credits varchar,
    advisory_requirement varchar,
    enforced_requirement varchar,
    description varchar,
    num_semesters int,
    num_enrolled int,
    has_discussion varchar,
    has_lab varchar,
    has_projects varchar,
    has_exams varchar,
    num_reviews int,
    clarity_score int,
    easiness_score int,
    helpfulness_score int
)

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

CREATE TABLE semester (
    semester_id int,
    semester varchar,
    year int
)

CREATE TABLE program_requirement (
    program_id int,
    category varchar,
    min_credit int,
    additional_req varchar
)

CREATE TABLE course_offering (
    offering_id int,
    course_id int,
    semester int,
    section_number int,
    start_time time,
    end_time time,
    monday varchar,
    tuesday varchar,
    wednesday varchar,
    thursday varchar,
    friday varchar,
    saturday varchar,
    sunday varchar,
    has_final_project varchar,
    has_final_exam varchar,
    textbook varchar,
    class_address varchar,
    allow_audit varchar
) ### Response: SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday, semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 588 AND semester.semester_id = course_offering.semester ORDER BY semester.semester_id DESC LIMIT 10


Instruction: Top 1000 reputation whores in C++ tag.

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

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE PostTypes (
    Id number,
    Name text
)

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

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

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

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

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

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

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

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

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

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

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

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

Response: SELECT Users.Id AS Id, Users.DisplayName AS "user_link", SUM(Answers.Score) * 10 AS Reputation FROM Posts AS Answers INNER JOIN Posts AS Questions ON Questions.Id = Answers.ParentId INNER JOIN Users AS Users ON Answers.OwnerUserId = Users.Id INNER JOIN PostTags ON PostTags.PostId = Answers.ParentId INNER JOIN Tags ON Tags.Id = PostTags.TagId WHERE Answers.PostTypeId = 2 AND (LOWER(Users.Location) LIKE '%spain%' OR LOWER(Users.Location) LIKE '%espa a%') AND NOT Answers.OwnerUserId IS NULL AND Tags.TagName = 'c++' AND (Questions.ClosedDate != '' OR Questions.Score < 0) GROUP BY Users.Id, Users.DisplayName ORDER BY Reputation DESC LIMIT 1000

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: Top 1000 reputation whores in C++ tag. ### Input: 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 ReviewRejectionReasons (
    Id number,
    Name text,
    Description text,
    PostTypeId number
)

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE PostTypes (
    Id number,
    Name text
)

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

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

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

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

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

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

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

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

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

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

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

CREATE TABLE SuggestedEdits (
    Id number,
    PostId number,
    CreationDate time,
    ApprovalDate time,
    RejectionDate time,
    OwnerUserId number,
    Comment text,
    Text text,
    Title text,
    Tags text,
    RevisionGUID other
) ### Response: SELECT Users.Id AS Id, Users.DisplayName AS "user_link", SUM(Answers.Score) * 10 AS Reputation FROM Posts AS Answers INNER JOIN Posts AS Questions ON Questions.Id = Answers.ParentId INNER JOIN Users AS Users ON Answers.OwnerUserId = Users.Id INNER JOIN PostTags ON PostTags.PostId = Answers.ParentId INNER JOIN Tags ON Tags.Id = PostTags.TagId WHERE Answers.PostTypeId = 2 AND (LOWER(Users.Location) LIKE '%spain%' OR LOWER(Users.Location) LIKE '%espa a%') AND NOT Answers.OwnerUserId IS NULL AND Tags.TagName = 'c++' AND (Questions.ClosedDate != '' OR Questions.Score < 0) GROUP BY Users.Id, Users.DisplayName ORDER BY Reputation DESC LIMIT 1000


Instruction: what was the name of the mission previous to cosmos 300 ?

Input:
CREATE TABLE table_204_633 (
    id number,
    "launch date" text,
    "operator" text,
    "name" text,
    "sample origin" text,
    "samples returned" text,
    "recovery date" text,
    "mission result" text
)

Response: SELECT "name" FROM table_204_633 WHERE id = (SELECT id FROM table_204_633 WHERE "name" = 'cosmos 300') - 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: what was the name of the mission previous to cosmos 300 ? ### Input: CREATE TABLE table_204_633 (
    id number,
    "launch date" text,
    "operator" text,
    "name" text,
    "sample origin" text,
    "samples returned" text,
    "recovery date" text,
    "mission result" text
) ### Response: SELECT "name" FROM table_204_633 WHERE id = (SELECT id FROM table_204_633 WHERE "name" = 'cosmos 300') - 1


Instruction: How many grids had a Time/Retired of +4 laps?

Input:
CREATE TABLE table_43494 (
    "Driver" text,
    "Constructor" text,
    "Laps" real,
    "Time/Retired" text,
    "Grid" real
)

Response: SELECT COUNT("Grid") FROM table_43494 WHERE "Time/Retired" = '+4 laps'

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 grids had a Time/Retired of +4 laps? ### Input: CREATE TABLE table_43494 (
    "Driver" text,
    "Constructor" text,
    "Laps" real,
    "Time/Retired" text,
    "Grid" real
) ### Response: SELECT COUNT("Grid") FROM table_43494 WHERE "Time/Retired" = '+4 laps'


Instruction: how many featured guests are there in total ?

Input:
CREATE TABLE table_204_184 (
    id number,
    "#" number,
    "title" text,
    "producer(s)" text,
    "featured guest(s)" text,
    "length" text
)

Response: SELECT COUNT("featured guest(s)") FROM table_204_184

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 featured guests are there in total ? ### Input: CREATE TABLE table_204_184 (
    id number,
    "#" number,
    "title" text,
    "producer(s)" text,
    "featured guest(s)" text,
    "length" text
) ### Response: SELECT COUNT("featured guest(s)") FROM table_204_184


Instruction: In what place did the golfer representing Zimbabwe finish?

Input:
CREATE TABLE table_name_60 (
    place VARCHAR,
    country VARCHAR
)

Response: SELECT place FROM table_name_60 WHERE country = "zimbabwe"

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 the golfer representing Zimbabwe finish? ### Input: CREATE TABLE table_name_60 (
    place VARCHAR,
    country VARCHAR
) ### Response: SELECT place FROM table_name_60 WHERE country = "zimbabwe"


Instruction: How many total songs has the order #1

Input:
CREATE TABLE table_21501518_1 (
    song_choice VARCHAR,
    order__number VARCHAR
)

Response: SELECT COUNT(song_choice) FROM table_21501518_1 WHERE order__number = "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: How many total songs has the order #1 ### Input: CREATE TABLE table_21501518_1 (
    song_choice VARCHAR,
    order__number VARCHAR
) ### Response: SELECT COUNT(song_choice) FROM table_21501518_1 WHERE order__number = "1"


Instruction: In what season was the overall record 29-7?

Input:
CREATE TABLE table_19441 (
    "Season" text,
    "Coach" text,
    "Overall" text,
    "Conference" text,
    "Standing" text,
    "Postseason" text
)

Response: SELECT "Season" FROM table_19441 WHERE "Overall" = '29-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: In what season was the overall record 29-7? ### Input: CREATE TABLE table_19441 (
    "Season" text,
    "Coach" text,
    "Overall" text,
    "Conference" text,
    "Standing" text,
    "Postseason" text
) ### Response: SELECT "Season" FROM table_19441 WHERE "Overall" = '29-7'


Instruction: What is the English title for Ansikte Mot Ansikte?

Input:
CREATE TABLE table_68616 (
    "Year" text,
    "English title" text,
    "Original title" text,
    "Country" text,
    "Director" text
)

Response: SELECT "English title" FROM table_68616 WHERE "Original title" = 'ansikte mot ansikte'

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 English title for Ansikte Mot Ansikte? ### Input: CREATE TABLE table_68616 (
    "Year" text,
    "English title" text,
    "Original title" text,
    "Country" text,
    "Director" text
) ### Response: SELECT "English title" FROM table_68616 WHERE "Original title" = 'ansikte mot ansikte'


Instruction: Which gc37-01 v10 engine has the fewest points?

Input:
CREATE TABLE table_15328 (
    "Year" real,
    "Entrant" text,
    "Chassis" text,
    "Engine" text,
    "Tyres" text,
    "Points" real
)

Response: SELECT MIN("Points") FROM table_15328 WHERE "Engine" = 'gc37-01 v10'

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 gc37-01 v10 engine has the fewest points? ### Input: CREATE TABLE table_15328 (
    "Year" real,
    "Entrant" text,
    "Chassis" text,
    "Engine" text,
    "Tyres" text,
    "Points" real
) ### Response: SELECT MIN("Points") FROM table_15328 WHERE "Engine" = 'gc37-01 v10'


Instruction: how many patients whose admission location is phys referral/normal deli and discharge location is home?

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

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

CREATE TABLE 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 demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
)

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.discharge_location = "HOME"

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 whose admission location is phys referral/normal deli and discharge location is home? ### Input: CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

CREATE TABLE 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 demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.discharge_location = "HOME"


Instruction: How many players played each position Plot them as bar chart, and rank in asc by the y-axis.

Input:
CREATE TABLE team (
    Team_id int,
    Name text
)

CREATE TABLE player (
    Player_ID int,
    Player text,
    Years_Played text,
    Total_WL text,
    Singles_WL text,
    Doubles_WL text,
    Team int
)

CREATE TABLE match_season (
    Season real,
    Player text,
    Position text,
    Country int,
    Team int,
    Draft_Pick_Number int,
    Draft_Class text,
    College text
)

CREATE TABLE country (
    Country_id int,
    Country_name text,
    Capital text,
    Official_native_language text
)

Response: SELECT Position, COUNT(*) FROM match_season GROUP BY Position ORDER BY COUNT(*)

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 players played each position Plot them as bar chart, and rank in asc by the y-axis. ### Input: CREATE TABLE team (
    Team_id int,
    Name text
)

CREATE TABLE player (
    Player_ID int,
    Player text,
    Years_Played text,
    Total_WL text,
    Singles_WL text,
    Doubles_WL text,
    Team int
)

CREATE TABLE match_season (
    Season real,
    Player text,
    Position text,
    Country int,
    Team int,
    Draft_Pick_Number int,
    Draft_Class text,
    College text
)

CREATE TABLE country (
    Country_id int,
    Country_name text,
    Capital text,
    Official_native_language text
) ### Response: SELECT Position, COUNT(*) FROM match_season GROUP BY Position ORDER BY COUNT(*)


Instruction: Which venue has 16 against?

Input:
CREATE TABLE table_name_5 (
    venue VARCHAR,
    against VARCHAR
)

Response: SELECT venue FROM table_name_5 WHERE against = 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: Which venue has 16 against? ### Input: CREATE TABLE table_name_5 (
    venue VARCHAR,
    against VARCHAR
) ### Response: SELECT venue FROM table_name_5 WHERE against = 16


Instruction: What is the pick # when the new jersey devils is the nhl team?

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

Response: SELECT "Pick #" FROM table_30854 WHERE "NHL team" = 'New Jersey Devils'

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 pick # when the new jersey devils is the nhl team? ### Input: CREATE TABLE table_30854 (
    "Pick #" real,
    "Player" text,
    "Position" text,
    "Nationality" text,
    "NHL team" text,
    "College/junior/club team" text
) ### Response: SELECT "Pick #" FROM table_30854 WHERE "NHL team" = 'New Jersey Devils'