Instruction: What is the proportion of each customer's move in date? Show me the bar chart.

Input:
CREATE TABLE Timed_Status_of_Things (
    thing_id INTEGER,
    Date_and_Date DATETIME,
    Status_of_Thing_Code CHAR(15)
)

CREATE TABLE Services (
    service_id INTEGER,
    organization_id INTEGER,
    service_type_code CHAR(15),
    service_details VARCHAR(255)
)

CREATE TABLE Customers (
    customer_id INTEGER,
    customer_details VARCHAR(255)
)

CREATE TABLE Properties (
    property_id INTEGER,
    property_type_code CHAR(15),
    property_address VARCHAR(255),
    other_details VARCHAR(255)
)

CREATE TABLE Residents (
    resident_id INTEGER,
    property_id INTEGER,
    date_moved_in DATETIME,
    date_moved_out DATETIME,
    other_details VARCHAR(255)
)

CREATE TABLE Customer_Events (
    Customer_Event_ID INTEGER,
    customer_id INTEGER,
    date_moved_in DATETIME,
    property_id INTEGER,
    resident_id INTEGER,
    thing_id INTEGER
)

CREATE TABLE Customer_Event_Notes (
    Customer_Event_Note_ID INTEGER,
    Customer_Event_ID INTEGER,
    service_type_code CHAR(15),
    resident_id INTEGER,
    property_id INTEGER,
    date_moved_in DATETIME
)

CREATE TABLE Timed_Locations_of_Things (
    thing_id INTEGER,
    Date_and_Time DATETIME,
    Location_Code CHAR(15)
)

CREATE TABLE Residents_Services (
    resident_id INTEGER,
    service_id INTEGER,
    date_moved_in DATETIME,
    property_id INTEGER,
    date_requested DATETIME,
    date_provided DATETIME,
    other_details VARCHAR(255)
)

CREATE TABLE Things (
    thing_id INTEGER,
    organization_id INTEGER,
    Type_of_Thing_Code CHAR(15),
    service_type_code CHAR(10),
    service_details VARCHAR(255)
)

CREATE TABLE Organizations (
    organization_id INTEGER,
    parent_organization_id INTEGER,
    organization_details VARCHAR(255)
)

Response: SELECT date_moved_in, COUNT(date_moved_in) FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY date_moved_in

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 proportion of each customer's move in date? Show me the bar chart. ### Input: CREATE TABLE Timed_Status_of_Things (
    thing_id INTEGER,
    Date_and_Date DATETIME,
    Status_of_Thing_Code CHAR(15)
)

CREATE TABLE Services (
    service_id INTEGER,
    organization_id INTEGER,
    service_type_code CHAR(15),
    service_details VARCHAR(255)
)

CREATE TABLE Customers (
    customer_id INTEGER,
    customer_details VARCHAR(255)
)

CREATE TABLE Properties (
    property_id INTEGER,
    property_type_code CHAR(15),
    property_address VARCHAR(255),
    other_details VARCHAR(255)
)

CREATE TABLE Residents (
    resident_id INTEGER,
    property_id INTEGER,
    date_moved_in DATETIME,
    date_moved_out DATETIME,
    other_details VARCHAR(255)
)

CREATE TABLE Customer_Events (
    Customer_Event_ID INTEGER,
    customer_id INTEGER,
    date_moved_in DATETIME,
    property_id INTEGER,
    resident_id INTEGER,
    thing_id INTEGER
)

CREATE TABLE Customer_Event_Notes (
    Customer_Event_Note_ID INTEGER,
    Customer_Event_ID INTEGER,
    service_type_code CHAR(15),
    resident_id INTEGER,
    property_id INTEGER,
    date_moved_in DATETIME
)

CREATE TABLE Timed_Locations_of_Things (
    thing_id INTEGER,
    Date_and_Time DATETIME,
    Location_Code CHAR(15)
)

CREATE TABLE Residents_Services (
    resident_id INTEGER,
    service_id INTEGER,
    date_moved_in DATETIME,
    property_id INTEGER,
    date_requested DATETIME,
    date_provided DATETIME,
    other_details VARCHAR(255)
)

CREATE TABLE Things (
    thing_id INTEGER,
    organization_id INTEGER,
    Type_of_Thing_Code CHAR(15),
    service_type_code CHAR(10),
    service_details VARCHAR(255)
)

CREATE TABLE Organizations (
    organization_id INTEGER,
    parent_organization_id INTEGER,
    organization_details VARCHAR(255)
) ### Response: SELECT date_moved_in, COUNT(date_moved_in) FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY date_moved_in


Instruction: Can you draw the trend of sum attendance over the binning year?, show by the X-axis in descending.

Input:
CREATE TABLE team_franchise (
    franchise_id TEXT,
    franchise_name TEXT,
    active TEXT,
    na_assoc TEXT
)

CREATE TABLE manager (
    player_id TEXT,
    year INTEGER,
    team_id TEXT,
    league_id TEXT,
    inseason INTEGER,
    g INTEGER,
    w INTEGER,
    l INTEGER,
    rank NUMERIC,
    plyr_mgr TEXT
)

CREATE TABLE postseason (
    year INTEGER,
    round TEXT,
    team_id_winner TEXT,
    league_id_winner TEXT,
    team_id_loser TEXT,
    league_id_loser TEXT,
    wins INTEGER,
    losses INTEGER,
    ties INTEGER
)

CREATE TABLE salary (
    year INTEGER,
    team_id TEXT,
    league_id TEXT,
    player_id TEXT,
    salary INTEGER
)

CREATE TABLE all_star (
    player_id TEXT,
    year INTEGER,
    game_num INTEGER,
    game_id TEXT,
    team_id TEXT,
    league_id TEXT,
    gp NUMERIC,
    starting_pos NUMERIC
)

CREATE TABLE player_college (
    player_id TEXT,
    college_id TEXT,
    year INTEGER
)

CREATE TABLE fielding_postseason (
    player_id TEXT,
    year INTEGER,
    team_id TEXT,
    league_id TEXT,
    round TEXT,
    pos TEXT,
    g INTEGER,
    gs NUMERIC,
    inn_outs NUMERIC,
    po INTEGER,
    a INTEGER,
    e INTEGER,
    dp INTEGER,
    tp INTEGER,
    pb NUMERIC,
    sb NUMERIC,
    cs NUMERIC
)

CREATE TABLE manager_award (
    player_id TEXT,
    award_id TEXT,
    year INTEGER,
    league_id TEXT,
    tie TEXT,
    notes NUMERIC
)

CREATE TABLE pitching (
    player_id TEXT,
    year INTEGER,
    stint INTEGER,
    team_id TEXT,
    league_id TEXT,
    w INTEGER,
    l INTEGER,
    g INTEGER,
    gs INTEGER,
    cg INTEGER,
    sho INTEGER,
    sv INTEGER,
    ipouts NUMERIC,
    h INTEGER,
    er INTEGER,
    hr INTEGER,
    bb INTEGER,
    so INTEGER,
    baopp NUMERIC,
    era NUMERIC,
    ibb NUMERIC,
    wp NUMERIC,
    hbp NUMERIC,
    bk INTEGER,
    bfp NUMERIC,
    gf NUMERIC,
    r INTEGER,
    sh NUMERIC,
    sf NUMERIC,
    g_idp NUMERIC
)

