Instruction: how many patients whose age is less than 41 and lab test category is chemistry?

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

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

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "41" AND lab."CATEGORY" = "Chemistry"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose age is less than 41 and lab test category is chemistry? ### Input: 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
)

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

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


Instruction: specify the age of patient paul edwards

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

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

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

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

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

Response: SELECT demographic.age FROM demographic WHERE demographic.name = "Paul Edwards"

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: specify the age of patient paul edwards ### Input: CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
)

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

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

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

CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
) ### Response: SELECT demographic.age FROM demographic WHERE demographic.name = "Paul Edwards"


Instruction: Name the least field goals for chantel hilliard

Input:
CREATE TABLE table_25693 (
    "Player" text,
    "Games Played" real,
    "Minutes" real,
    "Field Goals" real,
    "Three Pointers" real,
    "Free Throws" real,
    "Rebounds" real,
    "Assists" real,
    "Blocks" real,
    "Steals" real,
    "Points" real
)

Response: SELECT MIN("Field Goals") FROM table_25693 WHERE "Player" = 'Chantel Hilliard'

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 least field goals for chantel hilliard ### Input: CREATE TABLE table_25693 (
    "Player" text,
    "Games Played" real,
    "Minutes" real,
    "Field Goals" real,
    "Three Pointers" real,
    "Free Throws" real,
    "Rebounds" real,
    "Assists" real,
    "Blocks" real,
    "Steals" real,
    "Points" real
) ### Response: SELECT MIN("Field Goals") FROM table_25693 WHERE "Player" = 'Chantel Hilliard'


Instruction: For the Entrant of Sasol Jordan, add up all the points with a Year larger than 1993.

Input:
CREATE TABLE table_name_53 (
    points INTEGER,
    year VARCHAR,
    entrant VARCHAR
)

Response: SELECT SUM(points) FROM table_name_53 WHERE year > 1993 AND entrant = "sasol jordan"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For the Entrant of Sasol Jordan, add up all the points with a Year larger than 1993. ### Input: CREATE TABLE table_name_53 (
    points INTEGER,
    year VARCHAR,
    entrant VARCHAR
) ### Response: SELECT SUM(points) FROM table_name_53 WHERE year > 1993 AND entrant = "sasol jordan"


Instruction: Who is the player who played for the Miami Sol and went to school at North Carolina State?

Input:
CREATE TABLE table_50402 (
    "Pick" real,
    "Player" text,
    "Nationality" text,
    "New WNBA Team" text,
    "Former WNBA Team" text,
    "College/Country/Team" text
)

Response: SELECT "Player" FROM table_50402 WHERE "New WNBA Team" = 'miami sol' AND "College/Country/Team" = 'north carolina state'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the player who played for the Miami Sol and went to school at North Carolina State? ### Input: CREATE TABLE table_50402 (
    "Pick" real,
    "Player" text,
    "Nationality" text,
    "New WNBA Team" text,
    "Former WNBA Team" text,
    "College/Country/Team" text
) ### Response: SELECT "Player" FROM table_50402 WHERE "New WNBA Team" = 'miami sol' AND "College/Country/Team" = 'north carolina state'


Instruction: What is the date where the result was L 27-10 in a week before week 9?

Input:
CREATE TABLE table_name_94 (
    date VARCHAR,
    week VARCHAR,
    result VARCHAR
)

Response: SELECT date FROM table_name_94 WHERE week < 9 AND result = "l 27-10"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the date where the result was L 27-10 in a week before week 9? ### Input: CREATE TABLE table_name_94 (
    date VARCHAR,
    week VARCHAR,
    result VARCHAR
) ### Response: SELECT date FROM table_name_94 WHERE week < 9 AND result = "l 27-10"


Instruction: Who vacated his post when his successor was formally installed on May 11, 1966?

Input:
CREATE TABLE table_22348 (
    "State (class)" text,
    "Vacator" text,
    "Reason for change" text,
    "Successor" text,
    "Date of successors formal installation" text
)

Response: SELECT "Vacator" FROM table_22348 WHERE "Date of successors formal installation" = 'May 11, 1966'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who vacated his post when his successor was formally installed on May 11, 1966? ### Input: CREATE TABLE table_22348 (
    "State (class)" text,
    "Vacator" text,
    "Reason for change" text,
    "Successor" text,
    "Date of successors formal installation" text
) ### Response: SELECT "Vacator" FROM table_22348 WHERE "Date of successors formal installation" = 'May 11, 1966'


Instruction: What is the lowest cuts made that had a Top-25 less than 6 and wins greater than 0?

Input:
CREATE TABLE table_42349 (
    "Tournament" text,
    "Wins" real,
    "Top-5" real,
    "Top-10" real,
    "Top-25" real,
    "Events" real,
    "Cuts made" real
)

Response: SELECT MIN("Cuts made") FROM table_42349 WHERE "Top-25" < '6' AND "Wins" < '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 lowest cuts made that had a Top-25 less than 6 and wins greater than 0? ### Input: CREATE TABLE table_42349 (
    "Tournament" text,
    "Wins" real,
    "Top-5" real,
    "Top-10" real,
    "Top-25" real,
    "Events" real,
    "Cuts made" real
) ### Response: SELECT MIN("Cuts made") FROM table_42349 WHERE "Top-25" < '6' AND "Wins" < '0'


Instruction: what is the least silver for germany when gold is more than 4?

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

Response: SELECT MIN("Silver") FROM table_66454 WHERE "Nation" = 'germany' AND "Gold" > '4'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the least silver for germany when gold is more than 4? ### Input: CREATE TABLE table_66454 (
    "Rank" real,
    "Nation" text,
    "Gold" real,
    "Silver" real,
    "Bronze" real,
    "Total" real
) ### Response: SELECT MIN("Silver") FROM table_66454 WHERE "Nation" = 'germany' AND "Gold" > '4'


