Instruction: Bar chart x axis dept code y axis minimal stu gpa, and display Y-axis in descending order.

Input:
CREATE TABLE EMPLOYEE (
    EMP_NUM int,
    EMP_LNAME varchar(15),
    EMP_FNAME varchar(12),
    EMP_INITIAL varchar(1),
    EMP_JOBCODE varchar(5),
    EMP_HIREDATE datetime,
    EMP_DOB datetime
)

CREATE TABLE DEPARTMENT (
    DEPT_CODE varchar(10),
    DEPT_NAME varchar(30),
    SCHOOL_CODE varchar(8),
    EMP_NUM int,
    DEPT_ADDRESS varchar(20),
    DEPT_EXTENSION varchar(4)
)

CREATE TABLE ENROLL (
    CLASS_CODE varchar(5),
    STU_NUM int,
    ENROLL_GRADE varchar(50)
)

CREATE TABLE COURSE (
    CRS_CODE varchar(10),
    DEPT_CODE varchar(10),
    CRS_DESCRIPTION varchar(35),
    CRS_CREDIT float(8)
)

CREATE TABLE PROFESSOR (
    EMP_NUM int,
    DEPT_CODE varchar(10),
    PROF_OFFICE varchar(50),
    PROF_EXTENSION varchar(4),
    PROF_HIGH_DEGREE varchar(5)
)

CREATE TABLE STUDENT (
    STU_NUM int,
    STU_LNAME varchar(15),
    STU_FNAME varchar(15),
    STU_INIT varchar(1),
    STU_DOB datetime,
    STU_HRS int,
    STU_CLASS varchar(2),
    STU_GPA float(8),
    STU_TRANSFER numeric,
    DEPT_CODE varchar(18),
    STU_PHONE varchar(4),
    PROF_NUM int
)

CREATE TABLE CLASS (
    CLASS_CODE varchar(5),
    CRS_CODE varchar(10),
    CLASS_SECTION varchar(2),
    CLASS_TIME varchar(20),
    CLASS_ROOM varchar(8),
    PROF_NUM int
)

Response: SELECT DEPT_CODE, MIN(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE ORDER BY MIN(STU_GPA) DESC

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Bar chart x axis dept code y axis minimal stu gpa, and display Y-axis in descending order. ### Input: CREATE TABLE EMPLOYEE (
    EMP_NUM int,
    EMP_LNAME varchar(15),
    EMP_FNAME varchar(12),
    EMP_INITIAL varchar(1),
    EMP_JOBCODE varchar(5),
    EMP_HIREDATE datetime,
    EMP_DOB datetime
)

CREATE TABLE DEPARTMENT (
    DEPT_CODE varchar(10),
    DEPT_NAME varchar(30),
    SCHOOL_CODE varchar(8),
    EMP_NUM int,
    DEPT_ADDRESS varchar(20),
    DEPT_EXTENSION varchar(4)
)

CREATE TABLE ENROLL (
    CLASS_CODE varchar(5),
    STU_NUM int,
    ENROLL_GRADE varchar(50)
)

CREATE TABLE COURSE (
    CRS_CODE varchar(10),
    DEPT_CODE varchar(10),
    CRS_DESCRIPTION varchar(35),
    CRS_CREDIT float(8)
)

CREATE TABLE PROFESSOR (
    EMP_NUM int,
    DEPT_CODE varchar(10),
    PROF_OFFICE varchar(50),
    PROF_EXTENSION varchar(4),
    PROF_HIGH_DEGREE varchar(5)
)

CREATE TABLE STUDENT (
    STU_NUM int,
    STU_LNAME varchar(15),
    STU_FNAME varchar(15),
    STU_INIT varchar(1),
    STU_DOB datetime,
    STU_HRS int,
    STU_CLASS varchar(2),
    STU_GPA float(8),
    STU_TRANSFER numeric,
    DEPT_CODE varchar(18),
    STU_PHONE varchar(4),
    PROF_NUM int
)

CREATE TABLE CLASS (
    CLASS_CODE varchar(5),
    CRS_CODE varchar(10),
    CLASS_SECTION varchar(2),
    CLASS_TIME varchar(20),
    CLASS_ROOM varchar(8),
    PROF_NUM int
) ### Response: SELECT DEPT_CODE, MIN(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE ORDER BY MIN(STU_GPA) DESC


Instruction: provide the maximum age of patients whose marital status is widowed and stayed in the hospital for 23 days.

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 MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "WIDOWED" AND demographic.days_stay = "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: provide the maximum age of patients whose marital status is widowed and stayed in the hospital for 23 days. ### 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 MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "WIDOWED" AND demographic.days_stay = "23"


Instruction: No Decision listed above has a visitor of Montreal.

Input:
CREATE TABLE table_name_62 (
    decision VARCHAR,
    visitor VARCHAR
)

Response: SELECT decision FROM table_name_62 WHERE visitor = "montreal"

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: No Decision listed above has a visitor of Montreal. ### Input: CREATE TABLE table_name_62 (
    decision VARCHAR,
    visitor VARCHAR
) ### Response: SELECT decision FROM table_name_62 WHERE visitor = "montreal"


Instruction: Which requirements do I need to meet for a CS-LSA degree ?

Input:
CREATE TABLE program_course (
    program_id int,
    course_id int,
    workload int,
    category 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 jobs (
    job_id int,
    job_title varchar,
    description varchar,
    requirement varchar,
    city varchar,
    state varchar,
    country varchar,
    zip int
)

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

CREATE TABLE course_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 program_requirement (
    program_id int,
    category varchar,
    min_credit int,
    additional_req varchar
)

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

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

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

CREATE TABLE instructor (
    instructor_id int,
    name varchar,
    uniqname 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 program (
    program_id int,
    name varchar,
    college varchar,
    introduction varchar
)

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 offering_instructor (
    offering_instructor_id int,
    offering_id int,
    instructor_id int
)

CREATE TABLE area (
    course_id int,
    area varchar
)

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

Response: SELECT DISTINCT program_requirement.additional_req, program_requirement.category, program_requirement.min_credit, program.name FROM program, program_requirement WHERE program.name LIKE '%CS-LSA%' AND program.program_id = program_requirement.program_id

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 requirements do I need to meet for a CS-LSA degree ? ### Input: CREATE TABLE program_course (
    program_id int,
    course_id int,
    workload int,
    category 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 jobs (
    job_id int,
    job_title varchar,
    description varchar,
    requirement varchar,
    city varchar,
    state varchar,
    country varchar,
    zip int
)

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

CREATE TABLE course_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 program_requirement (
    program_id int,
    category varchar,
    min_credit int,
    additional_req varchar
)

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

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

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

CREATE TABLE instructor (
    instructor_id int,
    name varchar,
    uniqname 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 program (
    program_id int,
    name varchar,
    college varchar,
    introduction varchar
)

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 offering_instructor (
    offering_instructor_id int,
    offering_id int,
    instructor_id int
)

CREATE TABLE area (
    course_id int,
    area varchar
)

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
) ### Response: SELECT DISTINCT program_requirement.additional_req, program_requirement.category, program_requirement.min_credit, program.name FROM program, program_requirement WHERE program.name LIKE '%CS-LSA%' AND program.program_id = program_requirement.program_id


Instruction: What player had the high point on July 7?

Input:
CREATE TABLE table_name_21 (
    high_points VARCHAR,
    date VARCHAR
)

Response: SELECT high_points FROM table_name_21 WHERE date = "july 7"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What player had the high point on July 7? ### Input: CREATE TABLE table_name_21 (
    high_points VARCHAR,
    date VARCHAR
) ### Response: SELECT high_points FROM table_name_21 WHERE date = "july 7"


Instruction: When did the team play an away game against the Toronto Eagles?

Input:
CREATE TABLE table_7343 (
    "Date" text,
    "Time" text,
    "Home" text,
    "Away" text,
    "Score" text,
    "Ground" text
)

Response: SELECT "Date" FROM table_7343 WHERE "Away" = 'toronto eagles'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When did the team play an away game against the Toronto Eagles? ### Input: CREATE TABLE table_7343 (
    "Date" text,
    "Time" text,
    "Home" text,
    "Away" text,
    "Score" text,
    "Ground" text
) ### Response: SELECT "Date" FROM table_7343 WHERE "Away" = 'toronto eagles'