CREATE TABLE fielding (
    player_id TEXT,
    year INTEGER,
    stint INTEGER,
    team_id TEXT,
    league_id TEXT,
    pos TEXT,
    g INTEGER,
    gs NUMERIC,
    inn_outs NUMERIC,
    po NUMERIC,
    a NUMERIC,
    e NUMERIC,
    dp NUMERIC,
    pb NUMERIC,
    wp NUMERIC,
    sb NUMERIC,
    cs NUMERIC,
    zr NUMERIC
)

CREATE TABLE team (
    year INTEGER,
    league_id TEXT,
    team_id TEXT,
    franchise_id TEXT,
    div_id TEXT,
    rank INTEGER,
    g INTEGER,
    ghome NUMERIC,
    w INTEGER,
    l INTEGER,
    div_win TEXT,
    wc_win TEXT,
    lg_win TEXT,
    ws_win TEXT,
    r INTEGER,
    ab INTEGER,
    h INTEGER,
    double INTEGER,
    triple INTEGER,
    hr INTEGER,
    bb INTEGER,
    so NUMERIC,
    sb NUMERIC,
    cs NUMERIC,
    hbp NUMERIC,
    sf NUMERIC,
    ra INTEGER,
    er INTEGER,
    era NUMERIC,
    cg INTEGER,
    sho INTEGER,
    sv INTEGER,
    ipouts INTEGER,
    ha INTEGER,
    hra INTEGER,
    bba INTEGER,
    soa INTEGER,
    e INTEGER,
    dp NUMERIC,
    fp NUMERIC,
    name TEXT,
    park TEXT,
    attendance NUMERIC,
    bpf INTEGER,
    ppf INTEGER,
    team_id_br TEXT,
    team_id_lahman45 TEXT,
    team_id_retro TEXT
)

CREATE TABLE home_game (
    year INTEGER,
    league_id TEXT,
    team_id TEXT,
    park_id TEXT,
    span_first TEXT,
    span_last TEXT,
    games INTEGER,
    openings INTEGER,
    attendance INTEGER
)

CREATE TABLE fielding_outfield (
    player_id TEXT,
    year INTEGER,
    stint INTEGER,
    glf NUMERIC,
    gcf NUMERIC,
    grf NUMERIC
)

CREATE TABLE manager_award_vote (
    award_id TEXT,
    year INTEGER,
    league_id TEXT,
    player_id TEXT,
    points_won INTEGER,
    points_max INTEGER,
    votes_first INTEGER
)

CREATE TABLE park (
    park_id TEXT,
    park_name TEXT,
    park_alias TEXT,
    city TEXT,
    state TEXT,
    country TEXT
)

CREATE TABLE appearances (
    year INTEGER,
    team_id TEXT,
    league_id TEXT,
    player_id TEXT,
    g_all NUMERIC,
    gs NUMERIC,
    g_batting INTEGER,
    g_defense NUMERIC,
    g_p INTEGER,
    g_c INTEGER,
    g_1b INTEGER,
    g_2b INTEGER,
    g_3b INTEGER,
    g_ss INTEGER,
    g_lf INTEGER,
    g_cf INTEGER,
    g_rf INTEGER,
    g_of INTEGER,
    g_dh NUMERIC,
    g_ph NUMERIC,
    g_pr NUMERIC
)

CREATE TABLE batting_postseason (
    year INTEGER,
    round TEXT,
    player_id TEXT,
    team_id TEXT,
    league_id TEXT,
    g INTEGER,
    ab INTEGER,
    r INTEGER,
    h INTEGER,
    double INTEGER,
    triple INTEGER,
    hr INTEGER,
    rbi INTEGER,
    sb INTEGER,
    cs NUMERIC,
    bb INTEGER,
    so INTEGER,
    ibb NUMERIC,
    hbp NUMERIC,
    sh NUMERIC,
    sf NUMERIC,
    g_idp NUMERIC
)

CREATE TABLE hall_of_fame (
    player_id TEXT,
    yearid INTEGER,
    votedby TEXT,
    ballots NUMERIC,
    needed NUMERIC,
    votes NUMERIC,
    inducted TEXT,
    category TEXT,
    needed_note TEXT
)

CREATE TABLE batting (
    player_id TEXT,
    year INTEGER,
    stint INTEGER,
    team_id TEXT,
    league_id TEXT,
    g INTEGER,
    ab NUMERIC,
    r NUMERIC,
    h NUMERIC,
    double NUMERIC,
    triple NUMERIC,
    hr NUMERIC,
    rbi NUMERIC,
    sb NUMERIC,
    cs NUMERIC,
    bb NUMERIC,
    so NUMERIC,
    ibb NUMERIC,
    hbp NUMERIC,
    sh NUMERIC,
    sf NUMERIC,
    g_idp NUMERIC
)

CREATE TABLE player_award (
    player_id TEXT,
    award_id TEXT,
    year INTEGER,
    league_id TEXT,
    tie TEXT,
    notes TEXT
)

CREATE TABLE player (
    player_id TEXT,
    birth_year NUMERIC,
    birth_month NUMERIC,
    birth_day NUMERIC,
    birth_country TEXT,
    birth_state TEXT,
    birth_city TEXT,
    death_year NUMERIC,
    death_month NUMERIC,
    death_day NUMERIC,
    death_country TEXT,
    death_state TEXT,
    death_city TEXT,
    name_first TEXT,
    name_last TEXT,
    name_given TEXT,
    weight NUMERIC,
    height NUMERIC,
    bats TEXT,
    throws TEXT,
    debut TEXT,
    final_game TEXT,
    retro_id TEXT,
    bbref_id TEXT
)

CREATE TABLE player_award_vote (
    award_id TEXT,
    year INTEGER,
    league_id TEXT,
    player_id TEXT,
    points_won NUMERIC,
    points_max INTEGER,
    votes_first NUMERIC
)

CREATE TABLE team_half (
    year INTEGER,
    league_id TEXT,
    team_id TEXT,
    half INTEGER,
    div_id TEXT,
    div_win TEXT,
    rank INTEGER,
    g INTEGER,
    w INTEGER,
    l INTEGER
)

CREATE TABLE manager_half (
    player_id TEXT,
    year INTEGER,
    team_id TEXT,
    league_id TEXT,
    inseason INTEGER,
    half INTEGER,
    g INTEGER,
    w INTEGER,
    l INTEGER,
    rank INTEGER
)

CREATE TABLE college (
    college_id TEXT,
    name_full TEXT,
    city TEXT,
    state TEXT,
    country TEXT
)