Instruction: What is the competition when aggregate is 1 4?

Input:
CREATE TABLE table_1233026_4 (
    competition VARCHAR,
    aggregate VARCHAR
)

Response: SELECT competition FROM table_1233026_4 WHERE aggregate = "1–4"

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


Instruction: what is the highest points when the chassis is focus rs wrc 08 and 09 and the stage wins is more than 91?

Input:
CREATE TABLE table_name_42 (
    points INTEGER,
    chassis VARCHAR,
    stage_wins VARCHAR
)

Response: SELECT MAX(points) FROM table_name_42 WHERE chassis = "focus rs wrc 08 and 09" AND stage_wins > 91

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 highest points when the chassis is focus rs wrc 08 and 09 and the stage wins is more than 91? ### Input: CREATE TABLE table_name_42 (
    points INTEGER,
    chassis VARCHAR,
    stage_wins VARCHAR
) ### Response: SELECT MAX(points) FROM table_name_42 WHERE chassis = "focus rs wrc 08 and 09" AND stage_wins > 91


Instruction: What was Eduardo Romero's score?

Input:
CREATE TABLE table_name_59 (
    score VARCHAR,
    player VARCHAR
)

Response: SELECT score FROM table_name_59 WHERE player = "eduardo romero"

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 Eduardo Romero's score? ### Input: CREATE TABLE table_name_59 (
    score VARCHAR,
    player VARCHAR
) ### Response: SELECT score FROM table_name_59 WHERE player = "eduardo romero"


Instruction: What is the mascot of Hammond Tech?

Input:
CREATE TABLE table_65664 (
    "School" text,
    "City" text,
    "Mascot" text,
    "County" text,
    "Year joined" real,
    "Previous Conference" text,
    "Year Left" real,
    "Conference Joined" text
)

Response: SELECT "Mascot" FROM table_65664 WHERE "City" = 'hammond' AND "School" = 'hammond tech'

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 mascot of Hammond Tech? ### Input: CREATE TABLE table_65664 (
    "School" text,
    "City" text,
    "Mascot" text,
    "County" text,
    "Year joined" real,
    "Previous Conference" text,
    "Year Left" real,
    "Conference Joined" text
) ### Response: SELECT "Mascot" FROM table_65664 WHERE "City" = 'hammond' AND "School" = 'hammond tech'


Instruction: What is the lowest number of wins with more than 113 points in 4th rank?

Input:
CREATE TABLE table_name_80 (
    wins INTEGER,
    points VARCHAR,
    rank VARCHAR
)

Response: SELECT MIN(wins) FROM table_name_80 WHERE points > 113 AND rank = "4th"

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 lowest number of wins with more than 113 points in 4th rank? ### Input: CREATE TABLE table_name_80 (
    wins INTEGER,
    points VARCHAR,
    rank VARCHAR
) ### Response: SELECT MIN(wins) FROM table_name_80 WHERE points > 113 AND rank = "4th"


Instruction: how many gold 's has brazil won ?

Input:
CREATE TABLE table_204_360 (
    id number,
    "year" number,
    "host" text,
    "gold" text,
    "silver" text,
    "bronze" text
)

Response: SELECT COUNT(*) FROM table_204_360 WHERE "gold" = 'brazil'

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 gold 's has brazil won ? ### Input: CREATE TABLE table_204_360 (
    id number,
    "year" number,
    "host" text,
    "gold" text,
    "silver" text,
    "bronze" text
) ### Response: SELECT COUNT(*) FROM table_204_360 WHERE "gold" = 'brazil'


Instruction: What kind of round was played when Hanne Skak Jensen faced Austria?

Input:
CREATE TABLE table_3277 (
    "Edition" real,
    "Zone" text,
    "Round" text,
    "Against" text,
    "Surface" text,
    "Opponent" text,
    "Outcome" text,
    "Result" text
)

Response: SELECT "Round" FROM table_3277 WHERE "Against" = 'Austria'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What kind of round was played when Hanne Skak Jensen faced Austria? ### Input: CREATE TABLE table_3277 (
    "Edition" real,
    "Zone" text,
    "Round" text,
    "Against" text,
    "Surface" text,
    "Opponent" text,
    "Outcome" text,
    "Result" text
) ### Response: SELECT "Round" FROM table_3277 WHERE "Against" = 'Austria'


Instruction: What was the type of sussex?

Input:
CREATE TABLE table_357 (
    "L&CR No." real,
    "Type" text,
    "Manufacturer" text,
    "Delivered" text,
    "Name" text,
    "Jt. Cttee No." real,
    "1845 disposal" text
)

Response: SELECT "Type" FROM table_357 WHERE "Name" = 'Sussex'

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 type of sussex? ### Input: CREATE TABLE table_357 (
    "L&CR No." real,
    "Type" text,
    "Manufacturer" text,
    "Delivered" text,
    "Name" text,
    "Jt. Cttee No." real,
    "1845 disposal" text
) ### Response: SELECT "Type" FROM table_357 WHERE "Name" = 'Sussex'


Instruction: when was patient 20066's arterial bp [diastolic] first measured less than 43.0 on the first icu visit?

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

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

CREATE TABLE d_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 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 outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value 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 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 patients (
    row_id number,
    subject_id number,
    gender text,
    dob time,
    dod time
)

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

Response: SELECT chartevents.charttime 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 = 20066) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [diastolic]' AND d_items.linksto = 'chartevents') AND chartevents.valuenum < 43.0 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: when was patient 20066's arterial bp [diastolic] first measured less than 43.0 on the first icu visit? ### Input: 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 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 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 inputevents_cv (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    amount number
)

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