Instruction: What Golden point(s) scorer has the Away Brisbane Broncos and Home South Sydney Rabbitohs?

Input:
CREATE TABLE table_name_14 (
    golden_point_s__scorer VARCHAR,
    away VARCHAR,
    home VARCHAR
)

Response: SELECT golden_point_s__scorer FROM table_name_14 WHERE away = "brisbane broncos" AND home = "south sydney rabbitohs"

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 Golden point(s) scorer has the Away Brisbane Broncos and Home South Sydney Rabbitohs? ### Input: CREATE TABLE table_name_14 (
    golden_point_s__scorer VARCHAR,
    away VARCHAR,
    home VARCHAR
) ### Response: SELECT golden_point_s__scorer FROM table_name_14 WHERE away = "brisbane broncos" AND home = "south sydney rabbitohs"


Instruction: What is Party, when Minister is 'Franco Frattini'?

Input:
CREATE TABLE table_name_55 (
    party VARCHAR,
    minister VARCHAR
)

Response: SELECT party FROM table_name_55 WHERE minister = "franco frattini"

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 Party, when Minister is 'Franco Frattini'? ### Input: CREATE TABLE table_name_55 (
    party VARCHAR,
    minister VARCHAR
) ### Response: SELECT party FROM table_name_55 WHERE minister = "franco frattini"


Instruction: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me about the distribution of job_id and the average of employee_id , and group by attribute job_id in a bar chart, could you rank in ascending by the X-axis?

Input:
CREATE TABLE regions (
    REGION_ID decimal(5,0),
    REGION_NAME varchar(25)
)

CREATE TABLE job_history (
    EMPLOYEE_ID decimal(6,0),
    START_DATE date,
    END_DATE date,
    JOB_ID varchar(10),
    DEPARTMENT_ID decimal(4,0)
)

CREATE TABLE locations (
    LOCATION_ID decimal(4,0),
    STREET_ADDRESS varchar(40),
    POSTAL_CODE varchar(12),
    CITY varchar(30),
    STATE_PROVINCE varchar(25),
    COUNTRY_ID varchar(2)
)

CREATE TABLE jobs (
    JOB_ID varchar(10),
    JOB_TITLE varchar(35),
    MIN_SALARY decimal(6,0),
    MAX_SALARY decimal(6,0)
)

CREATE TABLE departments (
    DEPARTMENT_ID decimal(4,0),
    DEPARTMENT_NAME varchar(30),
    MANAGER_ID decimal(6,0),
    LOCATION_ID decimal(4,0)
)

CREATE TABLE employees (
    EMPLOYEE_ID decimal(6,0),
    FIRST_NAME varchar(20),
    LAST_NAME varchar(25),
    EMAIL varchar(25),
    PHONE_NUMBER varchar(20),
    HIRE_DATE date,
    JOB_ID varchar(10),
    SALARY decimal(8,2),
    COMMISSION_PCT decimal(2,2),
    MANAGER_ID decimal(6,0),
    DEPARTMENT_ID decimal(4,0)
)

CREATE TABLE countries (
    COUNTRY_ID varchar(2),
    COUNTRY_NAME varchar(40),
    REGION_ID decimal(10,0)
)

Response: SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me about the distribution of job_id and the average of employee_id , and group by attribute job_id in a bar chart, could you rank in ascending by the X-axis? ### Input: CREATE TABLE regions (
    REGION_ID decimal(5,0),
    REGION_NAME varchar(25)
)

CREATE TABLE job_history (
    EMPLOYEE_ID decimal(6,0),
    START_DATE date,
    END_DATE date,
    JOB_ID varchar(10),
    DEPARTMENT_ID decimal(4,0)
)

CREATE TABLE locations (
    LOCATION_ID decimal(4,0),
    STREET_ADDRESS varchar(40),
    POSTAL_CODE varchar(12),
    CITY varchar(30),
    STATE_PROVINCE varchar(25),
    COUNTRY_ID varchar(2)
)

CREATE TABLE jobs (
    JOB_ID varchar(10),
    JOB_TITLE varchar(35),
    MIN_SALARY decimal(6,0),
    MAX_SALARY decimal(6,0)
)

CREATE TABLE departments (
    DEPARTMENT_ID decimal(4,0),
    DEPARTMENT_NAME varchar(30),
    MANAGER_ID decimal(6,0),
    LOCATION_ID decimal(4,0)
)

CREATE TABLE employees (
    EMPLOYEE_ID decimal(6,0),
    FIRST_NAME varchar(20),
    LAST_NAME varchar(25),
    EMAIL varchar(25),
    PHONE_NUMBER varchar(20),
    HIRE_DATE date,
    JOB_ID varchar(10),
    SALARY decimal(8,2),
    COMMISSION_PCT decimal(2,2),
    MANAGER_ID decimal(6,0),
    DEPARTMENT_ID decimal(4,0)
)

CREATE TABLE countries (
    COUNTRY_ID varchar(2),
    COUNTRY_NAME varchar(40),
    REGION_ID decimal(10,0)
) ### Response: SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID


Instruction: What is the size of the windfarm in wexford that has more than 19 turbines and a vendor of Enercon?

Input:
CREATE TABLE table_39540 (
    "Wind Farm" text,
    "Capacity (MW)" real,
    "Turbines" real,
    "Turbine Vendor" text,
    "Size (MW)" text,
    "County" text
)

Response: SELECT "Size (MW)" FROM table_39540 WHERE "Turbines" > '19' AND "Turbine Vendor" = 'enercon' AND "County" = 'wexford'

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 size of the windfarm in wexford that has more than 19 turbines and a vendor of Enercon? ### Input: CREATE TABLE table_39540 (
    "Wind Farm" text,
    "Capacity (MW)" real,
    "Turbines" real,
    "Turbine Vendor" text,
    "Size (MW)" text,
    "County" text
) ### Response: SELECT "Size (MW)" FROM table_39540 WHERE "Turbines" > '19' AND "Turbine Vendor" = 'enercon' AND "County" = 'wexford'