CREATE TABLE pitching_postseason (
    player_id TEXT,
    year INTEGER,
    round TEXT,
    team_id TEXT,
    league_id TEXT,
    w INTEGER,
    l INTEGER,
    g INTEGER,
    gs INTEGER,
    cg INTEGER,
    sho INTEGER,
    sv INTEGER,
    ipouts INTEGER,
    h INTEGER,
    er INTEGER,
    hr INTEGER,
    bb INTEGER,
    so INTEGER,
    baopp TEXT,
    era NUMERIC,
    ibb NUMERIC,
    wp NUMERIC,
    hbp NUMERIC,
    bk NUMERIC,
    bfp NUMERIC,
    gf INTEGER,
    r INTEGER,
    sh NUMERIC,
    sf NUMERIC,
    g_idp NUMERIC
)

Response: SELECT year, SUM(attendance) FROM home_game ORDER BY year 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: Can you draw the trend of sum attendance over the binning year?, show by the X-axis in descending. ### Input: CREATE TABLE team_franchise (
    franchise_id TEXT,
    franchise_name TEXT,
    active TEXT,
    na_assoc TEXT
)

CREATE TABLE manager (
    player_id TEXT,
    year INTEGER,
    team_id TEXT,
    league_id TEXT,
    inseason INTEGER,
    g INTEGER,
    w INTEGER,
    l INTEGER,
    rank NUMERIC,
    plyr_mgr TEXT
)

CREATE TABLE postseason (
    year INTEGER,
    round TEXT,
    team_id_winner TEXT,
    league_id_winner TEXT,
    team_id_loser TEXT,
    league_id_loser TEXT,
    wins INTEGER,
    losses INTEGER,
    ties INTEGER
)

CREATE TABLE salary (
    year INTEGER,
    team_id TEXT,
    league_id TEXT,
    player_id TEXT,
    salary INTEGER
)

CREATE TABLE all_star (
    player_id TEXT,
    year INTEGER,
    game_num INTEGER,
    game_id TEXT,
    team_id TEXT,
    league_id TEXT,
    gp NUMERIC,
    starting_pos NUMERIC
)

CREATE TABLE player_college (
    player_id TEXT,
    college_id TEXT,
    year INTEGER
)

CREATE TABLE fielding_postseason (
    player_id TEXT,
    year INTEGER,
    team_id TEXT,
    league_id TEXT,
    round TEXT,
    pos TEXT,
    g INTEGER,
    gs NUMERIC,
    inn_outs NUMERIC,
    po INTEGER,
    a INTEGER,
    e INTEGER,
    dp INTEGER,
    tp INTEGER,
    pb NUMERIC,
    sb NUMERIC,
    cs NUMERIC
)

CREATE TABLE manager_award (
    player_id TEXT,
    award_id TEXT,
    year INTEGER,
    league_id TEXT,
    tie TEXT,
    notes NUMERIC
)

CREATE TABLE pitching (
    player_id TEXT,
    year INTEGER,
    stint INTEGER,
    team_id TEXT,
    league_id TEXT,
    w INTEGER,
    l INTEGER,
    g INTEGER,
    gs INTEGER,
    cg INTEGER,
    sho INTEGER,
    sv INTEGER,
    ipouts NUMERIC,
    h INTEGER,
    er INTEGER,
    hr INTEGER,
    bb INTEGER,
    so INTEGER,
    baopp NUMERIC,
    era NUMERIC,
    ibb NUMERIC,
    wp NUMERIC,
    hbp NUMERIC,
    bk INTEGER,
    bfp NUMERIC,
    gf NUMERIC,
    r INTEGER,
    sh NUMERIC,
    sf NUMERIC,
    g_idp NUMERIC
)

CREATE TABLE fielding (
    player_id TEXT,
    year INTEGER,
    stint INTEGER,
    team_id TEXT,
    league_id TEXT,
    pos TEXT,
    g INTEGER,
    gs NUMERIC,
    inn_outs NUMERIC,
    po NUMERIC,
    a NUMERIC,
    e NUMERIC,
    dp NUMERIC,
    pb NUMERIC,
    wp NUMERIC,
    sb NUMERIC,
    cs NUMERIC,
    zr NUMERIC
)

CREATE TABLE team (
    year INTEGER,
    league_id TEXT,
    team_id TEXT,
    franchise_id TEXT,
    div_id TEXT,
    rank INTEGER,
    g INTEGER,
    ghome NUMERIC,
    w INTEGER,
    l INTEGER,
    div_win TEXT,
    wc_win TEXT,
    lg_win TEXT,
    ws_win TEXT,
    r INTEGER,
    ab INTEGER,
    h INTEGER,
    double INTEGER,
    triple INTEGER,
    hr INTEGER,
    bb INTEGER,
    so NUMERIC,
    sb NUMERIC,
    cs NUMERIC,
    hbp NUMERIC,
    sf NUMERIC,
    ra INTEGER,
    er INTEGER,
    era NUMERIC,
    cg INTEGER,
    sho INTEGER,
    sv INTEGER,
    ipouts INTEGER,
    ha INTEGER,
    hra INTEGER,
    bba INTEGER,
    soa INTEGER,
    e INTEGER,
    dp NUMERIC,
    fp NUMERIC,
    name TEXT,
    park TEXT,
    attendance NUMERIC,
    bpf INTEGER,
    ppf INTEGER,
    team_id_br TEXT,
    team_id_lahman45 TEXT,
    team_id_retro TEXT
)

CREATE TABLE home_game (
    year INTEGER,
    league_id TEXT,
    team_id TEXT,
    park_id TEXT,
    span_first TEXT,
    span_last TEXT,
    games INTEGER,
    openings INTEGER,
    attendance INTEGER
)

CREATE TABLE fielding_outfield (
    player_id TEXT,
    year INTEGER,
    stint INTEGER,
    glf NUMERIC,
    gcf NUMERIC,
    grf NUMERIC
)

CREATE TABLE manager_award_vote (
    award_id TEXT,
    year INTEGER,
    league_id TEXT,
    player_id TEXT,
    points_won INTEGER,
    points_max INTEGER,
    votes_first INTEGER
)

CREATE TABLE park (
    park_id TEXT,
    park_name TEXT,
    park_alias TEXT,
    city TEXT,
    state TEXT,
    country TEXT
)

CREATE TABLE appearances (
    year INTEGER,
    team_id TEXT,
    league_id TEXT,
    player_id TEXT,
    g_all NUMERIC,
    gs NUMERIC,
    g_batting INTEGER,
    g_defense NUMERIC,
    g_p INTEGER,
    g_c INTEGER,
    g_1b INTEGER,
    g_2b INTEGER,
    g_3b INTEGER,
    g_ss INTEGER,
    g_lf INTEGER,
    g_cf INTEGER,
    g_rf INTEGER,
    g_of INTEGER,
    g_dh NUMERIC,
    g_ph NUMERIC,
    g_pr NUMERIC
)

