Instruction: Bin the hire date of employees into the day of week interval and count them for visualizing a bar chart, and rank in asc by the total number.

Input:
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 job_history (
    EMPLOYEE_ID decimal(6,0),
    START_DATE date,
    END_DATE date,
    JOB_ID varchar(10),
    DEPARTMENT_ID decimal(4,0)
)

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

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

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

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

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

Response: SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees ORDER BY COUNT(HIRE_DATE)

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: Bin the hire date of employees into the day of week interval and count them for visualizing a bar chart, and rank in asc by the total number. ### Input: 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 job_history (
    EMPLOYEE_ID decimal(6,0),
    START_DATE date,
    END_DATE date,
    JOB_ID varchar(10),
    DEPARTMENT_ID decimal(4,0)
)

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

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

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

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

CREATE TABLE departments (
    DEPARTMENT_ID decimal(4,0),
    DEPARTMENT_NAME varchar(30),
    MANAGER_ID decimal(6,0),
    LOCATION_ID decimal(4,0)
) ### Response: SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees ORDER BY COUNT(HIRE_DATE)


Instruction: Which Result has a Score of 4-1, and a Competition of world cup qualifying?

Input:
CREATE TABLE table_34793 (
    "Date" text,
    "Result" text,
    "Score" text,
    "Brazil scorers" text,
    "Competition" text
)

Response: SELECT "Result" FROM table_34793 WHERE "Score" = '4-1' AND "Competition" = 'world cup qualifying'

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 Result has a Score of 4-1, and a Competition of world cup qualifying? ### Input: CREATE TABLE table_34793 (
    "Date" text,
    "Result" text,
    "Score" text,
    "Brazil scorers" text,
    "Competition" text
) ### Response: SELECT "Result" FROM table_34793 WHERE "Score" = '4-1' AND "Competition" = 'world cup qualifying'


Instruction: now i need flight information leaving ATLANTA and arriving in BALTIMORE in the afternoon

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

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

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 class_of_service (
    booking_class varchar,
    rank int,
    class_description text
)

CREATE TABLE days (
    days_code varchar,
    day_name varchar
)

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

CREATE TABLE 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 time_zone (
    time_zone_code text,
    time_zone_name text,
    hours_from_gmt 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 state (
    state_code text,
    state_name text,
    country_name text
)

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

CREATE TABLE city (
    city_code varchar,
    city_name varchar,
    state_code varchar,
    country_name varchar,
    time_zone_code 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 ground_service (
    city_code text,
    airport_code text,
    transport_type text,
    ground_fare int
)

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

CREATE TABLE flight_fare (
    flight_id int,
    fare_id int
)

CREATE TABLE month (
    month_number int,
    month_name text
)

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

CREATE TABLE 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 food_service (
    meal_code text,
    meal_number int,
    compartment text,
    meal_description varchar
)

CREATE TABLE compartment_class (
    compartment varchar,
    class_type varchar
)

CREATE TABLE code_description (
    code varchar,
    description text
)

CREATE TABLE equipment_sequence (
    aircraft_code_sequence varchar,
    aircraft_code varchar
)

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

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

Response: SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.departure_time BETWEEN 1200 AND 1800

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: now i need flight information leaving ATLANTA and arriving in BALTIMORE in the afternoon ### Input: CREATE TABLE date_day (
    month_number int,
    day_number int,
    year int,
    day_name varchar
)

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

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 class_of_service (
    booking_class varchar,
    rank int,
    class_description text
)

CREATE TABLE days (
    days_code varchar,
    day_name varchar
)

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

CREATE TABLE 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 time_zone (
    time_zone_code text,
    time_zone_name text,
    hours_from_gmt 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 state (
    state_code text,
    state_name text,
    country_name text
)

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

CREATE TABLE city (
    city_code varchar,
    city_name varchar,
    state_code varchar,
    country_name varchar,
    time_zone_code 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 ground_service (
    city_code text,
    airport_code text,
    transport_type text,
    ground_fare int
)

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

CREATE TABLE flight_fare (
    flight_id int,
    fare_id int
)

CREATE TABLE month (
    month_number int,
    month_name text
)

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

CREATE TABLE 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 food_service (
    meal_code text,
    meal_number int,
    compartment text,
    meal_description varchar
)

CREATE TABLE compartment_class (
    compartment varchar,
    class_type varchar
)

CREATE TABLE code_description (
    code varchar,
    description text
)

CREATE TABLE equipment_sequence (
    aircraft_code_sequence varchar,
    aircraft_code varchar
)

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

CREATE TABLE time_interval (
    period text,
    begin_time int,
    end_time int
) ### Response: SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.departure_time BETWEEN 1200 AND 1800


Instruction: What was the To par of Jack Nicklaus?

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

Response: SELECT "To par" FROM table_45304 WHERE "Player" = 'jack nicklaus'

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 To par of Jack Nicklaus? ### Input: CREATE TABLE table_45304 (
    "Place" text,
    "Player" text,
    "Country" text,
    "Score" text,
    "To par" text,
    "Money ( $ )" text
) ### Response: SELECT "To par" FROM table_45304 WHERE "Player" = 'jack nicklaus'


Instruction: what is the most draw when the competition is soviet league and dynamo is more than 34?

Input:
CREATE TABLE table_name_19 (
    draw INTEGER,
    competition VARCHAR,
    dynamo VARCHAR
)

Response: SELECT MAX(draw) FROM table_name_19 WHERE competition = "soviet league" AND dynamo > 34

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the most draw when the competition is soviet league and dynamo is more than 34? ### Input: CREATE TABLE table_name_19 (
    draw INTEGER,
    competition VARCHAR,
    dynamo VARCHAR
) ### Response: SELECT MAX(draw) FROM table_name_19 WHERE competition = "soviet league" AND dynamo > 34


Instruction: COunt the Founded which has a Venue of villa park?

Input:
CREATE TABLE table_8187 (
    "Club" text,
    "Sport" text,
    "Founded" real,
    "League" text,
    "Venue" text
)

Response: SELECT SUM("Founded") FROM table_8187 WHERE "Venue" = 'villa park'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: COunt the Founded which has a Venue of villa park? ### Input: CREATE TABLE table_8187 (
    "Club" text,
    "Sport" text,
    "Founded" real,
    "League" text,
    "Venue" text
) ### Response: SELECT SUM("Founded") FROM table_8187 WHERE "Venue" = 'villa park'