Instruction: What is the maximum 2006 census population of LGA name Opobo/Nkoro?

Input:
CREATE TABLE table_23155 (
    "LGA Name" text,
    "Area (km 2 )" real,
    "Census 2006 population" real,
    "Administrative capital" text,
    "Postal Code" real
)

Response: SELECT MAX("Census 2006 population") FROM table_23155 WHERE "LGA Name" = 'Opobo/Nkoro'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the maximum 2006 census population of LGA name Opobo/Nkoro? ### Input: CREATE TABLE table_23155 (
    "LGA Name" text,
    "Area (km 2 )" real,
    "Census 2006 population" real,
    "Administrative capital" text,
    "Postal Code" real
) ### Response: SELECT MAX("Census 2006 population") FROM table_23155 WHERE "LGA Name" = 'Opobo/Nkoro'


Instruction: Which Jushin Liger has a Gran Hamada of kendo kashin?

Input:
CREATE TABLE table_name_60 (
    jushin_liger VARCHAR,
    gran_hamada VARCHAR
)

Response: SELECT jushin_liger FROM table_name_60 WHERE gran_hamada = "kendo kashin"

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 Jushin Liger has a Gran Hamada of kendo kashin? ### Input: CREATE TABLE table_name_60 (
    jushin_liger VARCHAR,
    gran_hamada VARCHAR
) ### Response: SELECT jushin_liger FROM table_name_60 WHERE gran_hamada = "kendo kashin"


Instruction: What engine has an output of ps (kw; hp) @4700 rpm?

Input:
CREATE TABLE table_60251 (
    "Name" text,
    "Volume" text,
    "Engine" text,
    "Fuel" text,
    "Output" text,
    "Torque" text,
    "Engine ID code(s)" text,
    "0\u2013100km/h,s" real,
    "Top speed" text,
    "Years" text
)

Response: SELECT "Engine" FROM table_60251 WHERE "Output" = 'ps (kw; hp) @4700 rpm'

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 engine has an output of ps (kw; hp) @4700 rpm? ### Input: CREATE TABLE table_60251 (
    "Name" text,
    "Volume" text,
    "Engine" text,
    "Fuel" text,
    "Output" text,
    "Torque" text,
    "Engine ID code(s)" text,
    "0\u2013100km/h,s" real,
    "Top speed" text,
    "Years" text
) ### Response: SELECT "Engine" FROM table_60251 WHERE "Output" = 'ps (kw; hp) @4700 rpm'


Instruction: Who was the HP winning team when the EP winning team was Hans Zereis and the GM winning team was Charles Gibson?

Input:
CREATE TABLE table_31014 (
    "Rnd" text,
    "Circuit" text,
    "AP Winning Team" text,
    "BP Winning Team" text,
    "CM Winning Team" text,
    "CP Winning Team" text,
    "DM Winning Team" text,
    "DP Winning Team" text,
    "EM Winning Team" text,
    "EP Winning Team" text,
    "FM Winning Team" text,
    "FP Winning Team" text,
    "GM Winning Team" text,
    "GP Winning Team" text,
    "HM Winning Team" text,
    "HP Winning Team" text,
    "Results" text
)

Response: SELECT "HP Winning Team" FROM table_31014 WHERE "EP Winning Team" = 'Hans Zereis' AND "GM Winning Team" = 'Charles Gibson'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the HP winning team when the EP winning team was Hans Zereis and the GM winning team was Charles Gibson? ### Input: CREATE TABLE table_31014 (
    "Rnd" text,
    "Circuit" text,
    "AP Winning Team" text,
    "BP Winning Team" text,
    "CM Winning Team" text,
    "CP Winning Team" text,
    "DM Winning Team" text,
    "DP Winning Team" text,
    "EM Winning Team" text,
    "EP Winning Team" text,
    "FM Winning Team" text,
    "FP Winning Team" text,
    "GM Winning Team" text,
    "GP Winning Team" text,
    "HM Winning Team" text,
    "HP Winning Team" text,
    "Results" text
) ### Response: SELECT "HP Winning Team" FROM table_31014 WHERE "EP Winning Team" = 'Hans Zereis' AND "GM Winning Team" = 'Charles Gibson'


Instruction: What mean number of extra points was there when James Lawrence was a player and the touchdown number was less than 1?

Input:
CREATE TABLE table_name_7 (
    extra_points INTEGER,
    player VARCHAR,
    touchdowns VARCHAR
)

Response: SELECT AVG(extra_points) FROM table_name_7 WHERE player = "james lawrence" AND touchdowns < 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 mean number of extra points was there when James Lawrence was a player and the touchdown number was less than 1? ### Input: CREATE TABLE table_name_7 (
    extra_points INTEGER,
    player VARCHAR,
    touchdowns VARCHAR
) ### Response: SELECT AVG(extra_points) FROM table_name_7 WHERE player = "james lawrence" AND touchdowns < 1


Instruction: who is the only player to have denmark listed as their nationality ?

Input:
CREATE TABLE table_203_305 (
    id number,
    "round" number,
    "#" number,
    "player" text,
    "nationality" text,
    "college/junior/club team (league)" text
)

Response: SELECT "player" FROM table_203_305 WHERE "nationality" = 'denmark'

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 only player to have denmark listed as their nationality ? ### Input: CREATE TABLE table_203_305 (
    id number,
    "round" number,
    "#" number,
    "player" text,
    "nationality" text,
    "college/junior/club team (league)" text
) ### Response: SELECT "player" FROM table_203_305 WHERE "nationality" = 'denmark'


Instruction: count the number of dead patients who were diagnosed with noninf gastroenterit nec.

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

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

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

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

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.short_title = "Noninf gastroenterit NEC"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of dead patients who were diagnosed with noninf gastroenterit nec. ### Input: CREATE TABLE diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

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

CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.short_title = "Noninf gastroenterit NEC"


Instruction: What year and where was the tournament when fan ying won the womens singles?

Input:
CREATE TABLE table_28138035_26 (
    year_location VARCHAR,
    womens_singles VARCHAR
)

Response: SELECT year_location FROM table_28138035_26 WHERE womens_singles = "Fan Ying"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What year and where was the tournament when fan ying won the womens singles? ### Input: CREATE TABLE table_28138035_26 (
    year_location VARCHAR,
    womens_singles VARCHAR
) ### Response: SELECT year_location FROM table_28138035_26 WHERE womens_singles = "Fan Ying"


Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of phone_number and employee_id , show X-axis in desc order please.

Input:
CREATE TABLE countries (
    COUNTRY_ID varchar(2),
    COUNTRY_NAME varchar(40),
    REGION_ID decimal(10,0)
)

CREATE TABLE jobs (
    JOB_ID varchar(10),
    JOB_TITLE varchar(35),
    MIN_SALARY decimal(6,0),
    MAX_SALARY decimal(6,0)
)