CREATE TABLE batting_postseason (
    year INTEGER,
    round TEXT,
    player_id TEXT,
    team_id TEXT,
    league_id TEXT,
    g INTEGER,
    ab INTEGER,
    r INTEGER,
    h INTEGER,
    double INTEGER,
    triple INTEGER,
    hr INTEGER,
    rbi INTEGER,
    sb INTEGER,
    cs NUMERIC,
    bb INTEGER,
    so INTEGER,
    ibb NUMERIC,
    hbp NUMERIC,
    sh NUMERIC,
    sf NUMERIC,
    g_idp NUMERIC
)

CREATE TABLE hall_of_fame (
    player_id TEXT,
    yearid INTEGER,
    votedby TEXT,
    ballots NUMERIC,
    needed NUMERIC,
    votes NUMERIC,
    inducted TEXT,
    category TEXT,
    needed_note TEXT
)

CREATE TABLE batting (
    player_id TEXT,
    year INTEGER,
    stint INTEGER,
    team_id TEXT,
    league_id TEXT,
    g INTEGER,
    ab NUMERIC,
    r NUMERIC,
    h NUMERIC,
    double NUMERIC,
    triple NUMERIC,
    hr NUMERIC,
    rbi NUMERIC,
    sb NUMERIC,
    cs NUMERIC,
    bb NUMERIC,
    so NUMERIC,
    ibb NUMERIC,
    hbp NUMERIC,
    sh NUMERIC,
    sf NUMERIC,
    g_idp NUMERIC
)

CREATE TABLE player_award (
    player_id TEXT,
    award_id TEXT,
    year INTEGER,
    league_id TEXT,
    tie TEXT,
    notes TEXT
)

CREATE TABLE player (
    player_id TEXT,
    birth_year NUMERIC,
    birth_month NUMERIC,
    birth_day NUMERIC,
    birth_country TEXT,
    birth_state TEXT,
    birth_city TEXT,
    death_year NUMERIC,
    death_month NUMERIC,
    death_day NUMERIC,
    death_country TEXT,
    death_state TEXT,
    death_city TEXT,
    name_first TEXT,
    name_last TEXT,
    name_given TEXT,
    weight NUMERIC,
    height NUMERIC,
    bats TEXT,
    throws TEXT,
    debut TEXT,
    final_game TEXT,
    retro_id TEXT,
    bbref_id TEXT
)

CREATE TABLE player_award_vote (
    award_id TEXT,
    year INTEGER,
    league_id TEXT,
    player_id TEXT,
    points_won NUMERIC,
    points_max INTEGER,
    votes_first NUMERIC
)

CREATE TABLE team_half (
    year INTEGER,
    league_id TEXT,
    team_id TEXT,
    half INTEGER,
    div_id TEXT,
    div_win TEXT,
    rank INTEGER,
    g INTEGER,
    w INTEGER,
    l INTEGER
)

CREATE TABLE manager_half (
    player_id TEXT,
    year INTEGER,
    team_id TEXT,
    league_id TEXT,
    inseason INTEGER,
    half INTEGER,
    g INTEGER,
    w INTEGER,
    l INTEGER,
    rank INTEGER
)

CREATE TABLE college (
    college_id TEXT,
    name_full TEXT,
    city TEXT,
    state TEXT,
    country TEXT
)

CREATE TABLE pitching_postseason (
    player_id TEXT,
    year INTEGER,
    round TEXT,
    team_id TEXT,
    league_id TEXT,
    w INTEGER,
    l INTEGER,
    g INTEGER,
    gs INTEGER,
    cg INTEGER,
    sho INTEGER,
    sv INTEGER,
    ipouts INTEGER,
    h INTEGER,
    er INTEGER,
    hr INTEGER,
    bb INTEGER,
    so INTEGER,
    baopp TEXT,
    era NUMERIC,
    ibb NUMERIC,
    wp NUMERIC,
    hbp NUMERIC,
    bk NUMERIC,
    bfp NUMERIC,
    gf INTEGER,
    r INTEGER,
    sh NUMERIC,
    sf NUMERIC,
    g_idp NUMERIC
) ### Response: SELECT year, SUM(attendance) FROM home_game ORDER BY year DESC


Instruction: What are the vocal types used in song 'Le Pop'?

Input:
CREATE TABLE instruments (
    songid number,
    bandmateid number,
    instrument text
)

CREATE TABLE tracklists (
    albumid number,
    position number,
    songid number
)

CREATE TABLE band (
    id number,
    firstname text,
    lastname text
)

CREATE TABLE albums (
    aid number,
    title text,
    year number,
    label text,
    type text
)

CREATE TABLE performance (
    songid number,
    bandmate number,
    stageposition text
)

CREATE TABLE vocals (
    songid number,
    bandmate number,
    type text
)

CREATE TABLE songs (
    songid number,
    title text
)

Response: SELECT type FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the vocal types used in song 'Le Pop'? ### Input: CREATE TABLE instruments (
    songid number,
    bandmateid number,
    instrument text
)

CREATE TABLE tracklists (
    albumid number,
    position number,
    songid number
)

CREATE TABLE band (
    id number,
    firstname text,
    lastname text
)

CREATE TABLE albums (
    aid number,
    title text,
    year number,
    label text,
    type text
)

CREATE TABLE performance (
    songid number,
    bandmate number,
    stageposition text
)

CREATE TABLE vocals (
    songid number,
    bandmate number,
    type text
)

CREATE TABLE songs (
    songid number,
    title text
) ### Response: SELECT type FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop"


Instruction: what is the most weeks on chart when the peak position is less than 5 and from Sweden?

Input:
CREATE TABLE table_79845 (
    "Title" text,
    "Album" text,
    "Country" text,
    "Peak position" real,
    "Weeks on chart" real
)

Response: SELECT MAX("Weeks on chart") FROM table_79845 WHERE "Peak position" < '5' AND "Country" = 'sweden'

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 most weeks on chart when the peak position is less than 5 and from Sweden? ### Input: CREATE TABLE table_79845 (
    "Title" text,
    "Album" text,
    "Country" text,
    "Peak position" real,
    "Weeks on chart" real
) ### Response: SELECT MAX("Weeks on chart") FROM table_79845 WHERE "Peak position" < '5' AND "Country" = 'sweden'


Instruction: Count the number of patients died in or before year 2111 whose lab test fluid is ascites.

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

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

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

CREATE TABLE 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2111.0" 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 died in or before year 2111 whose lab test fluid is ascites. ### Input: CREATE TABLE diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

CREATE TABLE 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2111.0" AND lab.fluid = "Ascites"


Instruction: What was the series in season 2009?

Input:
CREATE TABLE table_name_61 (
    series VARCHAR,
    season VARCHAR
)

Response: SELECT series FROM table_name_61 WHERE season = 2009

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 series in season 2009? ### Input: CREATE TABLE table_name_61 (
    series VARCHAR,
    season VARCHAR
) ### Response: SELECT series FROM table_name_61 WHERE season = 2009


