Instruction: how much does it cost for dexamethasone 4 mg po tabs?

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

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

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

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 vitalperiodic (
    vitalperiodicid number,
    patientunitstayid number,
    temperature number,
    sao2 number,
    heartrate number,
    respiration number,
    systemicsystolic number,
    systemicdiastolic number,
    systemicmean number,
    observationtime time
)

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

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

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

Response: SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'dexamethasone 4 mg po tabs')

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how much does it cost for dexamethasone 4 mg po tabs? ### Input: CREATE TABLE cost (
    costid number,
    uniquepid text,
    patienthealthsystemstayid number,
    eventtype text,
    eventid number,
    chargetime time,
    cost number
)

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

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

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 vitalperiodic (
    vitalperiodicid number,
    patientunitstayid number,
    temperature number,
    sao2 number,
    heartrate number,
    respiration number,
    systemicsystolic number,
    systemicdiastolic number,
    systemicmean number,
    observationtime time
)

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

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

CREATE TABLE patient (
    uniquepid text,
    patienthealthsystemstayid number,
    patientunitstayid number,
    gender text,
    age text,
    ethnicity text,
    hospitalid number,
    wardid number,
    admissionheight number,
    admissionweight number,
    dischargeweight number,
    hospitaladmittime time,
    hospitaladmitsource text,
    unitadmittime time,
    unitdischargetime time,
    hospitaldischargetime time,
    hospitaldischargestatus text
) ### Response: SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'dexamethasone 4 mg po tabs')


Instruction: What is the highest year named for the name Tie Fluctus?

Input:
CREATE TABLE table_21081 (
    "Name" text,
    "Latitude" text,
    "Longitude" text,
    "Diameter (km)" text,
    "Year named" real,
    "Name origin" text
)

Response: SELECT MAX("Year named") FROM table_21081 WHERE "Name" = 'Tie Fluctus'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest year named for the name Tie Fluctus? ### Input: CREATE TABLE table_21081 (
    "Name" text,
    "Latitude" text,
    "Longitude" text,
    "Diameter (km)" text,
    "Year named" real,
    "Name origin" text
) ### Response: SELECT MAX("Year named") FROM table_21081 WHERE "Name" = 'Tie Fluctus'


Instruction: What is Country, when Score is '69-69=138', and when Player is 'Ian Poulter'?

Input:
CREATE TABLE table_name_20 (
    country VARCHAR,
    player VARCHAR,
    score VARCHAR
)

Response: SELECT country FROM table_name_20 WHERE score = 69 - 69 = 138 AND player = "ian poulter"

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 Country, when Score is '69-69=138', and when Player is 'Ian Poulter'? ### Input: CREATE TABLE table_name_20 (
    country VARCHAR,
    player VARCHAR,
    score VARCHAR
) ### Response: SELECT country FROM table_name_20 WHERE score = 69 - 69 = 138 AND player = "ian poulter"


Instruction: Which rider was on the 600cc Yamaha team?

Input:
CREATE TABLE table_name_44 (
    rider VARCHAR,
    team VARCHAR
)

Response: SELECT rider FROM table_name_44 WHERE team = "600cc yamaha"

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 rider was on the 600cc Yamaha team? ### Input: CREATE TABLE table_name_44 (
    rider VARCHAR,
    team VARCHAR
) ### Response: SELECT rider FROM table_name_44 WHERE team = "600cc yamaha"


Instruction: was the value of calculated total co2 of patient 14671 second measured on the current hospital visit less than its value first measured on the current hospital visit?

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value 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 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 labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14671 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'calculated total co2') ORDER BY labevents.charttime LIMIT 1 OFFSET 1) < (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14671 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'calculated total co2') ORDER BY labevents.charttime LIMIT 1)

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: was the value of calculated total co2 of patient 14671 second measured on the current hospital visit less than its value first measured on the current hospital visit? ### Input: CREATE TABLE transfers (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    eventtype text,
    careunit text,
    wardid number,
    intime time,
    outtime time
)

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

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

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

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

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

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

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

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

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

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

CREATE TABLE outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value 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 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 labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14671 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'calculated total co2') ORDER BY labevents.charttime LIMIT 1 OFFSET 1) < (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14671 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'calculated total co2') ORDER BY labevents.charttime LIMIT 1)


Instruction: Name the tournament for march 25, 2012

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

Response: SELECT tournament FROM table_name_24 WHERE date = "march 25, 2012"

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 tournament for march 25, 2012 ### Input: CREATE TABLE table_name_24 (
    tournament VARCHAR,
    date VARCHAR
) ### Response: SELECT tournament FROM table_name_24 WHERE date = "march 25, 2012"


Instruction: Will Prof. David Moon teach 597 next semester ?

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

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

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

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

CREATE TABLE course_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 jobs (
    job_id int,
    job_title varchar,
    description varchar,
    requirement varchar,
    city varchar,
    state varchar,
    country varchar,
    zip int
)

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