CREATE TABLE departments (
    DEPARTMENT_ID decimal(4,0),
    DEPARTMENT_NAME varchar(30),
    MANAGER_ID decimal(6,0),
    LOCATION_ID decimal(4,0)
)

CREATE TABLE employees (
    EMPLOYEE_ID decimal(6,0),
    FIRST_NAME varchar(20),
    LAST_NAME varchar(25),
    EMAIL varchar(25),
    PHONE_NUMBER varchar(20),
    HIRE_DATE date,
    JOB_ID varchar(10),
    SALARY decimal(8,2),
    COMMISSION_PCT decimal(2,2),
    MANAGER_ID decimal(6,0),
    DEPARTMENT_ID decimal(4,0)
)

CREATE TABLE job_history (
    EMPLOYEE_ID decimal(6,0),
    START_DATE date,
    END_DATE date,
    JOB_ID varchar(10),
    DEPARTMENT_ID decimal(4,0)
)

CREATE TABLE regions (
    REGION_ID decimal(5,0),
    REGION_NAME varchar(25)
)

CREATE TABLE locations (
    LOCATION_ID decimal(4,0),
    STREET_ADDRESS varchar(40),
    POSTAL_CODE varchar(12),
    CITY varchar(30),
    STATE_PROVINCE varchar(25),
    COUNTRY_ID varchar(2)
)

Response: SELECT PHONE_NUMBER, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER DESC

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of phone_number and employee_id , show X-axis in desc order please. ### Input: CREATE TABLE countries (
    COUNTRY_ID varchar(2),
    COUNTRY_NAME varchar(40),
    REGION_ID decimal(10,0)
)

CREATE TABLE jobs (
    JOB_ID varchar(10),
    JOB_TITLE varchar(35),
    MIN_SALARY decimal(6,0),
    MAX_SALARY decimal(6,0)
)

CREATE TABLE departments (
    DEPARTMENT_ID decimal(4,0),
    DEPARTMENT_NAME varchar(30),
    MANAGER_ID decimal(6,0),
    LOCATION_ID decimal(4,0)
)

CREATE TABLE employees (
    EMPLOYEE_ID decimal(6,0),
    FIRST_NAME varchar(20),
    LAST_NAME varchar(25),
    EMAIL varchar(25),
    PHONE_NUMBER varchar(20),
    HIRE_DATE date,
    JOB_ID varchar(10),
    SALARY decimal(8,2),
    COMMISSION_PCT decimal(2,2),
    MANAGER_ID decimal(6,0),
    DEPARTMENT_ID decimal(4,0)
)

CREATE TABLE job_history (
    EMPLOYEE_ID decimal(6,0),
    START_DATE date,
    END_DATE date,
    JOB_ID varchar(10),
    DEPARTMENT_ID decimal(4,0)
)

CREATE TABLE regions (
    REGION_ID decimal(5,0),
    REGION_NAME varchar(25)
)

CREATE TABLE locations (
    LOCATION_ID decimal(4,0),
    STREET_ADDRESS varchar(40),
    POSTAL_CODE varchar(12),
    CITY varchar(30),
    STATE_PROVINCE varchar(25),
    COUNTRY_ID varchar(2)
) ### Response: SELECT PHONE_NUMBER, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER DESC


Instruction: What label shows an Album of cover version v?

Input:
CREATE TABLE table_name_24 (
    label VARCHAR,
    album VARCHAR
)

Response: SELECT label FROM table_name_24 WHERE album = "cover version v"

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 label shows an Album of cover version v? ### Input: CREATE TABLE table_name_24 (
    label VARCHAR,
    album VARCHAR
) ### Response: SELECT label FROM table_name_24 WHERE album = "cover version v"


Instruction: What genre was Music in the Air?

Input:
CREATE TABLE table_name_7 (
    genre VARCHAR,
    title VARCHAR
)

Response: SELECT genre FROM table_name_7 WHERE title = "music in the air"

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 genre was Music in the Air? ### Input: CREATE TABLE table_name_7 (
    genre VARCHAR,
    title VARCHAR
) ### Response: SELECT genre FROM table_name_7 WHERE title = "music in the air"


Instruction: In how many counties di McCain win 41.62% of the vote?

Input:
CREATE TABLE table_23740 (
    "County" text,
    "Obama%" text,
    "Obama#" real,
    "McCain%" text,
    "McCain#" real
)

Response: SELECT COUNT("County") FROM table_23740 WHERE "McCain%" = '41.62%'

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 how many counties di McCain win 41.62% of the vote? ### Input: CREATE TABLE table_23740 (
    "County" text,
    "Obama%" text,
    "Obama#" real,
    "McCain%" text,
    "McCain#" real
) ### Response: SELECT COUNT("County") FROM table_23740 WHERE "McCain%" = '41.62%'


Instruction: What is the date of appointment for outgoing manager Campbell Money

Input:
CREATE TABLE table_11206916_2 (
    date_of_appointment VARCHAR,
    outgoing_manager VARCHAR
)

Response: SELECT date_of_appointment FROM table_11206916_2 WHERE outgoing_manager = "Campbell Money"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the date of appointment for outgoing manager Campbell Money ### Input: CREATE TABLE table_11206916_2 (
    date_of_appointment VARCHAR,
    outgoing_manager VARCHAR
) ### Response: SELECT date_of_appointment FROM table_11206916_2 WHERE outgoing_manager = "Campbell Money"


Instruction: What year was the winners vote 55.99%?

Input:
CREATE TABLE table_1808 (
    "Year" real,
    "Lok Sabha" text,
    "Members of Parliament" text,
    "Party Won" text,
    "Winners % votes" text,
    "Trailing Party" text,
    "Trailing Party % votes" text
)

Response: SELECT MIN("Year") FROM table_1808 WHERE "Winners % votes" = '55.99%'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What year was the winners vote 55.99%? ### Input: CREATE TABLE table_1808 (
    "Year" real,
    "Lok Sabha" text,
    "Members of Parliament" text,
    "Party Won" text,
    "Winners % votes" text,
    "Trailing Party" text,
    "Trailing Party % votes" text
) ### Response: SELECT MIN("Year") FROM table_1808 WHERE "Winners % votes" = '55.99%'


Instruction: What is the lowest number of points of the team with 2 losses and a lower than 1 position?

Input:
CREATE TABLE table_name_73 (
    points INTEGER,
    losses VARCHAR,
    position VARCHAR
)

Response: SELECT MIN(points) FROM table_name_73 WHERE losses = 2 AND position > 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 lowest number of points of the team with 2 losses and a lower than 1 position? ### Input: CREATE TABLE table_name_73 (
    points INTEGER,
    losses VARCHAR,
    position VARCHAR
) ### Response: SELECT MIN(points) FROM table_name_73 WHERE losses = 2 AND position > 1


Instruction: What is the away team's score when the Home team score is 14.18 (102)?

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