Instruction: What is the maximum pesticide concentration ever found in a commodity?

Input:
CREATE TABLE sampledata15 (
    sample_pk number,
    state text,
    year text,
    month text,
    day text,
    site text,
    commod text,
    source_id text,
    variety text,
    origin text,
    country text,
    disttype text,
    commtype text,
    claim text,
    quantity number,
    growst text,
    packst text,
    distst text
)

CREATE TABLE resultsdata15 (
    sample_pk number,
    commod text,
    commtype text,
    lab text,
    pestcode text,
    testclass text,
    concen number,
    lod number,
    conunit text,
    confmethod text,
    confmethod2 text,
    annotate text,
    quantitate text,
    mean text,
    extract text,
    determin text
)

Response: SELECT MAX(concen) FROM resultsdata15

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 maximum pesticide concentration ever found in a commodity? ### Input: CREATE TABLE sampledata15 (
    sample_pk number,
    state text,
    year text,
    month text,
    day text,
    site text,
    commod text,
    source_id text,
    variety text,
    origin text,
    country text,
    disttype text,
    commtype text,
    claim text,
    quantity number,
    growst text,
    packst text,
    distst text
)

CREATE TABLE resultsdata15 (
    sample_pk number,
    commod text,
    commtype text,
    lab text,
    pestcode text,
    testclass text,
    concen number,
    lod number,
    conunit text,
    confmethod text,
    confmethod2 text,
    annotate text,
    quantitate text,
    mean text,
    extract text,
    determin text
) ### Response: SELECT MAX(concen) FROM resultsdata15


Instruction: What is the international mail with the highest number that has a change of +0,2% and less than 0 domestic mail?

Input:
CREATE TABLE table_45338 (
    "Year" real,
    "Domestic freight" real,
    "Domestic mail" real,
    "International freight" real,
    "International mail" real,
    "Total freight and mail" real,
    "Change" text
)

Response: SELECT MAX("International mail") FROM table_45338 WHERE "Change" = '+0,2%' AND "Domestic mail" < '0'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the international mail with the highest number that has a change of +0,2% and less than 0 domestic mail? ### Input: CREATE TABLE table_45338 (
    "Year" real,
    "Domestic freight" real,
    "Domestic mail" real,
    "International freight" real,
    "International mail" real,
    "Total freight and mail" real,
    "Change" text
) ### Response: SELECT MAX("International mail") FROM table_45338 WHERE "Change" = '+0,2%' AND "Domestic mail" < '0'


Instruction: What is the park & ride lot for the Temple Square station?

Input:
CREATE TABLE table_name_97 (
    park_and_ride_lot VARCHAR,
    station_name VARCHAR
)

Response: SELECT park_and_ride_lot FROM table_name_97 WHERE station_name = "temple square"

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 park & ride lot for the Temple Square station? ### Input: CREATE TABLE table_name_97 (
    park_and_ride_lot VARCHAR,
    station_name VARCHAR
) ### Response: SELECT park_and_ride_lot FROM table_name_97 WHERE station_name = "temple square"


Instruction: Name the total number of player for 51 points

Input:
CREATE TABLE table_22824319_3 (
    player VARCHAR,
    points VARCHAR
)

Response: SELECT COUNT(player) FROM table_22824319_3 WHERE points = 51

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the total number of player for 51 points ### Input: CREATE TABLE table_22824319_3 (
    player VARCHAR,
    points VARCHAR
) ### Response: SELECT COUNT(player) FROM table_22824319_3 WHERE points = 51


Instruction: Name of David Kimball, and an Overall smaller than 229 is what highest round?

Input:
CREATE TABLE table_name_51 (
    round INTEGER,
    name VARCHAR,
    overall VARCHAR
)

Response: SELECT MAX(round) FROM table_name_51 WHERE name = "david kimball" AND overall < 229

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name of David Kimball, and an Overall smaller than 229 is what highest round? ### Input: CREATE TABLE table_name_51 (
    round INTEGER,
    name VARCHAR,
    overall VARCHAR
) ### Response: SELECT MAX(round) FROM table_name_51 WHERE name = "david kimball" AND overall < 229


Instruction: How is the crowd of the team Geelong?

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

Response: SELECT AVG("Crowd") FROM table_53964 WHERE "Away team" = 'geelong'

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 crowd of the team Geelong? ### Input: CREATE TABLE table_53964 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
) ### Response: SELECT AVG("Crowd") FROM table_53964 WHERE "Away team" = 'geelong'


Instruction: flights from MILWAUKEE to PHOENIX on saturday or sunday AA

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

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

CREATE TABLE flight_fare (
    flight_id int,
    fare_id int
)

CREATE TABLE month (
    month_number int,
    month_name text
)

CREATE TABLE flight_leg (
    flight_id int,
    leg_number int,
    leg_flight int
)

CREATE TABLE fare (
    fare_id int,
    from_airport varchar,
    to_airport varchar,
    fare_basis_code text,
    fare_airline text,
    restriction_code text,
    one_direction_cost int,
    round_trip_cost int,
    round_trip_required varchar
)

CREATE TABLE airline (
    airline_code varchar,
    airline_name text,
    note text
)

CREATE TABLE airport (
    airport_code varchar,
    airport_name text,
    airport_location text,
    state_code varchar,
    country_name varchar,
    time_zone_code varchar,
    minimum_connect_time int
)

CREATE TABLE restriction (
    restriction_code text,
    advance_purchase int,
    stopovers text,
    saturday_stay_required text,
    minimum_stay int,
    maximum_stay int,
    application text,
    no_discounts text
)

CREATE TABLE flight (
    aircraft_code_sequence text,
    airline_code varchar,
    airline_flight text,
    arrival_time int,
    connections int,
    departure_time int,
    dual_carrier text,
    flight_days text,
    flight_id int,
    flight_number int,
    from_airport varchar,
    meal_code text,
    stops int,
    time_elapsed int,
    to_airport varchar
)

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

CREATE TABLE code_description (
    code varchar,
    description text
)

CREATE TABLE dual_carrier (
    main_airline varchar,
    low_flight_number int,
    high_flight_number int,
    dual_airline varchar,
    service_name text
)

CREATE TABLE equipment_sequence (
    aircraft_code_sequence varchar,
    aircraft_code varchar
)

CREATE TABLE aircraft (
    aircraft_code varchar,
    aircraft_description varchar,
    manufacturer varchar,
    basic_type varchar,
    engines int,
    propulsion varchar,
    wide_body varchar,
    wing_span int,
    length int,
    weight int,
    capacity int,
    pay_load int,
    cruising_speed int,
    range_miles int,
    pressurized varchar
)

CREATE TABLE days (
    days_code varchar,
    day_name varchar
)

CREATE TABLE state (
    state_code text,
    state_name text,
    country_name text
)

CREATE TABLE time_zone (
    time_zone_code text,
    time_zone_name text,
    hours_from_gmt int
)

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