CREATE TABLE area (
    course_id int,
    area varchar
)

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

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

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

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

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

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

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

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

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

Response: SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 597 AND instructor.name LIKE '%David Moon%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Will Prof. David Moon teach 597 next semester ? ### Input: CREATE TABLE offering_instructor (
    offering_instructor_id int,
    offering_id int,
    instructor_id int
)

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

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

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

CREATE TABLE course_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 jobs (
    job_id int,
    job_title varchar,
    description varchar,
    requirement varchar,
    city varchar,
    state varchar,
    country varchar,
    zip int
)

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

CREATE TABLE area (
    course_id int,
    area varchar
)

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

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

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

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

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

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

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

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

CREATE TABLE student_record (
    student_id int,
    course_id int,
    semester int,
    grade varchar,
    how varchar,
    transfer_source varchar,
    earn_credit varchar,
    repeat_term varchar,
    test_id varchar
) ### Response: SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 597 AND instructor.name LIKE '%David Moon%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016


Instruction: what were the number of innings albert clapp had ?

Input:
CREATE TABLE table_204_154 (
    id number,
    "player" text,
    "matches" number,
    "innings" number,
    "runs" number,
    "average" number,
    "100s" number,
    "50s" number
)

Response: SELECT "innings" FROM table_204_154 WHERE "player" = 'albert clapp'

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 were the number of innings albert clapp had ? ### Input: CREATE TABLE table_204_154 (
    id number,
    "player" text,
    "matches" number,
    "innings" number,
    "runs" number,
    "average" number,
    "100s" number,
    "50s" number
) ### Response: SELECT "innings" FROM table_204_154 WHERE "player" = 'albert clapp'


Instruction: Show aircraft names and number of flights for each aircraft.

Input:
CREATE TABLE flight (
    flno number(4,0),
    origin varchar2(20),
    destination varchar2(20),
    distance number(6,0),
    departure_date date,
    arrival_date date,
    price number(7,2),
    aid number(9,0)
)

CREATE TABLE aircraft (
    aid number(9,0),
    name varchar2(30),
    distance number(6,0)
)

CREATE TABLE certificate (
    eid number(9,0),
    aid number(9,0)
)

CREATE TABLE employee (
    eid number(9,0),
    name varchar2(30),
    salary number(10,2)
)

Response: SELECT name, COUNT(*) FROM flight AS T1 JOIN aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show aircraft names and number of flights for each aircraft. ### Input: CREATE TABLE flight (
    flno number(4,0),
    origin varchar2(20),
    destination varchar2(20),
    distance number(6,0),
    departure_date date,
    arrival_date date,
    price number(7,2),
    aid number(9,0)
)

CREATE TABLE aircraft (
    aid number(9,0),
    name varchar2(30),
    distance number(6,0)
)

CREATE TABLE certificate (
    eid number(9,0),
    aid number(9,0)
)

CREATE TABLE employee (
    eid number(9,0),
    name varchar2(30),
    salary number(10,2)
) ### Response: SELECT name, COUNT(*) FROM flight AS T1 JOIN aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid


Instruction: what is the overall number of times when the calendar showed october 6

Input:
CREATE TABLE table_27733909_1 (
    record VARCHAR,
    date VARCHAR
)

Response: SELECT COUNT(record) FROM table_27733909_1 WHERE date = "October 6"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the overall number of times when the calendar showed october 6 ### Input: CREATE TABLE table_27733909_1 (
    record VARCHAR,
    date VARCHAR
) ### Response: SELECT COUNT(record) FROM table_27733909_1 WHERE date = "October 6"


Instruction: Name the tries against when tries for is 30

Input:
CREATE TABLE table_22025 (
    "Club" text,
    "Played" text,
    "Won" text,
    "Drawn" text,
    "Lost" text,
    "Points for" text,
    "Points against" text,
    "Tries for" text,
    "Tries against" text,
    "Try bonus" text,
    "Losing bonus" text,
    "Points" text
)

Response: SELECT "Tries against" FROM table_22025 WHERE "Tries for" = '30'

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 tries against when tries for is 30 ### Input: CREATE TABLE table_22025 (
    "Club" text,
    "Played" text,
    "Won" text,
    "Drawn" text,
    "Lost" text,
    "Points for" text,
    "Points against" text,
    "Tries for" text,
    "Tries against" text,
    "Try bonus" text,
    "Losing bonus" text,
    "Points" text
) ### Response: SELECT "Tries against" FROM table_22025 WHERE "Tries for" = '30'


Instruction: WHAT IS THE ROUND FOR ZACH BOYCHUK?

Input:
CREATE TABLE table_49926 (
    "Round" real,
    "Player" text,
    "Position" text,
    "Nationality" text,
    "College/Junior/Club Team (League)" text
)

Response: SELECT COUNT("Round") FROM table_49926 WHERE "Player" = 'zach boychuk'

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 ZACH BOYCHUK? ### Input: CREATE TABLE table_49926 (
    "Round" real,
    "Player" text,
    "Position" text,
    "Nationality" text,
    "College/Junior/Club Team (League)" text
) ### Response: SELECT COUNT("Round") FROM table_49926 WHERE "Player" = 'zach boychuk'