Instruction: In Ghent in 2011, what was the rank-qualifying value when the score-qualifying value was 14.850

Input:
CREATE TABLE table_26681728_1 (
    rank_qualifying INTEGER,
    score_qualifying VARCHAR,
    location VARCHAR,
    year VARCHAR
)

Response: SELECT MAX(rank_qualifying) FROM table_26681728_1 WHERE location = "Ghent" AND year = 2011 AND score_qualifying = "14.850"

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 Ghent in 2011, what was the rank-qualifying value when the score-qualifying value was 14.850 ### Input: CREATE TABLE table_26681728_1 (
    rank_qualifying INTEGER,
    score_qualifying VARCHAR,
    location VARCHAR,
    year VARCHAR
) ### Response: SELECT MAX(rank_qualifying) FROM table_26681728_1 WHERE location = "Ghent" AND year = 2011 AND score_qualifying = "14.850"


Instruction: Find the details for all chip models.

Input:
CREATE TABLE screen_mode (
    graphics_mode number,
    char_cells text,
    pixels text,
    hardware_colours number,
    used_kb number,
    map text,
    type text
)

CREATE TABLE phone (
    company_name text,
    hardware_model_name text,
    accreditation_type text,
    accreditation_level text,
    date text,
    chip_model text,
    screen_mode text
)

CREATE TABLE chip_model (
    model_name text,
    launch_year number,
    ram_mib number,
    rom_mib number,
    slots text,
    wifi text,
    bluetooth text
)

Response: SELECT * FROM chip_model

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the details for all chip models. ### Input: CREATE TABLE screen_mode (
    graphics_mode number,
    char_cells text,
    pixels text,
    hardware_colours number,
    used_kb number,
    map text,
    type text
)

CREATE TABLE phone (
    company_name text,
    hardware_model_name text,
    accreditation_type text,
    accreditation_level text,
    date text,
    chip_model text,
    screen_mode text
)

CREATE TABLE chip_model (
    model_name text,
    launch_year number,
    ram_mib number,
    rom_mib number,
    slots text,
    wifi text,
    bluetooth text
) ### Response: SELECT * FROM chip_model


Instruction: Show the number of documents created in each day and bin document date by weekday with a bar chart, and I want to show by the the number of document date in ascending please.

Input:
CREATE TABLE Ref_Document_Types (
    Document_Type_Code CHAR(15),
    Document_Type_Name VARCHAR(255),
    Document_Type_Description VARCHAR(255)
)

CREATE TABLE Accounts (
    Account_ID INTEGER,
    Statement_ID INTEGER,
    Account_Details VARCHAR(255)
)

CREATE TABLE Ref_Budget_Codes (
    Budget_Type_Code CHAR(15),
    Budget_Type_Description VARCHAR(255)
)

CREATE TABLE Projects (
    Project_ID INTEGER,
    Project_Details VARCHAR(255)
)

CREATE TABLE Documents_with_Expenses (
    Document_ID INTEGER,
    Budget_Type_Code CHAR(15),
    Document_Details VARCHAR(255)
)

CREATE TABLE Documents (
    Document_ID INTEGER,
    Document_Type_Code CHAR(15),
    Project_ID INTEGER,
    Document_Date DATETIME,
    Document_Name VARCHAR(255),
    Document_Description VARCHAR(255),
    Other_Details VARCHAR(255)
)

CREATE TABLE Statements (
    Statement_ID INTEGER,
    Statement_Details VARCHAR(255)
)

Response: SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code ORDER BY COUNT(Document_Date)

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 documents created in each day and bin document date by weekday with a bar chart, and I want to show by the the number of document date in ascending please. ### Input: CREATE TABLE Ref_Document_Types (
    Document_Type_Code CHAR(15),
    Document_Type_Name VARCHAR(255),
    Document_Type_Description VARCHAR(255)
)

CREATE TABLE Accounts (
    Account_ID INTEGER,
    Statement_ID INTEGER,
    Account_Details VARCHAR(255)
)

CREATE TABLE Ref_Budget_Codes (
    Budget_Type_Code CHAR(15),
    Budget_Type_Description VARCHAR(255)
)

CREATE TABLE Projects (
    Project_ID INTEGER,
    Project_Details VARCHAR(255)
)

CREATE TABLE Documents_with_Expenses (
    Document_ID INTEGER,
    Budget_Type_Code CHAR(15),
    Document_Details VARCHAR(255)
)

CREATE TABLE Documents (
    Document_ID INTEGER,
    Document_Type_Code CHAR(15),
    Project_ID INTEGER,
    Document_Date DATETIME,
    Document_Name VARCHAR(255),
    Document_Description VARCHAR(255),
    Other_Details VARCHAR(255)
)

CREATE TABLE Statements (
    Statement_ID INTEGER,
    Statement_Details VARCHAR(255)
) ### Response: SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code ORDER BY COUNT(Document_Date)


Instruction: what is the number of patients whose days of hospital stay is greater than 15 and diagnoses short title is respiratory distress syn?

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

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

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "15" AND diagnoses.short_title = "Respiratory distress syn"

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 days of hospital stay is greater than 15 and diagnoses short title is respiratory distress syn? ### Input: CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
)

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

CREATE TABLE 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 procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "15" AND diagnoses.short_title = "Respiratory distress syn"


Instruction: How many million U.S. viewers watched episode number 6 in the series?

Input:
CREATE TABLE table_25668962_1 (
    us_viewers__million_ VARCHAR,
    no_in_series VARCHAR
)

Response: SELECT us_viewers__million_ FROM table_25668962_1 WHERE no_in_series = 6

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many million U.S. viewers watched episode number 6 in the series? ### Input: CREATE TABLE table_25668962_1 (
    us_viewers__million_ VARCHAR,
    no_in_series VARCHAR
) ### Response: SELECT us_viewers__million_ FROM table_25668962_1 WHERE no_in_series = 6