CREATE TABLE fare_basis (
    fare_basis_code text,
    booking_class text,
    class_type text,
    premium text,
    economy text,
    discounted text,
    night text,
    season text,
    basis_days text
)

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

CREATE TABLE flight_stop (
    flight_id int,
    stop_number int,
    stop_days text,
    stop_airport text,
    arrival_time int,
    arrival_airline text,
    arrival_flight_number int,
    departure_time int,
    departure_airline text,
    departure_flight_number int,
    stop_time int
)

CREATE TABLE class_of_service (
    booking_class varchar,
    rank int,
    class_description text
)

CREATE TABLE compartment_class (
    compartment varchar,
    class_type varchar
)

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

Response: SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, flight WHERE (((flight.airline_code = 'AA') AND ((flight.flight_days = DAYS_0.days_code AND DAYS_0.day_name = DATE_DAY_0.day_name AND DATE_DAY_0.year = 1991 AND DATE_DAY_0.month_number = 7 AND DATE_DAY_0.day_number = 26) OR (flight.flight_days = DAYS_1.days_code AND DAYS_1.day_name = DATE_DAY_1.day_name AND DATE_DAY_1.year = 1991 AND DATE_DAY_1.month_number = 7 AND DATE_DAY_1.day_number = 26))) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHOENIX' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'MILWAUKEE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: flights from MILWAUKEE to PHOENIX on saturday or sunday AA ### Input: CREATE TABLE city (
    city_code varchar,
    city_name varchar,
    state_code varchar,
    country_name varchar,
    time_zone_code varchar
)

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

CREATE TABLE flight_fare (
    flight_id int,
    fare_id int
)

CREATE TABLE month (
    month_number int,
    month_name text
)

CREATE TABLE flight_leg (
    flight_id int,
    leg_number int,
    leg_flight int
)

CREATE TABLE fare (
    fare_id int,
    from_airport varchar,
    to_airport varchar,
    fare_basis_code text,
    fare_airline text,
    restriction_code text,
    one_direction_cost int,
    round_trip_cost int,
    round_trip_required varchar
)

CREATE TABLE airline (
    airline_code varchar,
    airline_name text,
    note text
)

CREATE TABLE airport (
    airport_code varchar,
    airport_name text,
    airport_location text,
    state_code varchar,
    country_name varchar,
    time_zone_code varchar,
    minimum_connect_time int
)

CREATE TABLE restriction (
    restriction_code text,
    advance_purchase int,
    stopovers text,
    saturday_stay_required text,
    minimum_stay int,
    maximum_stay int,
    application text,
    no_discounts text
)

CREATE TABLE flight (
    aircraft_code_sequence text,
    airline_code varchar,
    airline_flight text,
    arrival_time int,
    connections int,
    departure_time int,
    dual_carrier text,
    flight_days text,
    flight_id int,
    flight_number int,
    from_airport varchar,
    meal_code text,
    stops int,
    time_elapsed int,
    to_airport varchar
)

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

CREATE TABLE code_description (
    code varchar,
    description text
)

CREATE TABLE dual_carrier (
    main_airline varchar,
    low_flight_number int,
    high_flight_number int,
    dual_airline varchar,
    service_name text
)

CREATE TABLE equipment_sequence (
    aircraft_code_sequence varchar,
    aircraft_code varchar
)

CREATE TABLE aircraft (
    aircraft_code varchar,
    aircraft_description varchar,
    manufacturer varchar,
    basic_type varchar,
    engines int,
    propulsion varchar,
    wide_body varchar,
    wing_span int,
    length int,
    weight int,
    capacity int,
    pay_load int,
    cruising_speed int,
    range_miles int,
    pressurized varchar
)

CREATE TABLE days (
    days_code varchar,
    day_name varchar
)

CREATE TABLE state (
    state_code text,
    state_name text,
    country_name text
)

CREATE TABLE time_zone (
    time_zone_code text,
    time_zone_name text,
    hours_from_gmt int
)

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

CREATE TABLE fare_basis (
    fare_basis_code text,
    booking_class text,
    class_type text,
    premium text,
    economy text,
    discounted text,
    night text,
    season text,
    basis_days text
)

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

CREATE TABLE flight_stop (
    flight_id int,
    stop_number int,
    stop_days text,
    stop_airport text,
    arrival_time int,
    arrival_airline text,
    arrival_flight_number int,
    departure_time int,
    departure_airline text,
    departure_flight_number int,
    stop_time int
)

CREATE TABLE class_of_service (
    booking_class varchar,
    rank int,
    class_description text
)

CREATE TABLE compartment_class (
    compartment varchar,
    class_type varchar
)

CREATE TABLE time_interval (
    period text,
    begin_time int,
    end_time int
) ### Response: SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, flight WHERE (((flight.airline_code = 'AA') AND ((flight.flight_days = DAYS_0.days_code AND DAYS_0.day_name = DATE_DAY_0.day_name AND DATE_DAY_0.year = 1991 AND DATE_DAY_0.month_number = 7 AND DATE_DAY_0.day_number = 26) OR (flight.flight_days = DAYS_1.days_code AND DAYS_1.day_name = DATE_DAY_1.day_name AND DATE_DAY_1.year = 1991 AND DATE_DAY_1.month_number = 7 AND DATE_DAY_1.day_number = 26))) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHOENIX' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'MILWAUKEE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code


Instruction: provide the number of patients whose discharge location is snf and days of hospital stay is greater than 13?

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

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

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

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

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.days_stay > "13"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose discharge location is snf and days of hospital stay is greater than 13? ### Input: CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

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

CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.days_stay > "13"


Instruction: For each team, how many technicians are there, and sort from high to low by the y axis.

Input:
CREATE TABLE repair (
    repair_ID int,
    name text,
    Launch_Date text,
    Notes text
)

CREATE TABLE machine (
    Machine_ID int,
    Making_Year int,
    Class text,
    Team text,
    Machine_series text,
    value_points real,
    quality_rank int
)

CREATE TABLE repair_assignment (
    technician_id int,
    repair_ID int,
    Machine_ID int
)

CREATE TABLE technician (
    technician_id real,
    Name text,
    Team text,
    Starting_Year real,
    Age int
)

Response: SELECT Team, COUNT(*) FROM technician GROUP BY Team 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: For each team, how many technicians are there, and sort from high to low by the y axis. ### Input: CREATE TABLE repair (
    repair_ID int,
    name text,
    Launch_Date text,
    Notes text
)

CREATE TABLE machine (
    Machine_ID int,
    Making_Year int,
    Class text,
    Team text,
    Machine_series text,
    value_points real,
    quality_rank int
)

CREATE TABLE repair_assignment (
    technician_id int,
    repair_ID int,
    Machine_ID int
)

CREATE TABLE technician (
    technician_id real,
    Name text,
    Team text,
    Starting_Year real,
    Age int
) ### Response: SELECT Team, COUNT(*) FROM technician GROUP BY Team ORDER BY COUNT(*) DESC