Instruction: what is maximum age of patients whose gender is m and discharge location is short term hospital?

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

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

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

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

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

Response: SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.discharge_location = "SHORT TERM HOSPITAL"

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 maximum age of patients whose gender is m and discharge location is short term hospital? ### Input: CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

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

CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
) ### Response: SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.discharge_location = "SHORT TERM HOSPITAL"


Instruction: How many people attended the game on week 3?

Input:
CREATE TABLE table_name_26 (
    attendance INTEGER,
    week VARCHAR
)

Response: SELECT AVG(attendance) FROM table_name_26 WHERE week = 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: How many people attended the game on week 3? ### Input: CREATE TABLE table_name_26 (
    attendance INTEGER,
    week VARCHAR
) ### Response: SELECT AVG(attendance) FROM table_name_26 WHERE week = 3


Instruction: Please show different types of artworks with the corresponding number of artworks of each type.

Input:
CREATE TABLE festival_detail (
    festival_id number,
    festival_name text,
    chair_name text,
    location text,
    year number,
    num_of_audience number
)

CREATE TABLE nomination (
    artwork_id number,
    festival_id number,
    result text
)

CREATE TABLE artwork (
    artwork_id number,
    type text,
    name text
)

Response: SELECT type, COUNT(*) FROM artwork GROUP BY type

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: Please show different types of artworks with the corresponding number of artworks of each type. ### Input: CREATE TABLE festival_detail (
    festival_id number,
    festival_name text,
    chair_name text,
    location text,
    year number,
    num_of_audience number
)

CREATE TABLE nomination (
    artwork_id number,
    festival_id number,
    result text
)

CREATE TABLE artwork (
    artwork_id number,
    type text,
    name text
) ### Response: SELECT type, COUNT(*) FROM artwork GROUP BY type


Instruction: what is the total number of priests that have held the job in resita ?

Input:
CREATE TABLE table_204_734 (
    id number,
    "first name" text,
    "surname" text,
    "death year" number,
    "beginning of\nservice" text,
    "end of\nservice" text,
    "notes" text
)

Response: SELECT COUNT("first name") FROM table_204_734

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 priests that have held the job in resita ? ### Input: CREATE TABLE table_204_734 (
    id number,
    "first name" text,
    "surname" text,
    "death year" number,
    "beginning of\nservice" text,
    "end of\nservice" text,
    "notes" text
) ### Response: SELECT COUNT("first name") FROM table_204_734


Instruction: Which school was Lawrence Roberts from ?

Input:
CREATE TABLE table_46045 (
    "Player" text,
    "Nationality" text,
    "Position" text,
    "Years for Grizzlies" text,
    "School/Club Team" text
)

Response: SELECT "School/Club Team" FROM table_46045 WHERE "Player" = 'lawrence roberts'

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 school was Lawrence Roberts from ? ### Input: CREATE TABLE table_46045 (
    "Player" text,
    "Nationality" text,
    "Position" text,
    "Years for Grizzlies" text,
    "School/Club Team" text
) ### Response: SELECT "School/Club Team" FROM table_46045 WHERE "Player" = 'lawrence roberts'


Instruction: What is the total number of Silver, when Gold is '1', and when Bronze is less than 0?

Input:
CREATE TABLE table_name_35 (
    silver VARCHAR,
    gold VARCHAR,
    bronze VARCHAR
)

Response: SELECT COUNT(silver) FROM table_name_35 WHERE gold = 1 AND bronze < 0

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total number of Silver, when Gold is '1', and when Bronze is less than 0? ### Input: CREATE TABLE table_name_35 (
    silver VARCHAR,
    gold VARCHAR,
    bronze VARCHAR
) ### Response: SELECT COUNT(silver) FROM table_name_35 WHERE gold = 1 AND bronze < 0


Instruction: What is the col location with a col height (m) of 1107?

Input:
CREATE TABLE table_2731431_1 (
    col_location VARCHAR,
    col_height__m_ VARCHAR
)

Response: SELECT col_location FROM table_2731431_1 WHERE col_height__m_ = 1107

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 col location with a col height (m) of 1107? ### Input: CREATE TABLE table_2731431_1 (
    col_location VARCHAR,
    col_height__m_ VARCHAR
) ### Response: SELECT col_location FROM table_2731431_1 WHERE col_height__m_ = 1107


Instruction: What is Venue, when Status is '2007 Rugby World Cup', when Against is less than 22, and when Date is '08/09/2007'?

Input:
CREATE TABLE table_name_22 (
    venue VARCHAR,
    date VARCHAR,
    status VARCHAR,
    against VARCHAR
)