Response: SELECT "Away team score" FROM table_57966 WHERE "Home team score" = '14.18 (102)'

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 away team's score when the Home team score is 14.18 (102)? ### Input: CREATE TABLE table_57966 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
) ### Response: SELECT "Away team score" FROM table_57966 WHERE "Home team score" = '14.18 (102)'


Instruction: what label was italy on ?

Input:
CREATE TABLE table_204_966 (
    id number,
    "region" text,
    "date" text,
    "label" text,
    "format" text,
    "catalog" text
)

Response: SELECT "label" FROM table_204_966 WHERE "region" = 'italy'

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 label was italy on ? ### Input: CREATE TABLE table_204_966 (
    id number,
    "region" text,
    "date" text,
    "label" text,
    "format" text,
    "catalog" text
) ### Response: SELECT "label" FROM table_204_966 WHERE "region" = 'italy'


Instruction: What national has 4.45 for o and 4.55 for xo?

Input:
CREATE TABLE table_65762 (
    "Name" text,
    "Nationality" text,
    "4.30" text,
    "4.45" text,
    "4.55" text,
    "Result" real
)

Response: SELECT "Nationality" FROM table_65762 WHERE "4.45" = 'o' AND "4.55" = 'xo'

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 national has 4.45 for o and 4.55 for xo? ### Input: CREATE TABLE table_65762 (
    "Name" text,
    "Nationality" text,
    "4.30" text,
    "4.45" text,
    "4.55" text,
    "Result" real
) ### Response: SELECT "Nationality" FROM table_65762 WHERE "4.45" = 'o' AND "4.55" = 'xo'


Instruction: Return the average money requested across all entrepreneurs.

Input:
CREATE TABLE people (
    people_id number,
    name text,
    height number,
    weight number,
    date_of_birth text
)

CREATE TABLE entrepreneur (
    entrepreneur_id number,
    people_id number,
    company text,
    money_requested number,
    investor text
)

Response: SELECT AVG(money_requested) FROM entrepreneur

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return the average money requested across all entrepreneurs. ### Input: CREATE TABLE people (
    people_id number,
    name text,
    height number,
    weight number,
    date_of_birth text
)

CREATE TABLE entrepreneur (
    entrepreneur_id number,
    people_id number,
    company text,
    money_requested number,
    investor text
) ### Response: SELECT AVG(money_requested) FROM entrepreneur


Instruction: What core clocks ( mhz ) have a 21.3 memory bandwidth ( gb/s )?

Input:
CREATE TABLE table_28157 (
    "Graphics" text,
    "Launch" real,
    "Market" text,
    "CPU" text,
    "Code name" text,
    "Device ID" real,
    "Core clock ( MHz )" text,
    "Execution units" real,
    "Shader model" text,
    "DirectX" text,
    "OpenGL" text,
    "OpenCL" text,
    "Memory bandwidth ( GB/s )" text,
    "DVMT ( MB )" real,
    "CVT HD" text,
    "QSV" text
)

Response: SELECT "Core clock ( MHz )" FROM table_28157 WHERE "Memory bandwidth ( GB/s )" = '21.3'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What core clocks ( mhz ) have a 21.3 memory bandwidth ( gb/s )? ### Input: CREATE TABLE table_28157 (
    "Graphics" text,
    "Launch" real,
    "Market" text,
    "CPU" text,
    "Code name" text,
    "Device ID" real,
    "Core clock ( MHz )" text,
    "Execution units" real,
    "Shader model" text,
    "DirectX" text,
    "OpenGL" text,
    "OpenCL" text,
    "Memory bandwidth ( GB/s )" text,
    "DVMT ( MB )" real,
    "CVT HD" text,
    "QSV" text
) ### Response: SELECT "Core clock ( MHz )" FROM table_28157 WHERE "Memory bandwidth ( GB/s )" = '21.3'


Instruction: Who the GM winning team when the EP winning team was #37 Porsche?

Input:
CREATE TABLE table_31012 (
    "Rnd" text,
    "Circuit" text,
    "AP Winning Team" text,
    "BP Winning Team" text,
    "CM Winning Team" text,
    "CP Winning Team" text,
    "DM Winning Team" text,
    "DP Winning Team" text,
    "EM Winning Team" text,
    "EP Winning Team" text,
    "FM Winning Team" text,
    "FP Winning Team" text,
    "GM Winning Team" text,
    "GP Winning Team" text,
    "HM Winning Team" text,
    "HP Winning Team" text,
    "Results" text
)

Response: SELECT "GM Winning Team" FROM table_31012 WHERE "EP Winning Team" = '#37 Porsche'

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 the GM winning team when the EP winning team was #37 Porsche? ### Input: CREATE TABLE table_31012 (
    "Rnd" text,
    "Circuit" text,
    "AP Winning Team" text,
    "BP Winning Team" text,
    "CM Winning Team" text,
    "CP Winning Team" text,
    "DM Winning Team" text,
    "DP Winning Team" text,
    "EM Winning Team" text,
    "EP Winning Team" text,
    "FM Winning Team" text,
    "FP Winning Team" text,
    "GM Winning Team" text,
    "GP Winning Team" text,
    "HM Winning Team" text,
    "HP Winning Team" text,
    "Results" text
) ### Response: SELECT "GM Winning Team" FROM table_31012 WHERE "EP Winning Team" = '#37 Porsche'


Instruction: What is their position when the b score is more than 8.975 for Ekaterina Kramarenko ( rus )?

Input:
CREATE TABLE table_name_57 (
    position VARCHAR,
    b_score VARCHAR,
    gymnast VARCHAR
)

Response: SELECT position FROM table_name_57 WHERE b_score > 8.975 AND gymnast = "ekaterina kramarenko ( rus )"

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 their position when the b score is more than 8.975 for Ekaterina Kramarenko ( rus )? ### Input: CREATE TABLE table_name_57 (
    position VARCHAR,
    b_score VARCHAR,
    gymnast VARCHAR
) ### Response: SELECT position FROM table_name_57 WHERE b_score > 8.975 AND gymnast = "ekaterina kramarenko ( rus )"


Instruction: known renal disease with a baseline serum creatinine > 1.5 mg / dl

Input:
CREATE TABLE table_train_157 (
    "id" int,
    "gender" string,
    "systolic_blood_pressure_sbp" int,
    "hemoglobin_a1c_hba1c" float,
    "platelets" int,
    "renal_disease" bool,
    "c_reactive_protein" float,
    "creatinine_clearance_cl" float,
    "urine_protein" int,
    "serum_creatinine" float,
    "proteinuria" int,
    "NOUSE" float
)

Response: SELECT * FROM table_train_157 WHERE renal_disease = 1 AND serum_creatinine > 1.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: known renal disease with a baseline serum creatinine > 1.5 mg / dl ### Input: CREATE TABLE table_train_157 (
    "id" int,
    "gender" string,
    "systolic_blood_pressure_sbp" int,
    "hemoglobin_a1c_hba1c" float,
    "platelets" int,
    "renal_disease" bool,
    "c_reactive_protein" float,
    "creatinine_clearance_cl" float,
    "urine_protein" int,
    "serum_creatinine" float,
    "proteinuria" int,
    "NOUSE" float
) ### Response: SELECT * FROM table_train_157 WHERE renal_disease = 1 AND serum_creatinine > 1.5