Instruction: what is average age of patients whose marital status is married and discharge location is home health care?

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

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

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

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

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

Response: SELECT AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.discharge_location = "HOME HEALTH CARE"

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 average age of patients whose marital status is married and discharge location is home health care? ### Input: CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

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

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

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

CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
) ### Response: SELECT AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.discharge_location = "HOME HEALTH CARE"


Instruction: September 23, 1973 landed on which week of the season?

Input:
CREATE TABLE table_70568 (
    "Week" real,
    "Date" text,
    "Opponent" text,
    "Result" text,
    "Attendance" real
)

Response: SELECT "Week" FROM table_70568 WHERE "Date" = 'september 23, 1973'

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: September 23, 1973 landed on which week of the season? ### Input: CREATE TABLE table_70568 (
    "Week" real,
    "Date" text,
    "Opponent" text,
    "Result" text,
    "Attendance" real
) ### Response: SELECT "Week" FROM table_70568 WHERE "Date" = 'september 23, 1973'


Instruction: Where was the method of tko?

Input:
CREATE TABLE table_name_34 (
    location VARCHAR,
    method VARCHAR
)

Response: SELECT location FROM table_name_34 WHERE method = "tko"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Where was the method of tko? ### Input: CREATE TABLE table_name_34 (
    location VARCHAR,
    method VARCHAR
) ### Response: SELECT location FROM table_name_34 WHERE method = "tko"


Instruction: What Partner has a Construction Start of 2008 january?

Input:
CREATE TABLE table_name_2 (
    partner VARCHAR,
    construction_start VARCHAR
)

Response: SELECT partner FROM table_name_2 WHERE construction_start = "2008 january"

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 Partner has a Construction Start of 2008 january? ### Input: CREATE TABLE table_name_2 (
    partner VARCHAR,
    construction_start VARCHAR
) ### Response: SELECT partner FROM table_name_2 WHERE construction_start = "2008 january"


Instruction: calculate the number of medications that patient 52898 has been prescribed in 2105.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Response: SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52898) AND STRFTIME('%y', prescriptions.startdate) = '2105'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: calculate the number of medications that patient 52898 has been prescribed in 2105. ### Input: CREATE TABLE inputevents_cv (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    amount number
)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE procedures_icd (
    row_id number,
    subject_id number,
    hadm_id number,
    icd9_code text,
    charttime time
) ### Response: SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52898) AND STRFTIME('%y', prescriptions.startdate) = '2105'


Instruction: what are the top three most frequently used specimen tests given to patients in the same hospital visit after being diagnosed with poison-medicinal agt nos?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Response: SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'poison-medicinal agt nos')) AS t1 JOIN (SELECT admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id FROM microbiologyevents JOIN admissions ON microbiologyevents.hadm_id = admissions.hadm_id) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND t1.hadm_id = t2.hadm_id GROUP BY t2.spec_type_desc) AS t3 WHERE t3.c1 <= 3

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the top three most frequently used specimen tests given to patients in the same hospital visit after being diagnosed with poison-medicinal agt nos? ### Input: CREATE TABLE labevents (
    row_id number,
    subject_id number,
    hadm_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE d_icd_procedures (
    row_id number,
    icd9_code text,
    short_title text,
    long_title text
) ### Response: SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'poison-medicinal agt nos')) AS t1 JOIN (SELECT admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id FROM microbiologyevents JOIN admissions ON microbiologyevents.hadm_id = admissions.hadm_id) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND t1.hadm_id = t2.hadm_id GROUP BY t2.spec_type_desc) AS t3 WHERE t3.c1 <= 3


Instruction: what are the five most frequently prescribed drugs since 5 years ago for patients prescribed with atropine 0.1 mg/ml inj syringe at the same time?

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

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

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

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

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

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

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

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

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

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

Response: SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'atropine 0.1 mg/ml inj syringe' AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-5 year')) AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-5 year')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE DATETIME(t1.drugstarttime) = DATETIME(t2.drugstarttime) GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 5

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the five most frequently prescribed drugs since 5 years ago for patients prescribed with atropine 0.1 mg/ml inj syringe at the same time? ### Input: CREATE TABLE treatment (
    treatmentid number,
    patientunitstayid number,
    treatmentname text,
    treatmenttime time
)

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

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

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

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

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

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

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

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

CREATE TABLE microlab (
    microlabid number,
    patientunitstayid number,
    culturesite text,
    organism text,
    culturetakentime time
) ### Response: SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'atropine 0.1 mg/ml inj syringe' AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-5 year')) AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-5 year')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE DATETIME(t1.drugstarttime) = DATETIME(t2.drugstarttime) GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 5


Instruction: When was the date of death for the person married to Charles II?

Input:
CREATE TABLE table_name_86 (
    death VARCHAR,
    spouse VARCHAR
)

Response: SELECT death FROM table_name_86 WHERE spouse = "charles ii"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the date of death for the person married to Charles II? ### Input: CREATE TABLE table_name_86 (
    death VARCHAR,
    spouse VARCHAR
) ### Response: SELECT death FROM table_name_86 WHERE spouse = "charles ii"


Instruction: count the number of patients whose gender is f and procedure icd9 code is 4610?

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

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

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

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

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.icd9_code = "4610"

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 gender is f and procedure icd9 code is 4610? ### Input: CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
)

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

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

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

CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.icd9_code = "4610"


Instruction: How many points did Carlin have when they had 3 wins?

Input:
CREATE TABLE table_name_90 (
    points VARCHAR,
    wins VARCHAR,
    team VARCHAR
)

Response: SELECT points FROM table_name_90 WHERE wins = "3" AND team = "carlin"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many points did Carlin have when they had 3 wins? ### Input: CREATE TABLE table_name_90 (
    points VARCHAR,
    wins VARCHAR,
    team VARCHAR
) ### Response: SELECT points FROM table_name_90 WHERE wins = "3" AND team = "carlin"


Instruction: In the final, who are the opponents of partner Simon Aspelin?

Input:
CREATE TABLE table_35942 (
    "Outcome" text,
    "Date" text,
    "Tournament" text,
    "Surface" text,
    "Partner" text,
    "Opponents in the final" text,
    "Score in the final" text
)

Response: SELECT "Opponents in the final" FROM table_35942 WHERE "Partner" = 'simon aspelin'

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 the final, who are the opponents of partner Simon Aspelin? ### Input: CREATE TABLE table_35942 (
    "Outcome" text,
    "Date" text,
    "Tournament" text,
    "Surface" text,
    "Partner" text,
    "Opponents in the final" text,
    "Score in the final" text
) ### Response: SELECT "Opponents in the final" FROM table_35942 WHERE "Partner" = 'simon aspelin'