Instruction: Which Game is the highest one that has High rebounds of pau gasol (11)?

Input:
CREATE TABLE table_name_12 (
    game INTEGER,
    high_rebounds VARCHAR
)

Response: SELECT MAX(game) FROM table_name_12 WHERE high_rebounds = "pau gasol (11)"

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 Game is the highest one that has High rebounds of pau gasol (11)? ### Input: CREATE TABLE table_name_12 (
    game INTEGER,
    high_rebounds VARCHAR
) ### Response: SELECT MAX(game) FROM table_name_12 WHERE high_rebounds = "pau gasol (11)"


Instruction: What was the second qualification time with a first qualification time of 1:02.813?

Input:
CREATE TABLE table_name_29 (
    qual_2 VARCHAR,
    qual_1 VARCHAR
)

Response: SELECT qual_2 FROM table_name_29 WHERE qual_1 = "1:02.813"

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 second qualification time with a first qualification time of 1:02.813? ### Input: CREATE TABLE table_name_29 (
    qual_2 VARCHAR,
    qual_1 VARCHAR
) ### Response: SELECT qual_2 FROM table_name_29 WHERE qual_1 = "1:02.813"


Instruction: What position was the player who was drafted by the Washington Capitals?

Input:
CREATE TABLE table_2850912_10 (
    position VARCHAR,
    nhl_team VARCHAR
)

Response: SELECT position FROM table_2850912_10 WHERE nhl_team = "Washington Capitals"

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 position was the player who was drafted by the Washington Capitals? ### Input: CREATE TABLE table_2850912_10 (
    position VARCHAR,
    nhl_team VARCHAR
) ### Response: SELECT position FROM table_2850912_10 WHERE nhl_team = "Washington Capitals"


Instruction: For those employees who was hired before 2002-06-21, return a bar chart about the distribution of job_id and the sum of employee_id , and group by attribute job_id, and I want to sort by the y-axis in desc.

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

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

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

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

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

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

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

Response: SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) DESC

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, return a bar chart about the distribution of job_id and the sum of employee_id , and group by attribute job_id, and I want to sort by the y-axis in desc. ### Input: CREATE TABLE locations (
    LOCATION_ID decimal(4,0),
    STREET_ADDRESS varchar(40),
    POSTAL_CODE varchar(12),
    CITY varchar(30),
    STATE_PROVINCE varchar(25),
    COUNTRY_ID varchar(2)
)

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

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

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

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

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

CREATE TABLE job_history (
    EMPLOYEE_ID decimal(6,0),
    START_DATE date,
    END_DATE date,
    JOB_ID varchar(10),
    DEPARTMENT_ID decimal(4,0)
) ### Response: SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) DESC


Instruction: Name the literature for pradit prasarttong

Input:
CREATE TABLE table_67645 (
    "Year" real,
    "Literature" text,
    "Music" text,
    "Film" text,
    "Performing arts" text
)

Response: SELECT "Literature" FROM table_67645 WHERE "Performing arts" = 'pradit prasarttong'

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 literature for pradit prasarttong ### Input: CREATE TABLE table_67645 (
    "Year" real,
    "Literature" text,
    "Music" text,
    "Film" text,
    "Performing arts" text
) ### Response: SELECT "Literature" FROM table_67645 WHERE "Performing arts" = 'pradit prasarttong'


Instruction: What is the years coached by the person with a win percentage of 0.667 and 380 losses?

Input:
CREATE TABLE table_34993 (
    "Name" text,
    "Years" text,
    "Seasons" real,
    "Lost" real,
    "Pct." real
)

Response: SELECT "Years" FROM table_34993 WHERE "Pct." = '0.667' AND "Lost" = '380'

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 years coached by the person with a win percentage of 0.667 and 380 losses? ### Input: CREATE TABLE table_34993 (
    "Name" text,
    "Years" text,
    "Seasons" real,
    "Lost" real,
    "Pct." real
) ### Response: SELECT "Years" FROM table_34993 WHERE "Pct." = '0.667' AND "Lost" = '380'


Instruction: which project had greatest number of platforms ?

Input:
CREATE TABLE table_204_398 (
    id number,
    "title" text,
    "year" number,
    "publisher" text,
    "developer" text,
    "platforms" text
)

Response: SELECT "title" FROM table_204_398 ORDER BY "platforms" DESC LIMIT 1

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which project had greatest number of platforms ? ### Input: CREATE TABLE table_204_398 (
    id number,
    "title" text,
    "year" number,
    "publisher" text,
    "developer" text,
    "platforms" text
) ### Response: SELECT "title" FROM table_204_398 ORDER BY "platforms" DESC LIMIT 1


Instruction: provide the number of patients whose insurance is government and procedure icd9 code is 92?

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

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

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

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

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

Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.icd9_code = "92"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose insurance is government and procedure icd9 code is 92? ### Input: CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

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

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

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

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


Instruction: What is College of Ohio State's pick number with an overall lower than 145?

Input:
CREATE TABLE table_name_42 (
    pick__number VARCHAR,
    overall VARCHAR,
    college VARCHAR
)

Response: SELECT pick__number FROM table_name_42 WHERE overall < 145 AND college = "ohio state"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is College of Ohio State's pick number with an overall lower than 145? ### Input: CREATE TABLE table_name_42 (
    pick__number VARCHAR,
    overall VARCHAR,
    college VARCHAR
) ### Response: SELECT pick__number FROM table_name_42 WHERE overall < 145 AND college = "ohio state"


Instruction: What was the date when the opponent was Sheffield Scimitars and the venue was Home?

Input:
CREATE TABLE table_name_4 (
    date VARCHAR,
    opponent VARCHAR,
    venue VARCHAR
)

Response: SELECT date FROM table_name_4 WHERE opponent = "sheffield scimitars" AND venue = "home"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the date when the opponent was Sheffield Scimitars and the venue was Home? ### Input: CREATE TABLE table_name_4 (
    date VARCHAR,
    opponent VARCHAR,
    venue VARCHAR
) ### Response: SELECT date FROM table_name_4 WHERE opponent = "sheffield scimitars" AND venue = "home"