CREATE TABLE d_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 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 outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value 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 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 patients (
    row_id number,
    subject_id number,
    gender text,
    dob time,
    dod time
)

CREATE TABLE d_items (
    row_id number,
    itemid number,
    label text,
    linksto text
) ### Response: SELECT chartevents.charttime 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 = 20066) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [diastolic]' AND d_items.linksto = 'chartevents') AND chartevents.valuenum < 43.0 ORDER BY chartevents.charttime LIMIT 1


Instruction: What is the total amount of settlement made for all the settlements?

Input:
CREATE TABLE claims (
    claim_id number,
    policy_id number,
    date_claim_made time,
    date_claim_settled time,
    amount_claimed number,
    amount_settled number
)

CREATE TABLE customers (
    customer_id number,
    customer_details text
)

CREATE TABLE customer_policies (
    policy_id number,
    customer_id number,
    policy_type_code text,
    start_date time,
    end_date time
)

CREATE TABLE settlements (
    settlement_id number,
    claim_id number,
    date_claim_made time,
    date_claim_settled time,
    amount_claimed number,
    amount_settled number,
    customer_policy_id number
)

CREATE TABLE payments (
    payment_id number,
    settlement_id number,
    payment_method_code text,
    date_payment_made time,
    amount_payment number
)

Response: SELECT SUM(amount_settled) FROM settlements

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 total amount of settlement made for all the settlements? ### Input: CREATE TABLE claims (
    claim_id number,
    policy_id number,
    date_claim_made time,
    date_claim_settled time,
    amount_claimed number,
    amount_settled number
)

CREATE TABLE customers (
    customer_id number,
    customer_details text
)

CREATE TABLE customer_policies (
    policy_id number,
    customer_id number,
    policy_type_code text,
    start_date time,
    end_date time
)

CREATE TABLE settlements (
    settlement_id number,
    claim_id number,
    date_claim_made time,
    date_claim_settled time,
    amount_claimed number,
    amount_settled number,
    customer_policy_id number
)

CREATE TABLE payments (
    payment_id number,
    settlement_id number,
    payment_method_code text,
    date_payment_made time,
    amount_payment number
) ### Response: SELECT SUM(amount_settled) FROM settlements


Instruction: What is the highest cited paper by jeff dean ?

Input:
CREATE TABLE writes (
    paperid int,
    authorid int
)

CREATE TABLE journal (
    journalid int,
    journalname varchar
)

CREATE TABLE cite (
    citingpaperid int,
    citedpaperid int
)

CREATE TABLE venue (
    venueid int,
    venuename varchar
)

CREATE TABLE author (
    authorid int,
    authorname varchar
)

CREATE TABLE paperkeyphrase (
    paperid int,
    keyphraseid int
)

CREATE TABLE paperfield (
    fieldid int,
    paperid int
)

CREATE TABLE keyphrase (
    keyphraseid int,
    keyphrasename varchar
)

CREATE TABLE paperdataset (
    paperid int,
    datasetid int
)

CREATE TABLE paper (
    paperid int,
    title varchar,
    venueid int,
    year int,
    numciting int,
    numcitedby int,
    journalid int
)

CREATE TABLE field (
    fieldid int
)

CREATE TABLE dataset (
    datasetid int,
    datasetname varchar
)

Response: SELECT DISTINCT cite.citedpaperid, COUNT(cite.citedpaperid) FROM author, cite, paper, writes WHERE author.authorname = 'jeff dean' AND paper.paperid = cite.citedpaperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid GROUP BY cite.citedpaperid ORDER BY COUNT(cite.citedpaperid) DESC

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest cited paper by jeff dean ? ### Input: CREATE TABLE writes (
    paperid int,
    authorid int
)

CREATE TABLE journal (
    journalid int,
    journalname varchar
)

CREATE TABLE cite (
    citingpaperid int,
    citedpaperid int
)

CREATE TABLE venue (
    venueid int,
    venuename varchar
)

CREATE TABLE author (
    authorid int,
    authorname varchar
)

CREATE TABLE paperkeyphrase (
    paperid int,
    keyphraseid int
)

CREATE TABLE paperfield (
    fieldid int,
    paperid int
)

CREATE TABLE keyphrase (
    keyphraseid int,
    keyphrasename varchar
)

CREATE TABLE paperdataset (
    paperid int,
    datasetid int
)

CREATE TABLE paper (
    paperid int,
    title varchar,
    venueid int,
    year int,
    numciting int,
    numcitedby int,
    journalid int
)

CREATE TABLE field (
    fieldid int
)

CREATE TABLE dataset (
    datasetid int,
    datasetname varchar
) ### Response: SELECT DISTINCT cite.citedpaperid, COUNT(cite.citedpaperid) FROM author, cite, paper, writes WHERE author.authorname = 'jeff dean' AND paper.paperid = cite.citedpaperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid GROUP BY cite.citedpaperid ORDER BY COUNT(cite.citedpaperid) DESC


Instruction: What is the lowest rank of Hungary where there was a total of 8 medals, including 2 silver?

Input:
CREATE TABLE table_name_37 (
    rank INTEGER,
    silver VARCHAR,
    total VARCHAR,
    nation VARCHAR
)

Response: SELECT MIN(rank) FROM table_name_37 WHERE total = 8 AND nation = "hungary" AND silver > 2

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest rank of Hungary where there was a total of 8 medals, including 2 silver? ### Input: CREATE TABLE table_name_37 (
    rank INTEGER,
    silver VARCHAR,
    total VARCHAR,
    nation VARCHAR
) ### Response: SELECT MIN(rank) FROM table_name_37 WHERE total = 8 AND nation = "hungary" AND silver > 2