Instruction: List the dates and vote percents of elections.

Input:
CREATE TABLE election (
    Date VARCHAR,
    Vote_Percent VARCHAR
)

Response: SELECT Date, Vote_Percent FROM election

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: List the dates and vote percents of elections. ### Input: CREATE TABLE election (
    Date VARCHAR,
    Vote_Percent VARCHAR
) ### Response: SELECT Date, Vote_Percent FROM election


Instruction: which date had the least attendance ?

Input:
CREATE TABLE table_204_123 (
    id number,
    "week" number,
    "date" text,
    "kickoff" text,
    "opponent" text,
    "results\nfinal score" text,
    "results\nteam record" text,
    "game site" text,
    "attendance" number
)

Response: SELECT "date" FROM table_204_123 ORDER BY "attendance" LIMIT 1

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which date had the least attendance ? ### Input: CREATE TABLE table_204_123 (
    id number,
    "week" number,
    "date" text,
    "kickoff" text,
    "opponent" text,
    "results\nfinal score" text,
    "results\nteam record" text,
    "game site" text,
    "attendance" number
) ### Response: SELECT "date" FROM table_204_123 ORDER BY "attendance" LIMIT 1


Instruction: What enrollement would you expect if you were attending the university in St. Louis?

Input:
CREATE TABLE table_2319 (
    "School" text,
    "Location(s)" text,
    "Control" text,
    "Type" text,
    "Enrollment" real,
    "Founded" real
)

Response: SELECT "Enrollment" FROM table_2319 WHERE "Location(s)" = 'St. Louis'

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 enrollement would you expect if you were attending the university in St. Louis? ### Input: CREATE TABLE table_2319 (
    "School" text,
    "Location(s)" text,
    "Control" text,
    "Type" text,
    "Enrollment" real,
    "Founded" real
) ### Response: SELECT "Enrollment" FROM table_2319 WHERE "Location(s)" = 'St. Louis'


Instruction: what is the total number of painters who scored 12 in composition ?

Input:
CREATE TABLE table_203_186 (
    id number,
    "painter" text,
    "composition" number,
    "drawing" number,
    "color" number,
    "expression" number
)

Response: SELECT COUNT("painter") FROM table_203_186 WHERE "composition" = 12

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the total number of painters who scored 12 in composition ? ### Input: CREATE TABLE table_203_186 (
    id number,
    "painter" text,
    "composition" number,
    "drawing" number,
    "color" number,
    "expression" number
) ### Response: SELECT COUNT("painter") FROM table_203_186 WHERE "composition" = 12


Instruction: Who were the away teams when the competition was the 1st republic of srpska football day and the home team was u 14 republic of srpska?

Input:
CREATE TABLE table_29728596_2 (
    away_team VARCHAR,
    competition VARCHAR,
    home_team VARCHAR
)

Response: SELECT away_team FROM table_29728596_2 WHERE competition = "1st ``Republic of Srpska Football Day``" AND home_team = "U 14 Republic of Srpska"

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 away teams when the competition was the 1st republic of srpska football day and the home team was u 14 republic of srpska? ### Input: CREATE TABLE table_29728596_2 (
    away_team VARCHAR,
    competition VARCHAR,
    home_team VARCHAR
) ### Response: SELECT away_team FROM table_29728596_2 WHERE competition = "1st ``Republic of Srpska Football Day``" AND home_team = "U 14 Republic of Srpska"


Instruction: Which chassis did fondmetal f1 spa use after 1990?

Input:
CREATE TABLE table_name_32 (
    chassis VARCHAR,
    year VARCHAR,
    entrant VARCHAR
)

Response: SELECT chassis FROM table_name_32 WHERE year > 1990 AND entrant = "fondmetal f1 spa"

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 chassis did fondmetal f1 spa use after 1990? ### Input: CREATE TABLE table_name_32 (
    chassis VARCHAR,
    year VARCHAR,
    entrant VARCHAR
) ### Response: SELECT chassis FROM table_name_32 WHERE year > 1990 AND entrant = "fondmetal f1 spa"


Instruction: what is the number of patients who are in ward 650 until 2104?

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

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

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

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

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

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

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

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

Response: SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 650 AND STRFTIME('%y', patient.unitadmittime) <= '2104'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients who are in ward 650 until 2104? ### Input: CREATE TABLE microlab (
    microlabid number,
    patientunitstayid number,
    culturesite text,
    organism text,
    culturetakentime time
)

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

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

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

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

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

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

CREATE TABLE vitalperiodic (
    vitalperiodicid number,
    patientunitstayid number,
    temperature number,
    sao2 number,
    heartrate number,
    respiration number,
    systemicsystolic number,
    systemicdiastolic number,
    systemicmean number,
    observationtime time
) ### Response: SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 650 AND STRFTIME('%y', patient.unitadmittime) <= '2104'


Instruction: How far is the olbia to sassari route?

Input:
CREATE TABLE table_10194 (
    "Date" text,
    "Course" text,
    "Distance" text,
    "Type" text,
    "Winner" text
)

Response: SELECT "Distance" FROM table_10194 WHERE "Course" = 'olbia to sassari'

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 far is the olbia to sassari route? ### Input: CREATE TABLE table_10194 (
    "Date" text,
    "Course" text,
    "Distance" text,
    "Type" text,
    "Winner" text
) ### Response: SELECT "Distance" FROM table_10194 WHERE "Course" = 'olbia to sassari'


Instruction: What competition was held 1 March 1909?

Input:
CREATE TABLE table_4377 (
    "Date" text,
    "Venue" text,
    "Score" text,
    "Result" text,
    "Competition" text
)

Response: SELECT "Competition" FROM table_4377 WHERE "Date" = '1 march 1909'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What competition was held 1 March 1909? ### Input: CREATE TABLE table_4377 (
    "Date" text,
    "Venue" text,
    "Score" text,
    "Result" text,
    "Competition" text
) ### Response: SELECT "Competition" FROM table_4377 WHERE "Date" = '1 march 1909'


Instruction: can you find the top entered service ?

Input:
CREATE TABLE table_204_882 (
    id number,
    "number" number,
    "builder" text,
    "entered service" text,
    "withdrawn" text,
    "notes" text
)

Response: SELECT "entered service" FROM table_204_882 WHERE id = 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: can you find the top entered service ? ### Input: CREATE TABLE table_204_882 (
    id number,
    "number" number,
    "builder" text,
    "entered service" text,
    "withdrawn" text,
    "notes" text
) ### Response: SELECT "entered service" FROM table_204_882 WHERE id = 1


Instruction: provide the number of patients whose ethnicity is black/cape verdean and age is less than 68?

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

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

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

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.age < "68"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose ethnicity is black/cape verdean and age is less than 68? ### 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 procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.age < "68"


Instruction: Name the 2011 when 2010 is 2r