Instruction: Which Rank has a Silver of 1, and a Gold of 0, and a Nation of austria?

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

Response: SELECT "Rank" FROM table_65989 WHERE "Silver" = '1' AND "Gold" = '0' AND "Nation" = 'austria'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Rank has a Silver of 1, and a Gold of 0, and a Nation of austria? ### Input: CREATE TABLE table_65989 (
    "Rank" text,
    "Nation" text,
    "Gold" real,
    "Silver" real,
    "Bronze" real,
    "Total" real
) ### Response: SELECT "Rank" FROM table_65989 WHERE "Silver" = '1' AND "Gold" = '0' AND "Nation" = 'austria'


Instruction: What is the highest amount of points for rank 95?

Input:
CREATE TABLE table_name_49 (
    highest_point VARCHAR,
    rank VARCHAR
)

Response: SELECT highest_point FROM table_name_49 WHERE rank = 95

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 amount of points for rank 95? ### Input: CREATE TABLE table_name_49 (
    highest_point VARCHAR,
    rank VARCHAR
) ### Response: SELECT highest_point FROM table_name_49 WHERE rank = 95


Instruction: Show the customer name, customer address city, date from, and date to for each customer address history.

Input:
CREATE TABLE order_items (
    order_item_id number,
    order_id number,
    product_id number,
    order_quantity text
)

CREATE TABLE customers (
    customer_id number,
    payment_method_code text,
    customer_number text,
    customer_name text,
    customer_address text,
    customer_phone text,
    customer_email text
)

CREATE TABLE customer_address_history (
    customer_id number,
    address_id number,
    date_from time,
    date_to time
)

CREATE TABLE customer_orders (
    order_id number,
    customer_id number,
    order_date time,
    order_status_code text
)

CREATE TABLE addresses (
    address_id number,
    line_1_number_building text,
    city text,
    zip_postcode text,
    state_province_county text,
    country text
)

CREATE TABLE products (
    product_id number,
    product_type_code text,
    product_name text,
    product_price number
)

CREATE TABLE contacts (
    contact_id number,
    customer_id number,
    gender text,
    first_name text,
    last_name text,
    contact_phone text
)

Response: SELECT T2.customer_name, T3.city, T1.date_from, T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id JOIN addresses AS T3 ON T1.address_id = T3.address_id

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the customer name, customer address city, date from, and date to for each customer address history. ### Input: CREATE TABLE order_items (
    order_item_id number,
    order_id number,
    product_id number,
    order_quantity text
)

CREATE TABLE customers (
    customer_id number,
    payment_method_code text,
    customer_number text,
    customer_name text,
    customer_address text,
    customer_phone text,
    customer_email text
)

CREATE TABLE customer_address_history (
    customer_id number,
    address_id number,
    date_from time,
    date_to time
)

CREATE TABLE customer_orders (
    order_id number,
    customer_id number,
    order_date time,
    order_status_code text
)

CREATE TABLE addresses (
    address_id number,
    line_1_number_building text,
    city text,
    zip_postcode text,
    state_province_county text,
    country text
)

CREATE TABLE products (
    product_id number,
    product_type_code text,
    product_name text,
    product_price number
)

CREATE TABLE contacts (
    contact_id number,
    customer_id number,
    gender text,
    first_name text,
    last_name text,
    contact_phone text
) ### Response: SELECT T2.customer_name, T3.city, T1.date_from, T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id JOIN addresses AS T3 ON T1.address_id = T3.address_id


Instruction: What is the maximum t20 on green lane?

Input:
CREATE TABLE table_1176371_1 (
    t20_matches INTEGER,
    name_of_ground VARCHAR
)

Response: SELECT MAX(t20_matches) FROM table_1176371_1 WHERE name_of_ground = "Green Lane"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the maximum t20 on green lane? ### Input: CREATE TABLE table_1176371_1 (
    t20_matches INTEGER,
    name_of_ground VARCHAR
) ### Response: SELECT MAX(t20_matches) FROM table_1176371_1 WHERE name_of_ground = "Green Lane"


Instruction: Most questions with upvoted self-answers.

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

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

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

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

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

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

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

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

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

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

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

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

CREATE TABLE PostTypes (
    Id number,
    Name text
)

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

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

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

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

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

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

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

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

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

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

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

Response: SELECT q.OwnerUserId AS "user_link", COUNT(DISTINCT q.Id) AS "count" FROM Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId WHERE q.OwnerUserId = a.OwnerUserId AND a.Score > 0 GROUP BY q.OwnerUserId ORDER BY 'count' DESC

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Most questions with upvoted self-answers. ### Input: CREATE TABLE ReviewTaskResultTypes (
    Id number,
    Name text,
    Description text
)

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

CREATE TABLE PostTags (
    PostId number,
    TagId number
)

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

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

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

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

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

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

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

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

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

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

CREATE TABLE PostTypes (
    Id number,
    Name text
)

CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE Users (
    Id number,
    Reputation number,
    CreationDate time,
    DisplayName text,
    LastAccessDate time,
    WebsiteUrl text,
    Location text,
    AboutMe text,
    Views number,
    UpVotes number,
    DownVotes number,
    ProfileImageUrl text,
    EmailHash text,
    AccountId number
) ### Response: SELECT q.OwnerUserId AS "user_link", COUNT(DISTINCT q.Id) AS "count" FROM Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId WHERE q.OwnerUserId = a.OwnerUserId AND a.Score > 0 GROUP BY q.OwnerUserId ORDER BY 'count' DESC


Instruction: What is the largest number of episodes for a 1989 season dvd release?

Input:
CREATE TABLE table_1753 (
    "DVD Title" text,
    "No. of Discs" real,
    "Year" text,
    "No. of Episodes" real,
    "Region 1" text,
    "Region 2" text,
    "Region 4" text
)

Response: SELECT MAX("No. of Episodes") FROM table_1753 WHERE "Year" = '1989'

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 largest number of episodes for a 1989 season dvd release? ### Input: CREATE TABLE table_1753 (
    "DVD Title" text,
    "No. of Discs" real,
    "Year" text,
    "No. of Episodes" real,
    "Region 1" text,
    "Region 2" text,
    "Region 4" text
) ### Response: SELECT MAX("No. of Episodes") FROM table_1753 WHERE "Year" = '1989'