Instruction: How many weeks had a Result of w 20 6?

Input:
CREATE TABLE table_name_24 (
    week INTEGER,
    result VARCHAR
)

Response: SELECT SUM(week) FROM table_name_24 WHERE result = "w 20–6"

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 weeks had a Result of w 20 6? ### Input: CREATE TABLE table_name_24 (
    week INTEGER,
    result VARCHAR
) ### Response: SELECT SUM(week) FROM table_name_24 WHERE result = "w 20–6"


Instruction: What is the combined attendance of all games that had a result of w 35-14?

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

Response: SELECT SUM("Attendance") FROM table_78334 WHERE "Result" = 'w 35-14'

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 combined attendance of all games that had a result of w 35-14? ### Input: CREATE TABLE table_78334 (
    "Week" real,
    "Date" text,
    "Opponent" text,
    "Result" text,
    "Attendance" real
) ### Response: SELECT SUM("Attendance") FROM table_78334 WHERE "Result" = 'w 35-14'


Instruction: how many patients whose admission year is less than 2111 and item id is 51446?

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

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

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

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

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2111" AND lab.itemid = "51446"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose admission year is less than 2111 and item id is 51446? ### Input: CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

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

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


Instruction: what is the next whitworth size -lrb- in -rrb- below 1/8 ?

Input:
CREATE TABLE table_204_828 (
    id number,
    "whitworth size (in)" number,
    "core diameter (in)" number,
    "threads per inch" number,
    "pitch (in)" number,
    "tapping drill size" text
)

Response: SELECT "whitworth size (in)" FROM table_204_828 WHERE id = (SELECT id FROM table_204_828 WHERE "whitworth size (in)" = '1/8') + 1

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the next whitworth size -lrb- in -rrb- below 1/8 ? ### Input: CREATE TABLE table_204_828 (
    id number,
    "whitworth size (in)" number,
    "core diameter (in)" number,
    "threads per inch" number,
    "pitch (in)" number,
    "tapping drill size" text
) ### Response: SELECT "whitworth size (in)" FROM table_204_828 WHERE id = (SELECT id FROM table_204_828 WHERE "whitworth size (in)" = '1/8') + 1


Instruction: How many ranks by average for the couple Tana and Stuart?

Input:
CREATE TABLE table_26375386_28 (
    rank_by_average VARCHAR,
    couple VARCHAR
)

Response: SELECT COUNT(rank_by_average) FROM table_26375386_28 WHERE couple = "Tana and Stuart"

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 ranks by average for the couple Tana and Stuart? ### Input: CREATE TABLE table_26375386_28 (
    rank_by_average VARCHAR,
    couple VARCHAR
) ### Response: SELECT COUNT(rank_by_average) FROM table_26375386_28 WHERE couple = "Tana and Stuart"


Instruction: What is the share of votes with 3,567,021 NDC votes?

Input:
CREATE TABLE table_9551 (
    "Election" real,
    "Number of NDC votes" text,
    "Share of votes" text,
    "Seats" real,
    "Outcome of election" text
)

Response: SELECT "Share of votes" FROM table_9551 WHERE "Number of NDC votes" = '3,567,021'

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 share of votes with 3,567,021 NDC votes? ### Input: CREATE TABLE table_9551 (
    "Election" real,
    "Number of NDC votes" text,
    "Share of votes" text,
    "Seats" real,
    "Outcome of election" text
) ### Response: SELECT "Share of votes" FROM table_9551 WHERE "Number of NDC votes" = '3,567,021'


Instruction: Which highest overall figure had Robert Alford as a name and a round of more than 2?

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

Response: SELECT MAX(overall) FROM table_name_89 WHERE name = "robert alford" AND round > 2

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which highest overall figure had Robert Alford as a name and a round of more than 2? ### Input: CREATE TABLE table_name_89 (
    overall INTEGER,
    name VARCHAR,
    round VARCHAR
) ### Response: SELECT MAX(overall) FROM table_name_89 WHERE name = "robert alford" AND round > 2


Instruction: Name the total number of points for newell's old boys

Input:
CREATE TABLE table_17968282_1 (
    points VARCHAR,
    team VARCHAR
)

Response: SELECT COUNT(points) FROM table_17968282_1 WHERE team = "Newell's Old Boys"

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 points for newell's old boys ### Input: CREATE TABLE table_17968282_1 (
    points VARCHAR,
    team VARCHAR
) ### Response: SELECT COUNT(points) FROM table_17968282_1 WHERE team = "Newell's Old Boys"


Instruction: May I sign up for 100 -level classes in Spring or Summer term ?

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

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

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

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

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

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

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

CREATE TABLE area (
    course_id int,
    area varchar
)

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

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

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

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

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

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

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

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

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

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

Response: SELECT DISTINCT COURSEalias0.department, COURSEalias0.name, COURSEalias0.number, SEMESTERalias0.semester FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN (DERIVED_TABLEalias0.course_id) AND NOT COURSEalias0.course_id IN (SELECT DISTINCT COURSE_PREREQUISITEalias0.course_id FROM course_prerequisite AS COURSE_PREREQUISITEalias0 WHERE NOT COURSE_PREREQUISITEalias0.pre_course_id IN (DERIVED_TABLEalias0.course_id)) AND COURSEalias0.department = 'EECS' AND COURSEalias0.number BETWEEN 100 AND 100 + 100 AND SEMESTERalias0.semester IN ('SP', 'SS', 'SU') AND SEMESTERalias0.semester_id = COURSE_OFFERINGalias0.semester AND SEMESTERalias0.year = 2016

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: May I sign up for 100 -level classes in Spring or Summer term ? ### Input: CREATE TABLE student (
    student_id int,
    lastname varchar,
    firstname varchar,
    program_id int,
    declare_major varchar,
    total_credit int,
    total_gpa float,
    entered_as varchar,
    admit_term int,
    predicted_graduation_semester int,
    degree varchar,
    minor varchar,
    internship varchar
)

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

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

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

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

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

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