Response: SELECT venue FROM table_name_22 WHERE status = "2007 rugby world cup" AND against < 22 AND date = "08/09/2007"

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 Venue, when Status is '2007 Rugby World Cup', when Against is less than 22, and when Date is '08/09/2007'? ### Input: CREATE TABLE table_name_22 (
    venue VARCHAR,
    date VARCHAR,
    status VARCHAR,
    against VARCHAR
) ### Response: SELECT venue FROM table_name_22 WHERE status = "2007 rugby world cup" AND against < 22 AND date = "08/09/2007"


Instruction: What was the result of the match in Penrith that featured a score of 48-12?

Input:
CREATE TABLE table_4661 (
    "Date" text,
    "Result" text,
    "Score" text,
    "Stadium" text,
    "City" text,
    "Crowd" real
)

Response: SELECT "Result" FROM table_4661 WHERE "Score" = '48-12' AND "City" = 'penrith'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the result of the match in Penrith that featured a score of 48-12? ### Input: CREATE TABLE table_4661 (
    "Date" text,
    "Result" text,
    "Score" text,
    "Stadium" text,
    "City" text,
    "Crowd" real
) ### Response: SELECT "Result" FROM table_4661 WHERE "Score" = '48-12' AND "City" = 'penrith'


Instruction: Show the number of the countries that have managers of age above 50 or below 46.

Input:
CREATE TABLE train (
    Train_ID int,
    Train_Num text,
    Name text,
    From text,
    Arrival text,
    Railway_ID int
)

CREATE TABLE railway (
    Railway_ID int,
    Railway text,
    Builder text,
    Built text,
    Wheels text,
    Location text,
    ObjectNumber text
)

CREATE TABLE railway_manage (
    Railway_ID int,
    Manager_ID int,
    From_Year text
)

CREATE TABLE manager (
    Manager_ID int,
    Name text,
    Country text,
    Working_year_starts text,
    Age int,
    Level int
)

Response: SELECT Country, COUNT(Country) FROM manager WHERE Age > 50 OR Age < 46 GROUP BY Country

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the number of the countries that have managers of age above 50 or below 46. ### Input: CREATE TABLE train (
    Train_ID int,
    Train_Num text,
    Name text,
    From text,
    Arrival text,
    Railway_ID int
)

CREATE TABLE railway (
    Railway_ID int,
    Railway text,
    Builder text,
    Built text,
    Wheels text,
    Location text,
    ObjectNumber text
)

CREATE TABLE railway_manage (
    Railway_ID int,
    Manager_ID int,
    From_Year text
)

CREATE TABLE manager (
    Manager_ID int,
    Name text,
    Country text,
    Working_year_starts text,
    Age int,
    Level int
) ### Response: SELECT Country, COUNT(Country) FROM manager WHERE Age > 50 OR Age < 46 GROUP BY Country


Instruction: what is the number of patients whose marital status is widowed and procedure icd9 code is 4105?

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

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

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

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

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "WIDOWED" AND procedures.icd9_code = "4105"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose marital status is widowed and procedure icd9 code is 4105? ### Input: CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
)

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

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

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

CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "WIDOWED" AND procedures.icd9_code = "4105"


Instruction: What was the date of the game that had a goal of 3?

Input:
CREATE TABLE table_71388 (
    "Goal" real,
    "Date" text,
    "Score" text,
    "Result" text,
    "Competition" text
)

Response: SELECT "Date" FROM table_71388 WHERE "Goal" = '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 was the date of the game that had a goal of 3? ### Input: CREATE TABLE table_71388 (
    "Goal" real,
    "Date" text,
    "Score" text,
    "Result" text,
    "Competition" text
) ### Response: SELECT "Date" FROM table_71388 WHERE "Goal" = '3'


Instruction: DALLAS to SAN FRANCISCO leaving after 1600 in the afternoon please

Input:
CREATE TABLE month (
    month_number int,
    month_name text
)

CREATE TABLE flight_fare (
    flight_id int,
    fare_id int
)

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE compartment_class (
    compartment varchar,
    class_type varchar
)

CREATE TABLE equipment_sequence (
    aircraft_code_sequence varchar,
    aircraft_code varchar
)

CREATE TABLE code_description (
    code varchar,
    description text
)

CREATE TABLE days (
    days_code varchar,
    day_name varchar
)

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

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

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

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

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

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

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

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

Response: SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.departure_time > 1600 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: DALLAS to SAN FRANCISCO leaving after 1600 in the afternoon please ### Input: CREATE TABLE month (
    month_number int,
    month_name text
)

CREATE TABLE flight_fare (
    flight_id int,
    fare_id int
)

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE compartment_class (
    compartment varchar,
    class_type varchar
)

CREATE TABLE equipment_sequence (
    aircraft_code_sequence varchar,
    aircraft_code varchar
)

CREATE TABLE code_description (
    code varchar,
    description text
)

CREATE TABLE days (
    days_code varchar,
    day_name varchar
)

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

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

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

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

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

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

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

CREATE TABLE fare_basis (
    fare_basis_code text,
    booking_class text,
    class_type text,
    premium text,
    economy text,
    discounted text,
    night text,
    season text,
    basis_days text
) ### Response: SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.departure_time > 1600 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code