Instruction: How many millions of U.S. viewers watched the episode titled 'New Beginnings'?

Input:
CREATE TABLE table_30683 (
    "No. in series" real,
    "Title" text,
    "Directed by" text,
    "Written by" text,
    "Original air date" text,
    "U.S. viewers (million)" text
)

Response: SELECT "U.S. viewers (million)" FROM table_30683 WHERE "Title" = 'New Beginnings'

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 millions of U.S. viewers watched the episode titled 'New Beginnings'? ### Input: CREATE TABLE table_30683 (
    "No. in series" real,
    "Title" text,
    "Directed by" text,
    "Written by" text,
    "Original air date" text,
    "U.S. viewers (million)" text
) ### Response: SELECT "U.S. viewers (million)" FROM table_30683 WHERE "Title" = 'New Beginnings'


Instruction: Bar chart, the-axis is the state, and the Y axis is each state's the smallest enrollment.

Input:
CREATE TABLE College (
    cName varchar(20),
    state varchar(2),
    enr numeric(5,0)
)

CREATE TABLE Player (
    pID numeric(5,0),
    pName varchar(20),
    yCard varchar(3),
    HS numeric(5,0)
)

CREATE TABLE Tryout (
    pID numeric(5,0),
    cName varchar(20),
    pPos varchar(8),
    decision varchar(3)
)

Response: SELECT state, MIN(enr) FROM College GROUP BY state

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Bar chart, the-axis is the state, and the Y axis is each state's the smallest enrollment. ### Input: CREATE TABLE College (
    cName varchar(20),
    state varchar(2),
    enr numeric(5,0)
)

CREATE TABLE Player (
    pID numeric(5,0),
    pName varchar(20),
    yCard varchar(3),
    HS numeric(5,0)
)

CREATE TABLE Tryout (
    pID numeric(5,0),
    cName varchar(20),
    pPos varchar(8),
    decision varchar(3)
) ### Response: SELECT state, MIN(enr) FROM College GROUP BY state


Instruction: When dwhr-tv is the call sign how many station types are there?

Input:
CREATE TABLE table_23394920_1 (
    station_type VARCHAR,
    callsign VARCHAR
)

Response: SELECT COUNT(station_type) FROM table_23394920_1 WHERE callsign = "DWHR-TV"

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 dwhr-tv is the call sign how many station types are there? ### Input: CREATE TABLE table_23394920_1 (
    station_type VARCHAR,
    callsign VARCHAR
) ### Response: SELECT COUNT(station_type) FROM table_23394920_1 WHERE callsign = "DWHR-TV"


Instruction: What is the average Wins, when Points is less than '19'?

Input:
CREATE TABLE table_name_32 (
    wins INTEGER,
    points INTEGER
)

Response: SELECT AVG(wins) FROM table_name_32 WHERE points < 19

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 Wins, when Points is less than '19'? ### Input: CREATE TABLE table_name_32 (
    wins INTEGER,
    points INTEGER
) ### Response: SELECT AVG(wins) FROM table_name_32 WHERE points < 19


Instruction: how many mayors were in office for a total of 9 years ?

Input:
CREATE TABLE table_201_10 (
    id number,
    "#" number,
    "name" text,
    "office" text,
    "political party" text,
    "occupation" text
)

Response: SELECT COUNT("name") FROM table_201_10 WHERE "office" - "office" = 9

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 mayors were in office for a total of 9 years ? ### Input: CREATE TABLE table_201_10 (
    id number,
    "#" number,
    "name" text,
    "office" text,
    "political party" text,
    "occupation" text
) ### Response: SELECT COUNT("name") FROM table_201_10 WHERE "office" - "office" = 9


Instruction: Who got the loss for the game ending in a record of 55-41?

Input:
CREATE TABLE table_name_74 (
    loss VARCHAR,
    record VARCHAR
)

Response: SELECT loss FROM table_name_74 WHERE record = "55-41"

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 got the loss for the game ending in a record of 55-41? ### Input: CREATE TABLE table_name_74 (
    loss VARCHAR,
    record VARCHAR
) ### Response: SELECT loss FROM table_name_74 WHERE record = "55-41"


Instruction: Which venue has 1st as the result?

Input:
CREATE TABLE table_name_45 (
    venue VARCHAR,
    result VARCHAR
)

Response: SELECT venue FROM table_name_45 WHERE result = "1st"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which venue has 1st as the result? ### Input: CREATE TABLE table_name_45 (
    venue VARCHAR,
    result VARCHAR
) ### Response: SELECT venue FROM table_name_45 WHERE result = "1st"


Instruction: What was the average year for a coin that had a mintage smaller than 10,000?

Input:
CREATE TABLE table_name_13 (
    year INTEGER,
    mintage INTEGER
)

Response: SELECT AVG(year) FROM table_name_13 WHERE mintage < 10 OFFSET 000

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 average year for a coin that had a mintage smaller than 10,000? ### Input: CREATE TABLE table_name_13 (
    year INTEGER,
    mintage INTEGER
) ### Response: SELECT AVG(year) FROM table_name_13 WHERE mintage < 10 OFFSET 000


Instruction: Name the south american rank for venezuela

Input:
CREATE TABLE table_2249087_1 (
    south_american_rank INTEGER,
    nation VARCHAR
)

Response: SELECT MIN(south_american_rank) FROM table_2249087_1 WHERE nation = "Venezuela"

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 south american rank for venezuela ### Input: CREATE TABLE table_2249087_1 (
    south_american_rank INTEGER,
    nation VARCHAR
) ### Response: SELECT MIN(south_american_rank) FROM table_2249087_1 WHERE nation = "Venezuela"


Instruction: Show me about the distribution of All_Road and All_Games_Percent in a bar chart, and I want to show by the names in desc please.

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

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

Response: SELECT All_Road, All_Games_Percent FROM basketball_match ORDER BY All_Road 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: Show me about the distribution of All_Road and All_Games_Percent in a bar chart, and I want to show by the names in desc please. ### Input: CREATE TABLE university (
    School_ID int,
    School text,
    Location text,
    Founded real,
    Affiliation text,
    Enrollment real,
    Nickname text,
    Primary_conference text
)