CREATE TABLE area (
    course_id int,
    area varchar
)

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

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

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

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

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

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

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

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

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

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
) ### Response: SELECT DISTINCT COURSEalias0.department, COURSEalias0.name, COURSEalias0.number, SEMESTERalias0.semester FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN (DERIVED_TABLEalias0.course_id) AND NOT COURSEalias0.course_id IN (SELECT DISTINCT COURSE_PREREQUISITEalias0.course_id FROM course_prerequisite AS COURSE_PREREQUISITEalias0 WHERE NOT COURSE_PREREQUISITEalias0.pre_course_id IN (DERIVED_TABLEalias0.course_id)) AND COURSEalias0.department = 'EECS' AND COURSEalias0.number BETWEEN 100 AND 100 + 100 AND SEMESTERalias0.semester IN ('SP', 'SS', 'SU') AND SEMESTERalias0.semester_id = COURSE_OFFERINGalias0.semester AND SEMESTERalias0.year = 2016


Instruction: What song was in french?

Input:
CREATE TABLE table_76347 (
    "Draw" real,
    "Language" text,
    "Artist" text,
    "Song" text,
    "English translation" text,
    "Place" real,
    "Points" real
)

Response: SELECT "Song" FROM table_76347 WHERE "Language" = 'french'

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 song was in french? ### Input: CREATE TABLE table_76347 (
    "Draw" real,
    "Language" text,
    "Artist" text,
    "Song" text,
    "English translation" text,
    "Place" real,
    "Points" real
) ### Response: SELECT "Song" FROM table_76347 WHERE "Language" = 'french'


Instruction: What's the name of the episode associated with Nick production number 342?

Input:
CREATE TABLE table_28767 (
    "Season #" real,
    "Series #" real,
    "Episode title" text,
    "Original air date" text,
    "Nick prod. #" real
)

Response: SELECT "Episode title" FROM table_28767 WHERE "Nick prod. #" = '342'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the name of the episode associated with Nick production number 342? ### Input: CREATE TABLE table_28767 (
    "Season #" real,
    "Series #" real,
    "Episode title" text,
    "Original air date" text,
    "Nick prod. #" real
) ### Response: SELECT "Episode title" FROM table_28767 WHERE "Nick prod. #" = '342'


Instruction: What Leading scorer had a Score of 80 112?

Input:
CREATE TABLE table_name_98 (
    leading_scorer VARCHAR,
    score VARCHAR
)

Response: SELECT leading_scorer FROM table_name_98 WHERE score = "80–112"

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 Leading scorer had a Score of 80 112? ### Input: CREATE TABLE table_name_98 (
    leading_scorer VARCHAR,
    score VARCHAR
) ### Response: SELECT leading_scorer FROM table_name_98 WHERE score = "80–112"


Instruction: was the value of patient 016-38131's bun last measured on the current hospital visit less than they were first measured on the current hospital visit?

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

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

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

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

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

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

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

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

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

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

Response: SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-38131' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'bun' ORDER BY lab.labresulttime DESC LIMIT 1) < (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-38131' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'bun' ORDER BY lab.labresulttime 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: was the value of patient 016-38131's bun last measured on the current hospital visit less than they were first measured on the current hospital visit? ### Input: CREATE TABLE vitalperiodic (
    vitalperiodicid number,
    patientunitstayid number,
    temperature number,
    sao2 number,
    heartrate number,
    respiration number,
    systemicsystolic number,
    systemicdiastolic number,
    systemicmean number,
    observationtime time
)

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

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

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

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

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

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

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

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

CREATE TABLE cost (
    costid number,
    uniquepid text,
    patienthealthsystemstayid number,
    eventtype text,
    eventid number,
    chargetime time,
    cost number
) ### Response: SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-38131' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'bun' ORDER BY lab.labresulttime DESC LIMIT 1) < (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-38131' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'bun' ORDER BY lab.labresulttime LIMIT 1)


Instruction: What is on at 5pm on the channel where As the World Turns is on at 2pm?

Input:
CREATE TABLE table_61209 (
    "7:00 am" text,
    "7:30 am" text,
    "8:00 am" text,
    "9:00 am" text,
    "10:00 am" text,
    "11:00 am" text,
    "noon" text,
    "12:30 pm" text,
    "1:00 pm" text,
    "1:30 pm" text,
    "2:00 pm" text,
    "3:00 pm" text,
    "3:30 pm" text,
    "5:00 pm" text,
    "6:30 pm" text
)

Response: SELECT "5:00 pm" FROM table_61209 WHERE "2:00 pm" = 'as the world turns'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is on at 5pm on the channel where As the World Turns is on at 2pm? ### Input: CREATE TABLE table_61209 (
    "7:00 am" text,
    "7:30 am" text,
    "8:00 am" text,
    "9:00 am" text,
    "10:00 am" text,
    "11:00 am" text,
    "noon" text,
    "12:30 pm" text,
    "1:00 pm" text,
    "1:30 pm" text,
    "2:00 pm" text,
    "3:00 pm" text,
    "3:30 pm" text,
    "5:00 pm" text,
    "6:30 pm" text
) ### Response: SELECT "5:00 pm" FROM table_61209 WHERE "2:00 pm" = 'as the world turns'


Instruction: Are there any sections of EECS 767 offered after 07:30 P.M. ?

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

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

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

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

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

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

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