Instruction: what is date of birth and diagnoses short title of subject id 66411?

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 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 prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

Response: SELECT demographic.dob, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "66411"

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 date of birth and diagnoses short title of subject id 66411? ### 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 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 prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
) ### Response: SELECT demographic.dob, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "66411"


Instruction: What's the abbreviation for libya?

Input:
CREATE TABLE table_name_88 (
    abbreviation VARCHAR,
    country VARCHAR
)

Response: SELECT abbreviation FROM table_name_88 WHERE country = "libya"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the abbreviation for libya? ### Input: CREATE TABLE table_name_88 (
    abbreviation VARCHAR,
    country VARCHAR
) ### Response: SELECT abbreviation FROM table_name_88 WHERE country = "libya"


Instruction: What is the total number of games for the opponent in Washington?

Input:
CREATE TABLE table_name_89 (
    game VARCHAR,
    opponent VARCHAR
)

Response: SELECT COUNT(game) FROM table_name_89 WHERE opponent = "washington"

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 games for the opponent in Washington? ### Input: CREATE TABLE table_name_89 (
    game VARCHAR,
    opponent VARCHAR
) ### Response: SELECT COUNT(game) FROM table_name_89 WHERE opponent = "washington"


Instruction: Which opponent's game was less than 76 when the march was 10?

Input:
CREATE TABLE table_name_45 (
    opponent VARCHAR,
    game VARCHAR,
    march VARCHAR
)

Response: SELECT opponent FROM table_name_45 WHERE game < 76 AND march = 10

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which opponent's game was less than 76 when the march was 10? ### Input: CREATE TABLE table_name_45 (
    opponent VARCHAR,
    game VARCHAR,
    march VARCHAR
) ### Response: SELECT opponent FROM table_name_45 WHERE game < 76 AND march = 10


Instruction: what is minimum age of patients whose gender is f and age is greater than or equal to 30?

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 MIN(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.age >= "30"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is minimum age of patients whose gender is f and age is greater than or equal to 30? ### 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 MIN(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.age >= "30"


Instruction: What finish time started at 32?

Input:
CREATE TABLE table_58371 (
    "Year" text,
    "Start" text,
    "Qual" text,
    "Rank" text,
    "Finish" text,
    "Laps" real
)

Response: SELECT "Finish" FROM table_58371 WHERE "Start" = '32'

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 finish time started at 32? ### Input: CREATE TABLE table_58371 (
    "Year" text,
    "Start" text,
    "Qual" text,
    "Rank" text,
    "Finish" text,
    "Laps" real
) ### Response: SELECT "Finish" FROM table_58371 WHERE "Start" = '32'


Instruction: For those employees who did not have any job in the past, find hire_date and the amount of hire_date bin hire_date by time, and visualize them by a bar chart.

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

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

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

Response: SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history)

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 did not have any job in the past, find hire_date and the amount of hire_date bin hire_date by time, and visualize them by a bar chart. ### Input: CREATE TABLE regions (
    REGION_ID decimal(5,0),
    REGION_NAME varchar(25)
)

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

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 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 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)
) ### Response: SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history)


Instruction: What player that has a Position of df, and Loaned to is Stoke City?

Input:
CREATE TABLE table_name_89 (
    player VARCHAR,
    position VARCHAR,
    loaned_to VARCHAR
)

Response: SELECT player FROM table_name_89 WHERE position = "df" AND loaned_to = "stoke city"

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 that has a Position of df, and Loaned to is Stoke City? ### Input: CREATE TABLE table_name_89 (
    player VARCHAR,
    position VARCHAR,
    loaned_to VARCHAR
) ### Response: SELECT player FROM table_name_89 WHERE position = "df" AND loaned_to = "stoke city"


Instruction: get me the number of patients suffering from celo-vessicle fistula primary disease.

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 prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

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

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

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CELO-VESSICLE FISTULA"

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: get me the number of patients suffering from celo-vessicle fistula primary disease. ### 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 prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

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

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

CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CELO-VESSICLE FISTULA"


Instruction: What is the highest number of dave viewers of an episode with 119000 dave ja vu viewers?

Input:
CREATE TABLE table_28053 (
    "Episode no." real,
    "Airdate" text,
    "Dave Viewers" real,
    "Dave Rank" real,
    "Rank (cable)" real,
    "Dave ja vu Viewers" real,
    "Total viewers" real
)

Response: SELECT MAX("Dave Viewers") FROM table_28053 WHERE "Dave ja vu Viewers" = '119000'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest number of dave viewers of an episode with 119000 dave ja vu viewers? ### Input: CREATE TABLE table_28053 (
    "Episode no." real,
    "Airdate" text,
    "Dave Viewers" real,
    "Dave Rank" real,
    "Rank (cable)" real,
    "Dave ja vu Viewers" real,
    "Total viewers" real
) ### Response: SELECT MAX("Dave Viewers") FROM table_28053 WHERE "Dave ja vu Viewers" = '119000'