Input:
CREATE TABLE table_80361 (
    "Tournament" text,
    "2008" text,
    "2009" text,
    "2010" text,
    "2011" text,
    "2012" text
)

Response: SELECT "2011" FROM table_80361 WHERE "2010" = '2r'

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 2011 when 2010 is 2r ### Input: CREATE TABLE table_80361 (
    "Tournament" text,
    "2008" text,
    "2009" text,
    "2010" text,
    "2011" text,
    "2012" text
) ### Response: SELECT "2011" FROM table_80361 WHERE "2010" = '2r'


Instruction: What was the title of series number 56?

Input:
CREATE TABLE table_2468961_4 (
    title VARCHAR,
    no_in_series VARCHAR
)

Response: SELECT title FROM table_2468961_4 WHERE no_in_series = 56

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 title of series number 56? ### Input: CREATE TABLE table_2468961_4 (
    title VARCHAR,
    no_in_series VARCHAR
) ### Response: SELECT title FROM table_2468961_4 WHERE no_in_series = 56


Instruction: What was the championship during the match with the opponent of richard fromberg?

Input:
CREATE TABLE table_9055 (
    "Outcome" text,
    "Date" real,
    "Championship" text,
    "Surface" text,
    "Opponent" text,
    "Score" text
)

Response: SELECT "Championship" FROM table_9055 WHERE "Opponent" = 'richard fromberg'

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 championship during the match with the opponent of richard fromberg? ### Input: CREATE TABLE table_9055 (
    "Outcome" text,
    "Date" real,
    "Championship" text,
    "Surface" text,
    "Opponent" text,
    "Score" text
) ### Response: SELECT "Championship" FROM table_9055 WHERE "Opponent" = 'richard fromberg'


Instruction: Name the most revenue for operating income more than 27 for hamburg and debt as % of value less than 0

Input:
CREATE TABLE table_68346 (
    "Rank" real,
    "Team" text,
    "Country" text,
    "Value ($M)" real,
    "Debt as % of value" real,
    "% change on year" text,
    "Revenue ($M)" real,
    "Operating income ($m)" real
)

Response: SELECT MAX("Revenue ($M)") FROM table_68346 WHERE "Operating income ($m)" > '27' AND "Team" = 'hamburg' AND "Debt as % of value" < '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: Name the most revenue for operating income more than 27 for hamburg and debt as % of value less than 0 ### Input: CREATE TABLE table_68346 (
    "Rank" real,
    "Team" text,
    "Country" text,
    "Value ($M)" real,
    "Debt as % of value" real,
    "% change on year" text,
    "Revenue ($M)" real,
    "Operating income ($m)" real
) ### Response: SELECT MAX("Revenue ($M)") FROM table_68346 WHERE "Operating income ($m)" > '27' AND "Team" = 'hamburg' AND "Debt as % of value" < '0'


Instruction: What is the result for game 5?

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

Response: SELECT "Result" FROM table_9742 WHERE "Game" = 'game 5'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the result for game 5? ### Input: CREATE TABLE table_9742 (
    "Game" text,
    "Date" text,
    "Home Team" text,
    "Result" text,
    "Road Team" text
) ### Response: SELECT "Result" FROM table_9742 WHERE "Game" = 'game 5'


Instruction: count the number of patients who were diagnosed with oth nonauto hem anemia and did not come back to the hospital within 2 months in 2103.

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

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

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

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

CREATE TABLE 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 outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value number
)

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

CREATE TABLE inputevents_cv (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    amount 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 chartevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
)

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

CREATE TABLE 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 microbiologyevents (
    row_id number,
    subject_id number,
    hadm_id number,
    charttime time,
    spec_type_desc text,
    org_name text
)

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

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

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

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

Response: SELECT (SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'oth nonauto hem anemia') AND STRFTIME('%y', diagnoses_icd.charttime) = '2103') AS t1) - (SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'oth nonauto hem anemia') AND STRFTIME('%y', diagnoses_icd.charttime) = '2103') AS t2 JOIN admissions ON t2.subject_id = admissions.subject_id WHERE t2.charttime < admissions.admittime AND STRFTIME('%y', admissions.admittime) = '2103' AND DATETIME(admissions.admittime) BETWEEN DATETIME(t2.charttime) AND DATETIME(t2.charttime, '+2 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: count the number of patients who were diagnosed with oth nonauto hem anemia and did not come back to the hospital within 2 months in 2103. ### Input: CREATE TABLE patients (
    row_id number,
    subject_id number,
    gender text,
    dob time,
    dod time
)

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

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

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

CREATE TABLE 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 outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value number
)

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

CREATE TABLE inputevents_cv (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    amount 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 chartevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
)

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

CREATE TABLE 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 microbiologyevents (
    row_id number,
    subject_id number,
    hadm_id number,
    charttime time,
    spec_type_desc text,
    org_name text
)

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

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

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

CREATE TABLE icustays (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    first_careunit text,
    last_careunit text,
    first_wardid number,
    last_wardid number,
    intime time,
    outtime time
) ### Response: SELECT (SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'oth nonauto hem anemia') AND STRFTIME('%y', diagnoses_icd.charttime) = '2103') AS t1) - (SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'oth nonauto hem anemia') AND STRFTIME('%y', diagnoses_icd.charttime) = '2103') AS t2 JOIN admissions ON t2.subject_id = admissions.subject_id WHERE t2.charttime < admissions.admittime AND STRFTIME('%y', admissions.admittime) = '2103' AND DATETIME(admissions.admittime) BETWEEN DATETIME(t2.charttime) AND DATETIME(t2.charttime, '+2 month'))


Instruction: What school has the Lancers as their mascot?

Input:
CREATE TABLE table_65693 (
    "School" text,
    "Location" text,
    "Mascot" text,
    "Enrollment" real,
    "IHSAA Class" text,
    "IHSAA Football Class" text,
    "County" text
)

Response: SELECT "Location" FROM table_65693 WHERE "Mascot" = 'lancers'

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 school has the Lancers as their mascot? ### Input: CREATE TABLE table_65693 (
    "School" text,
    "Location" text,
    "Mascot" text,
    "Enrollment" real,
    "IHSAA Class" text,
    "IHSAA Football Class" text,
    "County" text
) ### Response: SELECT "Location" FROM table_65693 WHERE "Mascot" = 'lancers'


Instruction: What was the tie number for the game with an away team of Hartlepool United?

Input:
CREATE TABLE table_60420 (
    "Tie no" text,
    "Home team" text,
    "Score" text,
    "Away team" text,
    "Date" text
)

Response: SELECT "Tie no" FROM table_60420 WHERE "Away team" = 'hartlepool united'

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 tie number for the game with an away team of Hartlepool United? ### Input: CREATE TABLE table_60420 (
    "Tie no" text,
    "Home team" text,
    "Score" text,
    "Away team" text,
    "Date" text
) ### Response: SELECT "Tie no" FROM table_60420 WHERE "Away team" = 'hartlepool united'