CREATE TABLE basketball_match (
    Team_ID int,
    School_ID int,
    Team_Name text,
    ACC_Regular_Season text,
    ACC_Percent text,
    ACC_Home text,
    ACC_Road text,
    All_Games text,
    All_Games_Percent int,
    All_Home text,
    All_Road text,
    All_Neutral text
) ### Response: SELECT All_Road, All_Games_Percent FROM basketball_match ORDER BY All_Road DESC


Instruction: For the game on 13 December 1975 with Halifax Town as the away team what was the score?

Input:
CREATE TABLE table_name_4 (
    score VARCHAR,
    date VARCHAR,
    away_team VARCHAR
)

Response: SELECT score FROM table_name_4 WHERE date = "13 december 1975" AND away_team = "halifax town"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For the game on 13 December 1975 with Halifax Town as the away team what was the score? ### Input: CREATE TABLE table_name_4 (
    score VARCHAR,
    date VARCHAR,
    away_team VARCHAR
) ### Response: SELECT score FROM table_name_4 WHERE date = "13 december 1975" AND away_team = "halifax town"


Instruction: what flight goes from DENVER to BALTIMORE FIRST class on UA arriving on 5 7

Input:
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 airline (
    airline_code varchar,
    airline_name text,
    note text
)

CREATE TABLE flight_fare (
    flight_id int,
    fare_id int
)

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 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 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 ground_service (
    city_code text,
    airport_code text,
    transport_type text,
    ground_fare int
)

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

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

CREATE TABLE days (
    days_code varchar,
    day_name varchar
)

CREATE TABLE equipment_sequence (
    aircraft_code_sequence varchar,
    aircraft_code varchar
)

CREATE TABLE month (
    month_number int,
    month_name text
)

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

CREATE TABLE code_description (
    code varchar,
    description text
)

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

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

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

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

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

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

CREATE TABLE compartment_class (
    compartment varchar,
    class_type varchar
)

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 food_service (
    meal_code text,
    meal_number int,
    compartment text,
    meal_description varchar
)

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

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

Response: SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare AS FARE_0, fare AS FARE_1, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, fare_basis AS FARE_BASIS_2, flight, flight_fare AS FLIGHT_FARE_0, flight_fare AS FLIGHT_FARE_1 WHERE (((((((flight.departure_time > flight.arrival_time) AND DATE_DAY_1.day_number = 6 AND DATE_DAY_1.month_number = 5 AND DATE_DAY_1.year = 1991 AND DAYS_1.day_name = DATE_DAY_1.day_name AND flight.flight_days = DAYS_1.days_code) AND DATE_DAY_0.day_number = 6 AND DATE_DAY_0.month_number = 5 AND DATE_DAY_0.year = 1991 AND DAYS_0.day_name = DATE_DAY_0.day_name AND FARE_BASIS_0.class_type = 'FIRST' AND FARE_BASIS_1.basis_days = DAYS_0.days_code AND FARE_0.fare_basis_code = FARE_BASIS_0.fare_basis_code AND FARE_0.fare_basis_code = FARE_BASIS_1.fare_basis_code AND FLIGHT_FARE_0.fare_id = FARE_0.fare_id AND flight.flight_id = FLIGHT_FARE_0.flight_id) OR ((DATE_DAY_1.day_number = 7 AND DATE_DAY_1.month_number = 5 AND DATE_DAY_1.year = 1991 AND DAYS_1.day_name = DATE_DAY_1.day_name AND flight.flight_days = DAYS_1.days_code AND NOT (flight.departure_time > flight.arrival_time)) AND DATE_DAY_0.day_number = 7 AND DATE_DAY_0.month_number = 5 AND DATE_DAY_0.year = 1991 AND DAYS_0.day_name = DATE_DAY_0.day_name AND FARE_BASIS_0.class_type = 'FIRST' AND FARE_BASIS_1.basis_days = DAYS_0.days_code AND FARE_0.fare_basis_code = FARE_BASIS_0.fare_basis_code AND FARE_0.fare_basis_code = FARE_BASIS_1.fare_basis_code AND FLIGHT_FARE_0.fare_id = FARE_0.fare_id AND flight.flight_id = FLIGHT_FARE_0.flight_id)) AND FARE_BASIS_2.class_type = 'FIRST' AND FARE_1.fare_basis_code = FARE_BASIS_2.fare_basis_code AND FLIGHT_FARE_1.fare_id = FARE_1.fare_id AND flight.flight_id = FLIGHT_FARE_1.flight_id) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.airline_code = 'UA'

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 flight goes from DENVER to BALTIMORE FIRST class on UA arriving on 5 7 ### Input: 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 airline (
    airline_code varchar,
    airline_name text,
    note text
)

CREATE TABLE flight_fare (
    flight_id int,
    fare_id int
)

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 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 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 ground_service (
    city_code text,
    airport_code text,
    transport_type text,
    ground_fare int
)

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

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

CREATE TABLE days (
    days_code varchar,
    day_name varchar
)

CREATE TABLE equipment_sequence (
    aircraft_code_sequence varchar,
    aircraft_code varchar
)

CREATE TABLE month (
    month_number int,
    month_name text
)

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

CREATE TABLE code_description (
    code varchar,
    description text
)

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

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

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

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

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

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

CREATE TABLE compartment_class (
    compartment varchar,
    class_type varchar
)

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 food_service (
    meal_code text,
    meal_number int,
    compartment text,
    meal_description varchar
)

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

CREATE TABLE time_zone (
    time_zone_code text,
    time_zone_name text,
    hours_from_gmt int
) ### Response: SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare AS FARE_0, fare AS FARE_1, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, fare_basis AS FARE_BASIS_2, flight, flight_fare AS FLIGHT_FARE_0, flight_fare AS FLIGHT_FARE_1 WHERE (((((((flight.departure_time > flight.arrival_time) AND DATE_DAY_1.day_number = 6 AND DATE_DAY_1.month_number = 5 AND DATE_DAY_1.year = 1991 AND DAYS_1.day_name = DATE_DAY_1.day_name AND flight.flight_days = DAYS_1.days_code) AND DATE_DAY_0.day_number = 6 AND DATE_DAY_0.month_number = 5 AND DATE_DAY_0.year = 1991 AND DAYS_0.day_name = DATE_DAY_0.day_name AND FARE_BASIS_0.class_type = 'FIRST' AND FARE_BASIS_1.basis_days = DAYS_0.days_code AND FARE_0.fare_basis_code = FARE_BASIS_0.fare_basis_code AND FARE_0.fare_basis_code = FARE_BASIS_1.fare_basis_code AND FLIGHT_FARE_0.fare_id = FARE_0.fare_id AND flight.flight_id = FLIGHT_FARE_0.flight_id) OR ((DATE_DAY_1.day_number = 7 AND DATE_DAY_1.month_number = 5 AND DATE_DAY_1.year = 1991 AND DAYS_1.day_name = DATE_DAY_1.day_name AND flight.flight_days = DAYS_1.days_code AND NOT (flight.departure_time > flight.arrival_time)) AND DATE_DAY_0.day_number = 7 AND DATE_DAY_0.month_number = 5 AND DATE_DAY_0.year = 1991 AND DAYS_0.day_name = DATE_DAY_0.day_name AND FARE_BASIS_0.class_type = 'FIRST' AND FARE_BASIS_1.basis_days = DAYS_0.days_code AND FARE_0.fare_basis_code = FARE_BASIS_0.fare_basis_code AND FARE_0.fare_basis_code = FARE_BASIS_1.fare_basis_code AND FLIGHT_FARE_0.fare_id = FARE_0.fare_id AND flight.flight_id = FLIGHT_FARE_0.flight_id)) AND FARE_BASIS_2.class_type = 'FIRST' AND FARE_1.fare_basis_code = FARE_BASIS_2.fare_basis_code AND FLIGHT_FARE_1.fare_id = FARE_1.fare_id AND flight.flight_id = FLIGHT_FARE_1.flight_id) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.airline_code = 'UA'


Instruction: What is the lowest number of participants in 2010 when there were 0 participants in 2012?

Input:
CREATE TABLE table_7828 (
    "Country" text,
    "2010" real,
    "2011" real,
    "2012" real,
    "2013" real
)

Response: SELECT MIN("2010") FROM table_7828 WHERE "2012" < '0'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest number of participants in 2010 when there were 0 participants in 2012? ### Input: CREATE TABLE table_7828 (
    "Country" text,
    "2010" real,
    "2011" real,
    "2012" real,
    "2013" real
) ### Response: SELECT MIN("2010") FROM table_7828 WHERE "2012" < '0'