CREATE TABLE area (
    course_id int,
    area varchar
)

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

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

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

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

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

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

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

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

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

Response: SELECT DISTINCT course_offering.end_time, course_offering.section_number, course_offering.start_time FROM course, course_offering, semester WHERE course_offering.start_time > '07:30' AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 767 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016

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: Are there any sections of EECS 767 offered after 07:30 P.M. ? ### Input: CREATE TABLE course_tags_count (
    course_id int,
    clear_grading int,
    pop_quiz int,
    group_projects int,
    inspirational int,
    long_lectures int,
    extra_credit int,
    few_tests int,
    good_feedback int,
    tough_tests int,
    heavy_papers int,
    cares_for_students int,
    heavy_assignments int,
    respected int,
    participation int,
    heavy_reading int,
    tough_grader int,
    hilarious int,
    would_take_again int,
    good_lecture int,
    no_skip int
)

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

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

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

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

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

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

CREATE TABLE area (
    course_id int,
    area varchar
)

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

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

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

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

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

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

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

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

CREATE TABLE offering_instructor (
    offering_instructor_id int,
    offering_id int,
    instructor_id int
) ### Response: SELECT DISTINCT course_offering.end_time, course_offering.section_number, course_offering.start_time FROM course, course_offering, semester WHERE course_offering.start_time > '07:30' AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 767 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016


Instruction: Name the most interview for minnesota and average more than 7.901

Input:
CREATE TABLE table_57084 (
    "State" text,
    "Interview" real,
    "Swimsuit" real,
    "Evening gown" real,
    "Average" real
)

Response: SELECT MAX("Interview") FROM table_57084 WHERE "State" = 'minnesota' AND "Average" > '7.901'

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 most interview for minnesota and average more than 7.901 ### Input: CREATE TABLE table_57084 (
    "State" text,
    "Interview" real,
    "Swimsuit" real,
    "Evening gown" real,
    "Average" real
) ### Response: SELECT MAX("Interview") FROM table_57084 WHERE "State" = 'minnesota' AND "Average" > '7.901'


Instruction: In the game where the Hornets were the home team and Clippers the visiting team, what is the score?

Input:
CREATE TABLE table_56666 (
    "Date" text,
    "Visitor" text,
    "Score" text,
    "Home" text,
    "Leading scorer" text,
    "Attendance" real,
    "Record" text
)

Response: SELECT "Score" FROM table_56666 WHERE "Home" = 'hornets' AND "Visitor" = 'clippers'

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 game where the Hornets were the home team and Clippers the visiting team, what is the score? ### Input: CREATE TABLE table_56666 (
    "Date" text,
    "Visitor" text,
    "Score" text,
    "Home" text,
    "Leading scorer" text,
    "Attendance" real,
    "Record" text
) ### Response: SELECT "Score" FROM table_56666 WHERE "Home" = 'hornets' AND "Visitor" = 'clippers'


Instruction: Tag Usage - Presentation Frameworks.

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

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

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

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

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

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

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

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

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

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

CREATE TABLE PostTypes (
    Id number,
    Name text
)

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

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

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

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

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

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

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

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

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

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

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

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

Response: SELECT t.TagName, COUNT(p.Id) AS Posts, SUM(CASE WHEN p.AnswerCount > 0 THEN 1 ELSE 0 END) AS Answered FROM Tags AS t INNER JOIN PostTags AS pta ON t.Id = pta.TagId INNER JOIN Posts AS p ON p.Id = pta.PostId AND p.PostTypeId = 1 WHERE t.TagName IN ('angular', 'ember.js', 'reactjs', 'vuejs2') GROUP BY t.TagName

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: Tag Usage - Presentation Frameworks. ### Input: CREATE TABLE Posts (
    Id number,
    PostTypeId number,
    AcceptedAnswerId number,
    ParentId number,
    CreationDate time,
    DeletionDate time,
    Score number,
    ViewCount number,
    Body text,
    OwnerUserId number,
    OwnerDisplayName text,
    LastEditorUserId number,
    LastEditorDisplayName text,
    LastEditDate time,
    LastActivityDate time,
    Title text,
    Tags text,
    AnswerCount number,
    CommentCount number,
    FavoriteCount number,
    ClosedDate time,
    CommunityOwnedDate time,
    ContentLicense text
)

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

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

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

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

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

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

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

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

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

CREATE TABLE PostTypes (
    Id number,
    Name text
)

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

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

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

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

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

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

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

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

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

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

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

CREATE TABLE PostHistory (
    Id number,
    PostHistoryTypeId number,
    PostId number,
    RevisionGUID other,
    CreationDate time,
    UserId number,
    UserDisplayName text,
    Comment text,
    Text text,
    ContentLicense text
) ### Response: SELECT t.TagName, COUNT(p.Id) AS Posts, SUM(CASE WHEN p.AnswerCount > 0 THEN 1 ELSE 0 END) AS Answered FROM Tags AS t INNER JOIN PostTags AS pta ON t.Id = pta.TagId INNER JOIN Posts AS p ON p.Id = pta.PostId AND p.PostTypeId = 1 WHERE t.TagName IN ('angular', 'ember.js', 'reactjs', 'vuejs2') GROUP BY t.TagName


Instruction: What was the highest money when the score was 69-68-67-69=273?

Input:
CREATE TABLE table_62549 (
    "Place" text,
    "Player" text,
    "Country" text,
    "Score" text,
    "To par" text,
    "Money ( $ )" real
)