Instruction: Bar chart of mean salary from each dept name, and rank by the X-axis in desc.

Input:
CREATE TABLE student (
    ID varchar(5),
    name varchar(20),
    dept_name varchar(20),
    tot_cred numeric(3,0)
)

CREATE TABLE teaches (
    ID varchar(5),
    course_id varchar(8),
    sec_id varchar(8),
    semester varchar(6),
    year numeric(4,0)
)

CREATE TABLE course (
    course_id varchar(8),
    title varchar(50),
    dept_name varchar(20),
    credits numeric(2,0)
)

CREATE TABLE instructor (
    ID varchar(5),
    name varchar(20),
    dept_name varchar(20),
    salary numeric(8,2)
)

CREATE TABLE takes (
    ID varchar(5),
    course_id varchar(8),
    sec_id varchar(8),
    semester varchar(6),
    year numeric(4,0),
    grade varchar(2)
)

CREATE TABLE classroom (
    building varchar(15),
    room_number varchar(7),
    capacity numeric(4,0)
)

CREATE TABLE section (
    course_id varchar(8),
    sec_id varchar(8),
    semester varchar(6),
    year numeric(4,0),
    building varchar(15),
    room_number varchar(7),
    time_slot_id varchar(4)
)

CREATE TABLE time_slot (
    time_slot_id varchar(4),
    day varchar(1),
    start_hr numeric(2),
    start_min numeric(2),
    end_hr numeric(2),
    end_min numeric(2)
)

CREATE TABLE prereq (
    course_id varchar(8),
    prereq_id varchar(8)
)

CREATE TABLE department (
    dept_name varchar(20),
    building varchar(15),
    budget numeric(12,2)
)

CREATE TABLE advisor (
    s_ID varchar(5),
    i_ID varchar(5)
)

Response: SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name ORDER BY dept_name 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 of mean salary from each dept name, and rank by the X-axis in desc. ### Input: CREATE TABLE student (
    ID varchar(5),
    name varchar(20),
    dept_name varchar(20),
    tot_cred numeric(3,0)
)

CREATE TABLE teaches (
    ID varchar(5),
    course_id varchar(8),
    sec_id varchar(8),
    semester varchar(6),
    year numeric(4,0)
)

CREATE TABLE course (
    course_id varchar(8),
    title varchar(50),
    dept_name varchar(20),
    credits numeric(2,0)
)

CREATE TABLE instructor (
    ID varchar(5),
    name varchar(20),
    dept_name varchar(20),
    salary numeric(8,2)
)

CREATE TABLE takes (
    ID varchar(5),
    course_id varchar(8),
    sec_id varchar(8),
    semester varchar(6),
    year numeric(4,0),
    grade varchar(2)
)

CREATE TABLE classroom (
    building varchar(15),
    room_number varchar(7),
    capacity numeric(4,0)
)

CREATE TABLE section (
    course_id varchar(8),
    sec_id varchar(8),
    semester varchar(6),
    year numeric(4,0),
    building varchar(15),
    room_number varchar(7),
    time_slot_id varchar(4)
)

CREATE TABLE time_slot (
    time_slot_id varchar(4),
    day varchar(1),
    start_hr numeric(2),
    start_min numeric(2),
    end_hr numeric(2),
    end_min numeric(2)
)

CREATE TABLE prereq (
    course_id varchar(8),
    prereq_id varchar(8)
)

CREATE TABLE department (
    dept_name varchar(20),
    building varchar(15),
    budget numeric(12,2)
)

CREATE TABLE advisor (
    s_ID varchar(5),
    i_ID varchar(5)
) ### Response: SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name ORDER BY dept_name DESC


Instruction: has patient 015-59552 had any milrinone intake since 06/10/2105.

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

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

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

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

CREATE TABLE microlab (
    microlabid number,
    patientunitstayid number,
    culturesite text,
    organism text,
    culturetakentime 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 lab (
    labid number,
    patientunitstayid number,
    labname text,
    labresult number,
    labresulttime time
)

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

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

Response: SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-59552')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.celllabel = 'milrinone' AND STRFTIME('%y-%m-%d', intakeoutput.intakeoutputtime) >= '2105-06-10'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: has patient 015-59552 had any milrinone intake since 06/10/2105. ### Input: CREATE TABLE treatment (
    treatmentid number,
    patientunitstayid number,
    treatmentname text,
    treatmenttime time
)

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

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

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