Instruction: When was the date of appointment for the manager replacing Wim Jansen?

Input:
CREATE TABLE table_20539 (
    "Team" text,
    "Outgoing manager" text,
    "Manner of departure" text,
    "Date of vacancy" text,
    "Replaced by" text,
    "Date of appointment" text
)

Response: SELECT "Date of appointment" FROM table_20539 WHERE "Outgoing manager" = 'Wim Jansen'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the date of appointment for the manager replacing Wim Jansen? ### Input: CREATE TABLE table_20539 (
    "Team" text,
    "Outgoing manager" text,
    "Manner of departure" text,
    "Date of vacancy" text,
    "Replaced by" text,
    "Date of appointment" text
) ### Response: SELECT "Date of appointment" FROM table_20539 WHERE "Outgoing manager" = 'Wim Jansen'


Instruction: What was Barreto's song choice when the theme was samba?

Input:
CREATE TABLE table_27614571_1 (
    song_choice VARCHAR,
    theme VARCHAR
)

Response: SELECT song_choice FROM table_27614571_1 WHERE theme = "Samba"

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 Barreto's song choice when the theme was samba? ### Input: CREATE TABLE table_27614571_1 (
    song_choice VARCHAR,
    theme VARCHAR
) ### Response: SELECT song_choice FROM table_27614571_1 WHERE theme = "Samba"


Instruction: Give me a histogram for what are the total number of credits offered by each department?, could you rank by the names from low to high?

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

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

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

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

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

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

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

Response: SELECT DEPT_CODE, SUM(T1.CRS_CREDIT) FROM COURSE AS T1 JOIN CLASS AS T2 ON T1.CRS_CODE = T2.CRS_CODE GROUP BY T1.DEPT_CODE ORDER BY DEPT_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: Give me a histogram for what are the total number of credits offered by each department?, could you rank by the names from low to high? ### Input: CREATE TABLE CLASS (
    CLASS_CODE varchar(5),
    CRS_CODE varchar(10),
    CLASS_SECTION varchar(2),
    CLASS_TIME varchar(20),
    CLASS_ROOM varchar(8),
    PROF_NUM int
)

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

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

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

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

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

CREATE TABLE COURSE (
    CRS_CODE varchar(10),
    DEPT_CODE varchar(10),
    CRS_DESCRIPTION varchar(35),
    CRS_CREDIT float(8)
) ### Response: SELECT DEPT_CODE, SUM(T1.CRS_CREDIT) FROM COURSE AS T1 JOIN CLASS AS T2 ON T1.CRS_CODE = T2.CRS_CODE GROUP BY T1.DEPT_CODE ORDER BY DEPT_CODE


Instruction: What was the max points you when when you place 9th?

Input:
CREATE TABLE table_1653 (
    "Season" text,
    "Series" text,
    "Team Name" text,
    "Races" real,
    "Poles" real,
    "Wins" real,
    "Points" real,
    "Final Placing" text
)

Response: SELECT MAX("Points") FROM table_1653 WHERE "Final Placing" = '9th'

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 max points you when when you place 9th? ### Input: CREATE TABLE table_1653 (
    "Season" text,
    "Series" text,
    "Team Name" text,
    "Races" real,
    "Poles" real,
    "Wins" real,
    "Points" real,
    "Final Placing" text
) ### Response: SELECT MAX("Points") FROM table_1653 WHERE "Final Placing" = '9th'


Instruction: What was the finish for Lanny Wadkins of the United States?