Instruction: count the number of patients who had received vitamin k within 2 months after being diagnosed with bone fracture(s) - left lower extremity until 3 years ago.

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

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

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

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

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

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

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

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

Response: SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'bone fracture(s) - left lower extremity' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-3 year')) AS t1 JOIN (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'vitamin k' AND DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-3 year')) AS t2 WHERE t1.diagnosistime < t2.treatmenttime AND DATETIME(t2.treatmenttime) BETWEEN DATETIME(t1.diagnosistime) AND DATETIME(t1.diagnosistime, '+2 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: count the number of patients who had received vitamin k within 2 months after being diagnosed with bone fracture(s) - left lower extremity until 3 years ago. ### Input: CREATE TABLE patient (
    uniquepid text,
    patienthealthsystemstayid number,
    patientunitstayid number,
    gender text,
    age text,
    ethnicity text,
    hospitalid number,
    wardid number,
    admissionheight number,
    admissionweight number,
    dischargeweight number,
    hospitaladmittime time,
    hospitaladmitsource text,
    unitadmittime time,
    unitdischargetime time,
    hospitaldischargetime time,
    hospitaldischargestatus text
)

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

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

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

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

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

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

CREATE TABLE allergy (
    allergyid number,
    patientunitstayid number,
    drugname text,
    allergyname text,
    allergytime time
) ### Response: SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'bone fracture(s) - left lower extremity' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-3 year')) AS t1 JOIN (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'vitamin k' AND DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-3 year')) AS t2 WHERE t1.diagnosistime < t2.treatmenttime AND DATETIME(t2.treatmenttime) BETWEEN DATETIME(t1.diagnosistime) AND DATETIME(t1.diagnosistime, '+2 month')


Instruction: What is the round for the Int. Adac-Preis Der Tourenwagen Von Sachsen-Anhalt?

Input:
CREATE TABLE table_name_92 (
    round VARCHAR,
    race VARCHAR
)

Response: SELECT round FROM table_name_92 WHERE race = "int. adac-preis der tourenwagen von sachsen-anhalt"

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 round for the Int. Adac-Preis Der Tourenwagen Von Sachsen-Anhalt? ### Input: CREATE TABLE table_name_92 (
    round VARCHAR,
    race VARCHAR
) ### Response: SELECT round FROM table_name_92 WHERE race = "int. adac-preis der tourenwagen von sachsen-anhalt"


Instruction: total number of venues that hosted first and second round games .

Input:
CREATE TABLE table_203_606 (
    id number,
    "region" text,
    "rnd" number,
    "host" text,
    "venue" text,
    "city" text,
    "state" text
)

Response: SELECT COUNT("venue") FROM table_203_606 WHERE "rnd" = 1 OR "rnd" = 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: total number of venues that hosted first and second round games . ### Input: CREATE TABLE table_203_606 (
    id number,
    "region" text,
    "rnd" number,
    "host" text,
    "venue" text,
    "city" text,
    "state" text
) ### Response: SELECT COUNT("venue") FROM table_203_606 WHERE "rnd" = 1 OR "rnd" = 2


Instruction: Which constructor has laps less than 100 and a time/retired +10 laps?

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

Response: SELECT "Constructor" FROM table_54219 WHERE "Laps" < '100' AND "Time/Retired" = '+10 laps'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which constructor has laps less than 100 and a time/retired +10 laps? ### Input: CREATE TABLE table_54219 (
    "Driver" text,
    "Constructor" text,
    "Laps" real,
    "Time/Retired" text,
    "Grid" real
) ### Response: SELECT "Constructor" FROM table_54219 WHERE "Laps" < '100' AND "Time/Retired" = '+10 laps'


Instruction: what was the first time that patient 003-83 had an intake since 995 days ago?

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

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

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

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

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

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

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
)

Response: SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-83')) AND intakeoutput.cellpath LIKE '%intake%' AND DATETIME(intakeoutput.intakeoutputtime) >= DATETIME(CURRENT_TIME(), '-995 day') ORDER BY intakeoutput.intakeoutputtime 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: what was the first time that patient 003-83 had an intake since 995 days ago? ### Input: CREATE TABLE microlab (
    microlabid number,
    patientunitstayid number,
    culturesite text,
    organism text,
    culturetakentime time
)

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

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

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

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

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

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
) ### Response: SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-83')) AND intakeoutput.cellpath LIKE '%intake%' AND DATETIME(intakeoutput.intakeoutputtime) >= DATETIME(CURRENT_TIME(), '-995 day') ORDER BY intakeoutput.intakeoutputtime LIMIT 1


Instruction: What was the winning team where Tim Macrow won the fastest lap on Queensland Raceway circuit?

Input:
CREATE TABLE table_22083044_2 (
    winning_team VARCHAR,
    circuit VARCHAR,
    fastest_lap VARCHAR
)

Response: SELECT winning_team FROM table_22083044_2 WHERE circuit = "Queensland Raceway" AND fastest_lap = "Tim Macrow"

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 winning team where Tim Macrow won the fastest lap on Queensland Raceway circuit? ### Input: CREATE TABLE table_22083044_2 (
    winning_team VARCHAR,
    circuit VARCHAR,
    fastest_lap VARCHAR
) ### Response: SELECT winning_team FROM table_22083044_2 WHERE circuit = "Queensland Raceway" AND fastest_lap = "Tim Macrow"


Instruction: since 3 years ago, count the number of drugs that patient 19428 had been prescribed.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Response: SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19428) AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-3 year')

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: since 3 years ago, count the number of drugs that patient 19428 had been prescribed. ### Input: CREATE TABLE outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value number
)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE cost (
    row_id number,
    subject_id number,
    hadm_id number,
    event_type text,
    event_id number,
    chargetime time,
    cost number
) ### Response: SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19428) AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-3 year')


Instruction: Tell me the cast for b. reeves eason and joseph kane

Input:
CREATE TABLE table_57614 (
    "Serial Title" text,
    "Year" text,
    "Chapters" text,
    "Director" text,
    "Cast" text
)

Response: SELECT "Cast" FROM table_57614 WHERE "Director" = 'b. reeves eason and joseph kane'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tell me the cast for b. reeves eason and joseph kane ### Input: CREATE TABLE table_57614 (
    "Serial Title" text,
    "Year" text,
    "Chapters" text,
    "Director" text,
    "Cast" text
) ### Response: SELECT "Cast" FROM table_57614 WHERE "Director" = 'b. reeves eason and joseph kane'


Instruction: Which Captain 2 has a Result of final?

Input:
CREATE TABLE table_76555 (
    "Date" text,
    "Captain 1" text,
    "Team 2" text,
    "Captain 2" text,
    "Venue" text,
    "Result" text
)

Response: SELECT "Captain 2" FROM table_76555 WHERE "Result" = 'final'

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 Captain 2 has a Result of final? ### Input: CREATE TABLE table_76555 (
    "Date" text,
    "Captain 1" text,
    "Team 2" text,
    "Captain 2" text,
    "Venue" text,
    "Result" text
) ### Response: SELECT "Captain 2" FROM table_76555 WHERE "Result" = 'final'