CREATE TABLE microlab (
    microlabid number,
    patientunitstayid number,
    culturesite text,
    organism text,
    culturetakentime 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 lab (
    labid number,
    patientunitstayid number,
    labname text,
    labresult number,
    labresulttime time
)

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

CREATE TABLE allergy (
    allergyid number,
    patientunitstayid number,
    drugname text,
    allergyname text,
    allergytime time
) ### Response: SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-59552')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.celllabel = 'milrinone' AND STRFTIME('%y-%m-%d', intakeoutput.intakeoutputtime) >= '2105-06-10'


Instruction: who is the champion where semi-finalist #2 is na and location is morrisville, nc

Input:
CREATE TABLE table_16524 (
    "Year" text,
    "Champion" text,
    "Score" text,
    "Runner-Up" text,
    "Location" text,
    "Semi-Finalist #1" text,
    "Semi-Finalist #2" text
)

Response: SELECT "Champion" FROM table_16524 WHERE "Semi-Finalist #2" = 'NA' AND "Location" = 'Morrisville, NC'

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 champion where semi-finalist #2 is na and location is morrisville, nc ### Input: CREATE TABLE table_16524 (
    "Year" text,
    "Champion" text,
    "Score" text,
    "Runner-Up" text,
    "Location" text,
    "Semi-Finalist #1" text,
    "Semi-Finalist #2" text
) ### Response: SELECT "Champion" FROM table_16524 WHERE "Semi-Finalist #2" = 'NA' AND "Location" = 'Morrisville, NC'


Instruction: mark skaife was the winnter of atcc round 1 , but what was the name of his team ?

Input:
CREATE TABLE table_203_271 (
    id number,
    "date" text,
    "series" text,
    "circuit" text,
    "city / state" text,
    "winner" text,
    "team" text,
    "car" text,
    "report" text
)

Response: SELECT "team" FROM table_203_271 WHERE "series" = 'atcc round 1' AND "winner" = 'mark skaife'

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: mark skaife was the winnter of atcc round 1 , but what was the name of his team ? ### Input: CREATE TABLE table_203_271 (
    id number,
    "date" text,
    "series" text,
    "circuit" text,
    "city / state" text,
    "winner" text,
    "team" text,
    "car" text,
    "report" text
) ### Response: SELECT "team" FROM table_203_271 WHERE "series" = 'atcc round 1' AND "winner" = 'mark skaife'


Instruction: Who is the player in guard position from Stephen F. Austin in a round less than 8?

Input:
CREATE TABLE table_45213 (
    "Round" real,
    "Pick" real,
    "Player" text,
    "Position" text,
    "Nationality" text,
    "School/Club Team" text
)

Response: SELECT "Player" FROM table_45213 WHERE "Round" < '8' AND "Position" = 'guard' AND "School/Club Team" = 'stephen f. austin'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the player in guard position from Stephen F. Austin in a round less than 8? ### Input: CREATE TABLE table_45213 (
    "Round" real,
    "Pick" real,
    "Player" text,
    "Position" text,
    "Nationality" text,
    "School/Club Team" text
) ### Response: SELECT "Player" FROM table_45213 WHERE "Round" < '8' AND "Position" = 'guard' AND "School/Club Team" = 'stephen f. austin'


Instruction: What stadium was the game held in when the final score was 17-31?

Input:
CREATE TABLE table_name_88 (
    stadium VARCHAR,
    final_score VARCHAR
)

Response: SELECT stadium FROM table_name_88 WHERE final_score = "17-31"

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 stadium was the game held in when the final score was 17-31? ### Input: CREATE TABLE table_name_88 (
    stadium VARCHAR,
    final_score VARCHAR
) ### Response: SELECT stadium FROM table_name_88 WHERE final_score = "17-31"


Instruction: What is the average Acquired when the Number shows as 7?

Input:
CREATE TABLE table_name_73 (
    acquired INTEGER,
    number VARCHAR
)

Response: SELECT AVG(acquired) FROM table_name_73 WHERE number = 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 is the average Acquired when the Number shows as 7? ### Input: CREATE TABLE table_name_73 (
    acquired INTEGER,
    number VARCHAR
) ### Response: SELECT AVG(acquired) FROM table_name_73 WHERE number = 7


Instruction: How many viewers tuned in for season 2?

Input:
CREATE TABLE table_22347090_4 (
    us_viewers__million_ VARCHAR,
    no_in_season VARCHAR
)

Response: SELECT us_viewers__million_ FROM table_22347090_4 WHERE no_in_season = 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: How many viewers tuned in for season 2? ### Input: CREATE TABLE table_22347090_4 (
    us_viewers__million_ VARCHAR,
    no_in_season VARCHAR
) ### Response: SELECT us_viewers__million_ FROM table_22347090_4 WHERE no_in_season = 2


Instruction: When was the Masters Tournament?

Input:
CREATE TABLE table_55448 (
    "Date" text,
    "Tournament" text,
    "Winning score" text,
    "To par" text,
    "Margin of victory" text,
    "Runner(s)-up" text
)

Response: SELECT "Date" FROM table_55448 WHERE "Tournament" = 'masters tournament'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the Masters Tournament? ### Input: CREATE TABLE table_55448 (
    "Date" text,
    "Tournament" text,
    "Winning score" text,
    "To par" text,
    "Margin of victory" text,
    "Runner(s)-up" text
) ### Response: SELECT "Date" FROM table_55448 WHERE "Tournament" = 'masters tournament'