Input:
CREATE TABLE table_59667 (
    "Player" text,
    "Country" text,
    "Year(s) won" text,
    "Total" real,
    "To par" text,
    "Finish" text
)

Response: SELECT "Finish" FROM table_59667 WHERE "Country" = 'united states' AND "Player" = 'lanny wadkins'

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 finish for Lanny Wadkins of the United States? ### Input: CREATE TABLE table_59667 (
    "Player" text,
    "Country" text,
    "Year(s) won" text,
    "Total" real,
    "To par" text,
    "Finish" text
) ### Response: SELECT "Finish" FROM table_59667 WHERE "Country" = 'united states' AND "Player" = 'lanny wadkins'


Instruction: List the scores of all games when Miami were listed as the first Semi finalist

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

Response: SELECT "Score" FROM table_72167 WHERE "Semi-Finalist #1" = 'Miami'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: List the scores of all games when Miami were listed as the first Semi finalist ### Input: CREATE TABLE table_72167 (
    "Year" real,
    "Champion" text,
    "Score" text,
    "Runner-Up" text,
    "Location" text,
    "Semi-Finalist #1" text,
    "Semi-Finalist #2" text
) ### Response: SELECT "Score" FROM table_72167 WHERE "Semi-Finalist #1" = 'Miami'


Instruction: What category was the nominated in after 2008?

Input:
CREATE TABLE table_name_31 (
    category VARCHAR,
    outcome VARCHAR,
    year VARCHAR
)

Response: SELECT category FROM table_name_31 WHERE outcome = "nominated" AND year > 2008

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What category was the nominated in after 2008? ### Input: CREATE TABLE table_name_31 (
    category VARCHAR,
    outcome VARCHAR,
    year VARCHAR
) ### Response: SELECT category FROM table_name_31 WHERE outcome = "nominated" AND year > 2008


Instruction: what are the number of patients who had received a open reduct mandible fx procedure since 3 years ago?

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

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

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

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

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

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

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

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

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

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

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 cost (
    row_id number,
    subject_id number,
    hadm_id number,
    event_type text,
    event_id number,
    chargetime time,
    cost number
)

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

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

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

Response: SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'open reduct mandible fx') AND DATETIME(procedures_icd.charttime) >= DATETIME(CURRENT_TIME(), '-3 year'))

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the number of patients who had received a open reduct mandible fx procedure since 3 years ago? ### Input: CREATE TABLE d_icd_procedures (
    row_id number,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

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

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

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

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

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

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

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

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 cost (
    row_id number,
    subject_id number,
    hadm_id number,
    event_type text,
    event_id number,
    chargetime time,
    cost number
)

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

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

CREATE TABLE 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 labevents (
    row_id number,
    subject_id number,
    hadm_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
) ### Response: SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'open reduct mandible fx') AND DATETIME(procedures_icd.charttime) >= DATETIME(CURRENT_TIME(), '-3 year'))


Instruction: How many times does November 3rd occur when January 15, 1991 does?

Input:
CREATE TABLE table_27465 (
    "June 10-11" text,
    "March 27-29" text,
    "January 15-16" text,
    "November 3" text,
    "August 21-22" text
)

Response: SELECT COUNT("November 3") FROM table_27465 WHERE "January 15-16" = 'January 15, 1991'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many times does November 3rd occur when January 15, 1991 does? ### Input: CREATE TABLE table_27465 (
    "June 10-11" text,
    "March 27-29" text,
    "January 15-16" text,
    "November 3" text,
    "August 21-22" text
) ### Response: SELECT COUNT("November 3") FROM table_27465 WHERE "January 15-16" = 'January 15, 1991'


Instruction: Which date has a week larger than 14?

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

Response: SELECT "Date" FROM table_31800 WHERE "Week" > '14'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which date has a week larger than 14? ### Input: CREATE TABLE table_31800 (
    "Week" real,
    "Date" text,
    "Opponent" text,
    "Result" text,
    "Venue" text,
    "Attendance" text
) ### Response: SELECT "Date" FROM table_31800 WHERE "Week" > '14'


Instruction: count the number of times patient 006-76924 has had an urinary catheter output: indwelling/continuous ure output since 12/02/2100.

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

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

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

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

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

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

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

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

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

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

Response: SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-76924')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.celllabel = 'urinary catheter output: indwelling/continuous ure' AND STRFTIME('%y-%m-%d', intakeoutput.intakeoutputtime) >= '2100-12-02'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of times patient 006-76924 has had an urinary catheter output: indwelling/continuous ure output since 12/02/2100. ### Input: CREATE TABLE diagnosis (
    diagnosisid number,
    patientunitstayid number,
    diagnosisname text,
    diagnosistime time,
    icd9code text
)

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

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

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

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

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

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

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

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

CREATE TABLE intakeoutput (
    intakeoutputid number,
    patientunitstayid number,
    cellpath text,
    celllabel text,
    cellvaluenumeric number,
    intakeoutputtime time
) ### Response: SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-76924')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.celllabel = 'urinary catheter output: indwelling/continuous ure' AND STRFTIME('%y-%m-%d', intakeoutput.intakeoutputtime) >= '2100-12-02'


Instruction: What is the overall number of the player from Utah with a pick # higher than 7?

Input:
CREATE TABLE table_name_54 (
    overall INTEGER,
    college VARCHAR,
    pick__number VARCHAR
)

Response: SELECT SUM(overall) FROM table_name_54 WHERE college = "utah" AND pick__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 overall number of the player from Utah with a pick # higher than 7? ### Input: CREATE TABLE table_name_54 (
    overall INTEGER,
    college VARCHAR,
    pick__number VARCHAR
) ### Response: SELECT SUM(overall) FROM table_name_54 WHERE college = "utah" AND pick__number < 7


Instruction: What is the score for the Dec 11 game?

Input:
CREATE TABLE table_name_83 (
    score VARCHAR,
    december VARCHAR
)

Response: SELECT score FROM table_name_83 WHERE december = 11

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the score for the Dec 11 game? ### Input: CREATE TABLE table_name_83 (
    score VARCHAR,
    december VARCHAR
) ### Response: SELECT score FROM table_name_83 WHERE december = 11