Instruction: how much does the arterial bp [systolic] of patient 8116 vary second measured on the current intensive care unit visit compared to the first value measured on the current intensive care unit visit?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Response: SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8116) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [systolic]' AND d_items.linksto = 'chartevents') ORDER BY chartevents.charttime LIMIT 1 OFFSET 1) - (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8116) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [systolic]' AND d_items.linksto = 'chartevents') ORDER BY chartevents.charttime LIMIT 1)

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how much does the arterial bp [systolic] of patient 8116 vary second measured on the current intensive care unit visit compared to the first value measured on the current intensive care unit visit? ### Input: CREATE TABLE procedures_icd (
    row_id number,
    subject_id number,
    hadm_id number,
    icd9_code text,
    charttime time
)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE cost (
    row_id number,
    subject_id number,
    hadm_id number,
    event_type text,
    event_id number,
    chargetime time,
    cost number
) ### Response: SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8116) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [systolic]' AND d_items.linksto = 'chartevents') ORDER BY chartevents.charttime LIMIT 1 OFFSET 1) - (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8116) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [systolic]' AND d_items.linksto = 'chartevents') ORDER BY chartevents.charttime LIMIT 1)


Instruction: Name the representative for party of whig

Input:
CREATE TABLE table_69618 (
    "Representative" text,
    "Years" text,
    "State" text,
    "Party" text,
    "Lifespan" text
)

Response: SELECT "Representative" FROM table_69618 WHERE "Party" = 'whig'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the representative for party of whig ### Input: CREATE TABLE table_69618 (
    "Representative" text,
    "Years" text,
    "State" text,
    "Party" text,
    "Lifespan" text
) ### Response: SELECT "Representative" FROM table_69618 WHERE "Party" = 'whig'


Instruction: What is the status of the district where the result is 63% 37%?

Input:
CREATE TABLE table_16185956_1 (
    status VARCHAR,
    results VARCHAR
)

Response: SELECT status FROM table_16185956_1 WHERE results = "63% 37%"

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 status of the district where the result is 63% 37%? ### Input: CREATE TABLE table_16185956_1 (
    status VARCHAR,
    results VARCHAR
) ### Response: SELECT status FROM table_16185956_1 WHERE results = "63% 37%"


Instruction: What is the Kashmiri word for the Indonesian word senin?

Input:
CREATE TABLE table_name_90 (
    kashmiri VARCHAR,
    indonesian VARCHAR
)

Response: SELECT kashmiri FROM table_name_90 WHERE indonesian = "senin"

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 Kashmiri word for the Indonesian word senin? ### Input: CREATE TABLE table_name_90 (
    kashmiri VARCHAR,
    indonesian VARCHAR
) ### Response: SELECT kashmiri FROM table_name_90 WHERE indonesian = "senin"


Instruction: how many female patients followed the procedure ven cath renal dialysis?

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

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

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

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

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.short_title = "Ven cath renal dialysis"

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 female patients followed the procedure ven cath renal dialysis? ### Input: CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
)

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

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

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

CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.short_title = "Ven cath renal dialysis"


Instruction: Which City of license has a Call sign of k241an?

Input:
CREATE TABLE table_name_68 (
    city_of_license VARCHAR,
    call_sign VARCHAR
)

Response: SELECT city_of_license FROM table_name_68 WHERE call_sign = "k241an"

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 City of license has a Call sign of k241an? ### Input: CREATE TABLE table_name_68 (
    city_of_license VARCHAR,
    call_sign VARCHAR
) ### Response: SELECT city_of_license FROM table_name_68 WHERE call_sign = "k241an"


Instruction: Where is the orchestra when the year of recording is 1934?

Input:
CREATE TABLE table_73366 (
    "Piano" text,
    "Conductor" text,
    "Orchestra" text,
    "Record Company" text,
    "Year of Recording" real,
    "Format" text
)

Response: SELECT "Orchestra" FROM table_73366 WHERE "Year of Recording" = '1934'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Where is the orchestra when the year of recording is 1934? ### Input: CREATE TABLE table_73366 (
    "Piano" text,
    "Conductor" text,
    "Orchestra" text,
    "Record Company" text,
    "Year of Recording" real,
    "Format" text
) ### Response: SELECT "Orchestra" FROM table_73366 WHERE "Year of Recording" = '1934'


Instruction: How many number of site have May 1, 2004 as the date?

Input:
CREATE TABLE table_22098274_1 (
    site VARCHAR,
    date VARCHAR
)

Response: SELECT COUNT(site) FROM table_22098274_1 WHERE date = "May 1, 2004"

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 number of site have May 1, 2004 as the date? ### Input: CREATE TABLE table_22098274_1 (
    site VARCHAR,
    date VARCHAR
) ### Response: SELECT COUNT(site) FROM table_22098274_1 WHERE date = "May 1, 2004"


Instruction: how many times has patient 015-56390 recieved a enteral tube intake: nasoduodenal nostril, r 10f intake in 12/last year?

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

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

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

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

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

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

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

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

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

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

Response: SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-56390')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.celllabel = 'enteral tube intake: nasoduodenal nostril, r 10f' AND DATETIME(intakeoutput.intakeoutputtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', intakeoutput.intakeoutputtime) = '12'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many times has patient 015-56390 recieved a enteral tube intake: nasoduodenal nostril, r 10f intake in 12/last year? ### Input: CREATE TABLE intakeoutput (
    intakeoutputid number,
    patientunitstayid number,
    cellpath text,
    celllabel text,
    cellvaluenumeric number,
    intakeoutputtime time
)

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

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

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

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

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

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

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

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

CREATE TABLE allergy (
    allergyid number,
    patientunitstayid number,
    drugname text,
    allergyname text,
    allergytime time
) ### Response: SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-56390')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.celllabel = 'enteral tube intake: nasoduodenal nostril, r 10f' AND DATETIME(intakeoutput.intakeoutputtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', intakeoutput.intakeoutputtime) = '12'


Instruction: What is Current Rank, when Ring Name is Kimurayama Mamoru?

Input:
CREATE TABLE table_40076 (
    "Ring name" text,
    "Current rank" text,
    "Debut" text,
    "Stable" text,
    "Birthplace" text
)

Response: SELECT "Current rank" FROM table_40076 WHERE "Ring name" = 'kimurayama mamoru'

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 Current Rank, when Ring Name is Kimurayama Mamoru? ### Input: CREATE TABLE table_40076 (
    "Ring name" text,
    "Current rank" text,
    "Debut" text,
    "Stable" text,
    "Birthplace" text
) ### Response: SELECT "Current rank" FROM table_40076 WHERE "Ring name" = 'kimurayama mamoru'


Instruction: What was the nationality of the skater with 108.8 points?

Input:
CREATE TABLE table_name_52 (
    nation VARCHAR,
    points VARCHAR
)

Response: SELECT nation FROM table_name_52 WHERE points = 108.8

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the nationality of the skater with 108.8 points? ### Input: CREATE TABLE table_name_52 (
    nation VARCHAR,
    points VARCHAR
) ### Response: SELECT nation FROM table_name_52 WHERE points = 108.8