Response: SELECT MAX("Money ( $ )") FROM table_62549 WHERE "Score" = '69-68-67-69=273'

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 highest money when the score was 69-68-67-69=273? ### Input: CREATE TABLE table_62549 (
    "Place" text,
    "Player" text,
    "Country" text,
    "Score" text,
    "To par" text,
    "Money ( $ )" real
) ### Response: SELECT MAX("Money ( $ )") FROM table_62549 WHERE "Score" = '69-68-67-69=273'


Instruction: Who were the opponents during week 14?

Input:
CREATE TABLE table_name_53 (
    opponent VARCHAR,
    week VARCHAR
)

Response: SELECT opponent FROM table_name_53 WHERE week = 14

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who were the opponents during week 14? ### Input: CREATE TABLE table_name_53 (
    opponent VARCHAR,
    week VARCHAR
) ### Response: SELECT opponent FROM table_name_53 WHERE week = 14


Instruction: tell me patient 10624's minimum bands value this month?

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

CREATE TABLE d_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 d_labitems (
    row_id number,
    itemid number,
    label text
)

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

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

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

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

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

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

CREATE TABLE outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value 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 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 prescriptions (
    row_id number,
    subject_id number,
    hadm_id number,
    startdate time,
    enddate time,
    drug text,
    dose_val_rx text,
    dose_unit_rx text,
    route text
)

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

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

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

Response: SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10624) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bands') AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month')

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: tell me patient 10624's minimum bands value this month? ### Input: CREATE TABLE chartevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
)

CREATE TABLE d_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 d_labitems (
    row_id number,
    itemid number,
    label text
)

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

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

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

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

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

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

CREATE TABLE outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value 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 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 prescriptions (
    row_id number,
    subject_id number,
    hadm_id number,
    startdate time,
    enddate time,
    drug text,
    dose_val_rx text,
    dose_unit_rx text,
    route text
)

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

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

CREATE TABLE procedures_icd (
    row_id number,
    subject_id number,
    hadm_id number,
    icd9_code text,
    charttime time
) ### Response: SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10624) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bands') AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month')


Instruction: After 1961, who as the Entrant when the engine was a Ferrari v8, and when the points were lower than 23?

Input:
CREATE TABLE table_name_64 (
    entrant VARCHAR,
    points VARCHAR,
    year VARCHAR,
    engine VARCHAR
)

Response: SELECT entrant FROM table_name_64 WHERE year > 1961 AND engine = "ferrari v8" AND points < 23

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: After 1961, who as the Entrant when the engine was a Ferrari v8, and when the points were lower than 23? ### Input: CREATE TABLE table_name_64 (
    entrant VARCHAR,
    points VARCHAR,
    year VARCHAR,
    engine VARCHAR
) ### Response: SELECT entrant FROM table_name_64 WHERE year > 1961 AND engine = "ferrari v8" AND points < 23


Instruction: What are the nationalities and the taotal ages of journalists. Visualize by a bar chart.

Input:
CREATE TABLE news_report (
    journalist_ID int,
    Event_ID int,
    Work_Type text
)

CREATE TABLE event (
    Event_ID int,
    Date text,
    Venue text,
    Name text,
    Event_Attendance int
)

CREATE TABLE journalist (
    journalist_ID int,
    Name text,
    Nationality text,
    Age text,
    Years_working int
)

Response: SELECT Nationality, SUM(Age) FROM journalist GROUP BY Nationality

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 nationalities and the taotal ages of journalists. Visualize by a bar chart. ### Input: CREATE TABLE news_report (
    journalist_ID int,
    Event_ID int,
    Work_Type text
)

CREATE TABLE event (
    Event_ID int,
    Date text,
    Venue text,
    Name text,
    Event_Attendance int
)

CREATE TABLE journalist (
    journalist_ID int,
    Name text,
    Nationality text,
    Age text,
    Years_working int
) ### Response: SELECT Nationality, SUM(Age) FROM journalist GROUP BY Nationality


Instruction: Which award was given for the role of Elphaba in 2009?

Input:
CREATE TABLE table_43430 (
    "Year" text,
    "Award" text,
    "Production" text,
    "Role" text,
    "Result" text
)

Response: SELECT "Award" FROM table_43430 WHERE "Role" = 'elphaba' AND "Year" = '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: Which award was given for the role of Elphaba in 2009? ### Input: CREATE TABLE table_43430 (
    "Year" text,
    "Award" text,
    "Production" text,
    "Role" text,
    "Result" text
) ### Response: SELECT "Award" FROM table_43430 WHERE "Role" = 'elphaba' AND "Year" = '2009'


Instruction: What was the result when incumbent Tom Steed was elected?

Input:
CREATE TABLE table_1342198_36 (
    result VARCHAR,
    incumbent VARCHAR
)

Response: SELECT result FROM table_1342198_36 WHERE incumbent = "Tom Steed"

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 result when incumbent Tom Steed was elected? ### Input: CREATE TABLE table_1342198_36 (
    result VARCHAR,
    incumbent VARCHAR
) ### Response: SELECT result FROM table_1342198_36 WHERE incumbent = "Tom Steed"


Instruction: Term Ending smaller than 2018, and a Nationality of new zealand what is the name?

Input:
CREATE TABLE table_5255 (
    "Name" text,
    "Nationality" text,
    "Position" text,
    "Tenure Began" real,
    "Term Ending" real
)

Response: SELECT "Name" FROM table_5255 WHERE "Term Ending" < '2018' AND "Nationality" = 'new zealand'

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: Term Ending smaller than 2018, and a Nationality of new zealand what is the name? ### Input: CREATE TABLE table_5255 (
    "Name" text,
    "Nationality" text,
    "Position" text,
    "Tenure Began" real,
    "Term Ending" real
) ### Response: SELECT "Name" FROM table_5255 WHERE "Term Ending" < '2018' AND "Nationality" = 'new zealand'