Instruction: Show the residences that have both a player of gender 'M' and a player of gender 'F'.

Input:
CREATE TABLE player (
    Residence VARCHAR,
    gender VARCHAR
)

Response: SELECT Residence FROM player WHERE gender = "M" INTERSECT SELECT Residence FROM player WHERE gender = "F"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the residences that have both a player of gender 'M' and a player of gender 'F'. ### Input: CREATE TABLE player (
    Residence VARCHAR,
    gender VARCHAR
) ### Response: SELECT Residence FROM player WHERE gender = "M" INTERSECT SELECT Residence FROM player WHERE gender = "F"


Instruction: How many Attendances on may 24?

Input:
CREATE TABLE table_36390 (
    "Date" text,
    "Visitor" text,
    "Score" text,
    "Home" text,
    "Decision" text,
    "Attendance" real,
    "Series" text
)

Response: SELECT MIN("Attendance") FROM table_36390 WHERE "Date" = 'may 24'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many Attendances on may 24? ### Input: CREATE TABLE table_36390 (
    "Date" text,
    "Visitor" text,
    "Score" text,
    "Home" text,
    "Decision" text,
    "Attendance" real,
    "Series" text
) ### Response: SELECT MIN("Attendance") FROM table_36390 WHERE "Date" = 'may 24'


Instruction: Are there sections of BIOMEDE 430 between the hours of 8:00 and 1:00 ?

Input:
CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

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

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

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

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 program (
    program_id int,
    name varchar,
    college varchar,
    introduction 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_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 ta (
    campus_job_id int,
    student_id int,
    location varchar
)

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

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 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 jobs (
    job_id int,
    job_title varchar,
    description varchar,
    requirement varchar,
    city varchar,
    state varchar,
    country varchar,
    zip int
)

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 area (
    course_id int,
    area varchar
)

Response: SELECT DISTINCT course_offering.end_time, course_offering.section_number, course_offering.start_time FROM course, course_offering, semester WHERE course_offering.end_time <= '1:00' AND course_offering.start_time >= '8:00' AND course.course_id = course_offering.course_id AND course.department = 'BIOMEDE' AND course.number = 430 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Are there sections of BIOMEDE 430 between the hours of 8:00 and 1:00 ? ### Input: CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

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

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

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

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 program (
    program_id int,
    name varchar,
    college varchar,
    introduction 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_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 ta (
    campus_job_id int,
    student_id int,
    location varchar
)

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

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 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 jobs (
    job_id int,
    job_title varchar,
    description varchar,
    requirement varchar,
    city varchar,
    state varchar,
    country varchar,
    zip int
)

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 area (
    course_id int,
    area varchar
) ### Response: SELECT DISTINCT course_offering.end_time, course_offering.section_number, course_offering.start_time FROM course, course_offering, semester WHERE course_offering.end_time <= '1:00' AND course_offering.start_time >= '8:00' AND course.course_id = course_offering.course_id AND course.department = 'BIOMEDE' AND course.number = 430 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016


Instruction: In what episode was segment D ned Can Corn?

Input:
CREATE TABLE table_19894 (
    "Series Ep." text,
    "Episode" real,
    "Netflix" text,
    "Segment A" text,
    "Segment B" text,
    "Segment C" text,
    "Segment D" text
)

Response: SELECT MAX("Episode") FROM table_19894 WHERE "Segment D" = 'ned Can Corn'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In what episode was segment D ned Can Corn? ### Input: CREATE TABLE table_19894 (
    "Series Ep." text,
    "Episode" real,
    "Netflix" text,
    "Segment A" text,
    "Segment B" text,
    "Segment C" text,
    "Segment D" text
) ### Response: SELECT MAX("Episode") FROM table_19894 WHERE "Segment D" = 'ned Can Corn'


Instruction: Who directed 'running the gauntlet'?

Input:
CREATE TABLE table_3916 (
    "Episode #" real,
    "Series #" real,
    "Title" text,
    "Director" text,
    "Writer" text,
    "Original airdate" text,
    "Viewers (millions)" text
)

Response: SELECT "Director" FROM table_3916 WHERE "Title" = 'Running the Gauntlet'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who directed 'running the gauntlet'? ### Input: CREATE TABLE table_3916 (
    "Episode #" real,
    "Series #" real,
    "Title" text,
    "Director" text,
    "Writer" text,
    "Original airdate" text,
    "Viewers (millions)" text
) ### Response: SELECT "Director" FROM table_3916 WHERE "Title" = 'Running the Gauntlet'


Instruction: What is the class of the team that has a behind of +44.780?

Input:
CREATE TABLE table_name_18 (
    class VARCHAR,
    behind VARCHAR
)

Response: SELECT class FROM table_name_18 WHERE behind = "+44.780"

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 class of the team that has a behind of +44.780? ### Input: CREATE TABLE table_name_18 (
    class VARCHAR,
    behind VARCHAR
) ### Response: SELECT class FROM table_name_18 WHERE behind = "+44.780"