Instruction: What is the name of series episode 11-02's segment c?

Input:
CREATE TABLE table_15187735_11 (
    segment_c VARCHAR,
    series_ep VARCHAR
)

Response: SELECT segment_c FROM table_15187735_11 WHERE series_ep = "11-02"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of series episode 11-02's segment c? ### Input: CREATE TABLE table_15187735_11 (
    segment_c VARCHAR,
    series_ep VARCHAR
) ### Response: SELECT segment_c FROM table_15187735_11 WHERE series_ep = "11-02"


Instruction: Can you tell me the High rebounds that has the Date of november 5?

Input:
CREATE TABLE table_name_16 (
    high_rebounds VARCHAR,
    date VARCHAR
)

Response: SELECT high_rebounds FROM table_name_16 WHERE date = "november 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: Can you tell me the High rebounds that has the Date of november 5? ### Input: CREATE TABLE table_name_16 (
    high_rebounds VARCHAR,
    date VARCHAR
) ### Response: SELECT high_rebounds FROM table_name_16 WHERE date = "november 5"


Instruction: A bar chart shows the number of appellations whose score is higher than 93, and ordered by Name.

Input:
CREATE TABLE wine (
    No INTEGER,
    Grape TEXT,
    Winery TEXT,
    Appelation TEXT,
    State TEXT,
    Name TEXT,
    Year INTEGER,
    Price INTEGER,
    Score INTEGER,
    Cases INTEGER,
    Drink TEXT
)

CREATE TABLE appellations (
    No INTEGER,
    Appelation TEXT,
    County TEXT,
    State TEXT,
    Area TEXT,
    isAVA TEXT
)

CREATE TABLE grapes (
    ID INTEGER,
    Grape TEXT,
    Color TEXT
)

Response: SELECT Appelation, COUNT(Appelation) FROM wine WHERE Score > 93 GROUP BY Appelation ORDER BY Name

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart shows the number of appellations whose score is higher than 93, and ordered by Name. ### Input: CREATE TABLE wine (
    No INTEGER,
    Grape TEXT,
    Winery TEXT,
    Appelation TEXT,
    State TEXT,
    Name TEXT,
    Year INTEGER,
    Price INTEGER,
    Score INTEGER,
    Cases INTEGER,
    Drink TEXT
)

CREATE TABLE appellations (
    No INTEGER,
    Appelation TEXT,
    County TEXT,
    State TEXT,
    Area TEXT,
    isAVA TEXT
)

CREATE TABLE grapes (
    ID INTEGER,
    Grape TEXT,
    Color TEXT
) ### Response: SELECT Appelation, COUNT(Appelation) FROM wine WHERE Score > 93 GROUP BY Appelation ORDER BY Name


Instruction: what is minimum age of patients whose days of hospital stay is 29 and admission year is greater than or equal to 2107?

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

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

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

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

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

Response: SELECT MIN(demographic.age) FROM demographic WHERE demographic.days_stay = "29" AND demographic.admityear >= "2107"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is minimum age of patients whose days of hospital stay is 29 and admission year is greater than or equal to 2107? ### Input: CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
)

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

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

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

CREATE TABLE diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
) ### Response: SELECT MIN(demographic.age) FROM demographic WHERE demographic.days_stay = "29" AND demographic.admityear >= "2107"


Instruction: Which Surface has a Week of march 1?

Input:
CREATE TABLE table_8542 (
    "Tournament" text,
    "Surface" text,
    "Week" text,
    "Winner and score" text,
    "Finalist" text,
    "Semifinalists" text
)

Response: SELECT "Surface" FROM table_8542 WHERE "Week" = 'march 1'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Surface has a Week of march 1? ### Input: CREATE TABLE table_8542 (
    "Tournament" text,
    "Surface" text,
    "Week" text,
    "Winner and score" text,
    "Finalist" text,
    "Semifinalists" text
) ### Response: SELECT "Surface" FROM table_8542 WHERE "Week" = 'march 1'


Instruction: Find the names of all the product characteristics.

Input:
CREATE TABLE CHARACTERISTICS (
    characteristic_name VARCHAR
)

Response: SELECT DISTINCT characteristic_name FROM CHARACTERISTICS

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the names of all the product characteristics. ### Input: CREATE TABLE CHARACTERISTICS (
    characteristic_name VARCHAR
) ### Response: SELECT DISTINCT characteristic_name FROM CHARACTERISTICS


Instruction: on what date did the bears win by a difference of 27 points ?

Input:
CREATE TABLE table_204_207 (
    id number,
    "week" number,
    "date" text,
    "opponent" text,
    "result" text,
    "attendance" number,
    "bye" text
)

Response: SELECT "date" FROM table_204_207 WHERE "result" = 'w' AND "result" - "result" = 27

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: on what date did the bears win by a difference of 27 points ? ### Input: CREATE TABLE table_204_207 (
    id number,
    "week" number,
    "date" text,
    "opponent" text,
    "result" text,
    "attendance" number,
    "bye" text
) ### Response: SELECT "date" FROM table_204_207 WHERE "result" = 'w' AND "result" - "result" = 27


Instruction: Who was in 2nd leg when Boca Juniors was in home (1st leg)?

Input:
CREATE TABLE table_14219514_1 (
    home__1st_leg_ VARCHAR
)

Response: SELECT 2 AS nd_leg FROM table_14219514_1 WHERE home__1st_leg_ = "Boca Juniors"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was in 2nd leg when Boca Juniors was in home (1st leg)? ### Input: CREATE TABLE table_14219514_1 (
    home__1st_leg_ VARCHAR
) ### Response: SELECT 2 AS nd_leg FROM table_14219514_1 WHERE home__1st_leg_ = "Boca Juniors"