Instruction: Would you mind informing me what all of the ULCS classes are ?

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

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

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

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

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

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

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

CREATE TABLE area (
    course_id int,
    area varchar
)

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

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

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

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

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

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

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

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

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

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

Response: SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Would you mind informing me what all of the ULCS classes are ? ### Input: CREATE TABLE offering_instructor (
    offering_instructor_id int,
    offering_id int,
    instructor_id int
)

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

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

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

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

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

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

CREATE TABLE area (
    course_id int,
    area varchar
)

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

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

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

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

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

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

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

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

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

CREATE TABLE program_course (
    program_id int,
    course_id int,
    workload int,
    category varchar
) ### Response: SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id


Instruction: display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a T .

Input:
CREATE TABLE employees (
    employee_id VARCHAR,
    first_name VARCHAR,
    last_name VARCHAR,
    department_id VARCHAR
)

Response: SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%')

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: display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a T . ### Input: CREATE TABLE employees (
    employee_id VARCHAR,
    first_name VARCHAR,
    last_name VARCHAR,
    department_id VARCHAR
) ### Response: SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%')


Instruction: What Round against Aleksander Emelianenko had a time of 5:00?

Input:
CREATE TABLE table_40258 (
    "Res." text,
    "Record" text,
    "Opponent" text,
    "Method" text,
    "Event" text,
    "Round" real,
    "Time" text,
    "Location" text
)

Response: SELECT "Round" FROM table_40258 WHERE "Time" = '5:00' AND "Opponent" = 'aleksander emelianenko'

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 Round against Aleksander Emelianenko had a time of 5:00? ### Input: CREATE TABLE table_40258 (
    "Res." text,
    "Record" text,
    "Opponent" text,
    "Method" text,
    "Event" text,
    "Round" real,
    "Time" text,
    "Location" text
) ### Response: SELECT "Round" FROM table_40258 WHERE "Time" = '5:00' AND "Opponent" = 'aleksander emelianenko'


Instruction: which company has a person that can wear clothing in 33-23-36

Input:
CREATE TABLE table_27515452_3 (
    agency VARCHAR,
    sizes VARCHAR
)

Response: SELECT agency FROM table_27515452_3 WHERE sizes = "33-23-36"

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 company has a person that can wear clothing in 33-23-36 ### Input: CREATE TABLE table_27515452_3 (
    agency VARCHAR,
    sizes VARCHAR
) ### Response: SELECT agency FROM table_27515452_3 WHERE sizes = "33-23-36"


Instruction: Which Nation has a Gold larger than 0, and a Total larger than 4, and a Rank of 6?

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

Response: SELECT "Nation" FROM table_48308 WHERE "Gold" > '0' AND "Total" > '4' AND "Rank" = '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: Which Nation has a Gold larger than 0, and a Total larger than 4, and a Rank of 6? ### Input: CREATE TABLE table_48308 (
    "Rank" text,
    "Nation" text,
    "Gold" real,
    "Silver" real,
    "Bronze" real,
    "Total" real
) ### Response: SELECT "Nation" FROM table_48308 WHERE "Gold" > '0' AND "Total" > '4' AND "Rank" = '6'


Instruction: For all employees who have the letters D or S in their first name, show me about the distribution of hire_date and the amount of hire_date bin hire_date by weekday in a bar chart, and rank from high to low by the Y please.

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 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 departments (
    DEPARTMENT_ID decimal(4,0),
    DEPARTMENT_NAME varchar(30),
    MANAGER_ID decimal(6,0),
    LOCATION_ID decimal(4,0)
)

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

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

Response: SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY COUNT(HIRE_DATE) 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 all employees who have the letters D or S in their first name, show me about the distribution of hire_date and the amount of hire_date bin hire_date by weekday in a bar chart, and rank from high to low by the Y please. ### 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 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 departments (
    DEPARTMENT_ID decimal(4,0),
    DEPARTMENT_NAME varchar(30),
    MANAGER_ID decimal(6,0),
    LOCATION_ID decimal(4,0)
)

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

CREATE TABLE countries (
    COUNTRY_ID varchar(2),
    COUNTRY_NAME varchar(40),
    REGION_ID decimal(10,0)
) ### Response: SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY COUNT(HIRE_DATE) DESC


Instruction: If the record is 5-8, what is the team name?

Input:
CREATE TABLE table_73512 (
    "Game" real,
    "Date" text,
    "Team" text,
    "Score" text,
    "High points" text,
    "High rebounds" text,
    "High assists" text,
    "Location Attendance" text,
    "Record" text
)

Response: SELECT "Team" FROM table_73512 WHERE "Record" = '5-8'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: If the record is 5-8, what is the team name? ### Input: CREATE TABLE table_73512 (
    "Game" real,
    "Date" text,
    "Team" text,
    "Score" text,
    "High points" text,
    "High rebounds" text,
    "High assists" text,
    "Location Attendance" text,
    "Record" text
) ### Response: SELECT "Team" FROM table_73512 WHERE "Record" = '5-8'


Instruction: How many courses for each subject? Plot a bar chart, could you display bar in ascending order?

Input:
CREATE TABLE Subjects (
    subject_id INTEGER,
    subject_name VARCHAR(120)
)

CREATE TABLE Student_Tests_Taken (
    registration_id INTEGER,
    date_test_taken DATETIME,
    test_result VARCHAR(255)
)

CREATE TABLE Students (
    student_id INTEGER,
    date_of_registration DATETIME,
    date_of_latest_logon DATETIME,
    login_name VARCHAR(40),
    password VARCHAR(10),
    personal_name VARCHAR(40),
    middle_name VARCHAR(40),
    family_name VARCHAR(40)
)

CREATE TABLE Course_Authors_and_Tutors (
    author_id INTEGER,
    author_tutor_ATB VARCHAR(3),
    login_name VARCHAR(40),
    password VARCHAR(40),
    personal_name VARCHAR(80),
    middle_name VARCHAR(80),
    family_name VARCHAR(80),
    gender_mf VARCHAR(1),
    address_line_1 VARCHAR(80)
)

CREATE TABLE Student_Course_Enrolment (
    registration_id INTEGER,
    student_id INTEGER,
    course_id INTEGER,
    date_of_enrolment DATETIME,
    date_of_completion DATETIME
)

CREATE TABLE Courses (
    course_id INTEGER,
    author_id INTEGER,
    subject_id INTEGER,
    course_name VARCHAR(120),
    course_description VARCHAR(255)
)

Response: SELECT subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY subject_name

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many courses for each subject? Plot a bar chart, could you display bar in ascending order? ### Input: CREATE TABLE Subjects (
    subject_id INTEGER,
    subject_name VARCHAR(120)
)

CREATE TABLE Student_Tests_Taken (
    registration_id INTEGER,
    date_test_taken DATETIME,
    test_result VARCHAR(255)
)

CREATE TABLE Students (
    student_id INTEGER,
    date_of_registration DATETIME,
    date_of_latest_logon DATETIME,
    login_name VARCHAR(40),
    password VARCHAR(10),
    personal_name VARCHAR(40),
    middle_name VARCHAR(40),
    family_name VARCHAR(40)
)

CREATE TABLE Course_Authors_and_Tutors (
    author_id INTEGER,
    author_tutor_ATB VARCHAR(3),
    login_name VARCHAR(40),
    password VARCHAR(40),
    personal_name VARCHAR(80),
    middle_name VARCHAR(80),
    family_name VARCHAR(80),
    gender_mf VARCHAR(1),
    address_line_1 VARCHAR(80)
)

CREATE TABLE Student_Course_Enrolment (
    registration_id INTEGER,
    student_id INTEGER,
    course_id INTEGER,
    date_of_enrolment DATETIME,
    date_of_completion DATETIME
)

CREATE TABLE Courses (
    course_id INTEGER,
    author_id INTEGER,
    subject_id INTEGER,
    course_name VARCHAR(120),
    course_description VARCHAR(255)
) ### Response: SELECT subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY subject_name


Instruction: Are there any Teams after 1997?

Input:
CREATE TABLE table_69280 (
    "Year" real,
    "Class" text,
    "Tyres" text,
    "Team" text,
    "Co-Drivers" text,
    "Laps" real,
    "Pos." text
)

Response: SELECT "Team" FROM table_69280 WHERE "Year" > '1997'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Are there any Teams after 1997? ### Input: CREATE TABLE table_69280 (
    "Year" real,
    "Class" text,
    "Tyres" text,
    "Team" text,
    "Co-Drivers" text,
    "Laps" real,
    "Pos." text
) ### Response: SELECT "Team" FROM table_69280 WHERE "Year" > '1997'


Instruction: What skip has angela tuvaeva as the lead?

Input:
CREATE TABLE table_75427 (
    "Country" text,
    "Skip" text,
    "Third" text,
    "Second" text,
    "Lead" text
)

Response: SELECT "Skip" FROM table_75427 WHERE "Lead" = 'angela tuvaeva'

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 skip has angela tuvaeva as the lead? ### Input: CREATE TABLE table_75427 (
    "Country" text,
    "Skip" text,
    "Third" text,
    "Second" text,
    "Lead" text
) ### Response: SELECT "Skip" FROM table_75427 WHERE "Lead" = 'angela tuvaeva'


Instruction: Create a pie chart showing the total number across outcome code.

Input:
CREATE TABLE Mailshot_Customers (
    mailshot_id INTEGER,
    customer_id INTEGER,
    outcome_code VARCHAR(15),
    mailshot_customer_date DATETIME
)

CREATE TABLE Products (
    product_id INTEGER,
    product_category VARCHAR(15),
    product_name VARCHAR(80)
)

CREATE TABLE Mailshot_Campaigns (
    mailshot_id INTEGER,
    product_category VARCHAR(15),
    mailshot_name VARCHAR(80),
    mailshot_start_date DATETIME,
    mailshot_end_date DATETIME
)

CREATE TABLE Premises (
    premise_id INTEGER,
    premises_type VARCHAR(15),
    premise_details VARCHAR(255)
)

CREATE TABLE Order_Items (
    item_id INTEGER,
    order_item_status_code VARCHAR(15),
    order_id INTEGER,
    product_id INTEGER,
    item_status_code VARCHAR(15),
    item_delivered_datetime DATETIME,
    item_order_quantity VARCHAR(80)
)

CREATE TABLE Customer_Addresses (
    customer_id INTEGER,
    premise_id INTEGER,
    date_address_from DATETIME,
    address_type_code VARCHAR(15),
    date_address_to DATETIME
)

CREATE TABLE Customers (
    customer_id INTEGER,
    payment_method VARCHAR(15),
    customer_name VARCHAR(80),
    customer_phone VARCHAR(80),
    customer_email VARCHAR(80),
    customer_address VARCHAR(255),
    customer_login VARCHAR(80),
    customer_password VARCHAR(10)
)

CREATE TABLE Customer_Orders (
    order_id INTEGER,
    customer_id INTEGER,
    order_status_code VARCHAR(15),
    shipping_method_code VARCHAR(15),
    order_placed_datetime DATETIME,
    order_delivered_datetime DATETIME,
    order_shipping_charges VARCHAR(255)
)

Response: SELECT outcome_code, COUNT(*) FROM Mailshot_Customers GROUP BY outcome_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: Create a pie chart showing the total number across outcome code. ### Input: CREATE TABLE Mailshot_Customers (
    mailshot_id INTEGER,
    customer_id INTEGER,
    outcome_code VARCHAR(15),
    mailshot_customer_date DATETIME
)

CREATE TABLE Products (
    product_id INTEGER,
    product_category VARCHAR(15),
    product_name VARCHAR(80)
)

CREATE TABLE Mailshot_Campaigns (
    mailshot_id INTEGER,
    product_category VARCHAR(15),
    mailshot_name VARCHAR(80),
    mailshot_start_date DATETIME,
    mailshot_end_date DATETIME
)

CREATE TABLE Premises (
    premise_id INTEGER,
    premises_type VARCHAR(15),
    premise_details VARCHAR(255)
)

CREATE TABLE Order_Items (
    item_id INTEGER,
    order_item_status_code VARCHAR(15),
    order_id INTEGER,
    product_id INTEGER,
    item_status_code VARCHAR(15),
    item_delivered_datetime DATETIME,
    item_order_quantity VARCHAR(80)
)

CREATE TABLE Customer_Addresses (
    customer_id INTEGER,
    premise_id INTEGER,
    date_address_from DATETIME,
    address_type_code VARCHAR(15),
    date_address_to DATETIME
)

CREATE TABLE Customers (
    customer_id INTEGER,
    payment_method VARCHAR(15),
    customer_name VARCHAR(80),
    customer_phone VARCHAR(80),
    customer_email VARCHAR(80),
    customer_address VARCHAR(255),
    customer_login VARCHAR(80),
    customer_password VARCHAR(10)
)

CREATE TABLE Customer_Orders (
    order_id INTEGER,
    customer_id INTEGER,
    order_status_code VARCHAR(15),
    shipping_method_code VARCHAR(15),
    order_placed_datetime DATETIME,
    order_delivered_datetime DATETIME,
    order_shipping_charges VARCHAR(255)
) ### Response: SELECT outcome_code, COUNT(*) FROM Mailshot_Customers GROUP BY outcome_code


Instruction: What is Home, when Score is 103-93?

Input:
CREATE TABLE table_name_95 (
    home VARCHAR,
    score VARCHAR
)

Response: SELECT home FROM table_name_95 WHERE score = "103-93"

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 Home, when Score is 103-93? ### Input: CREATE TABLE table_name_95 (
    home VARCHAR,
    score VARCHAR
) ### Response: SELECT home FROM table_name_95 WHERE score = "103-93"


Instruction: What is Television Service, when HDTV is No, and when Language is Italian?

Input:
CREATE TABLE table_name_11 (
    television_service VARCHAR,
    hdtv VARCHAR,
    language VARCHAR
)

Response: SELECT television_service FROM table_name_11 WHERE hdtv = "no" AND language = "italian"

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 Television Service, when HDTV is No, and when Language is Italian? ### Input: CREATE TABLE table_name_11 (
    television_service VARCHAR,
    hdtv VARCHAR,
    language VARCHAR
) ### Response: SELECT television_service FROM table_name_11 WHERE hdtv = "no" AND language = "italian"


Instruction: Bin all date of transactions into the YEAR interval, and give the average of the share count for each bin. What is the trend?

Input:
CREATE TABLE Transactions (
    transaction_id INTEGER,
    investor_id INTEGER,
    transaction_type_code VARCHAR(10),
    date_of_transaction DATETIME,
    amount_of_transaction DECIMAL(19,4),
    share_count VARCHAR(40),
    other_details VARCHAR(255)
)

CREATE TABLE Transactions_Lots (
    transaction_id INTEGER,
    lot_id INTEGER
)

CREATE TABLE Lots (
    lot_id INTEGER,
    investor_id INTEGER,
    lot_details VARCHAR(255)
)

CREATE TABLE Sales (
    sales_transaction_id INTEGER,
    sales_details VARCHAR(255)
)

CREATE TABLE Purchases (
    purchase_transaction_id INTEGER,
    purchase_details VARCHAR(255)
)

CREATE TABLE Investors (
    investor_id INTEGER,
    Investor_details VARCHAR(255)
)

CREATE TABLE Ref_Transaction_Types (
    transaction_type_code VARCHAR(10),
    transaction_type_description VARCHAR(80)
)

Response: SELECT date_of_transaction, AVG(share_count) FROM Transactions

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 all date of transactions into the YEAR interval, and give the average of the share count for each bin. What is the trend? ### Input: CREATE TABLE Transactions (
    transaction_id INTEGER,
    investor_id INTEGER,
    transaction_type_code VARCHAR(10),
    date_of_transaction DATETIME,
    amount_of_transaction DECIMAL(19,4),
    share_count VARCHAR(40),
    other_details VARCHAR(255)
)

CREATE TABLE Transactions_Lots (
    transaction_id INTEGER,
    lot_id INTEGER
)

CREATE TABLE Lots (
    lot_id INTEGER,
    investor_id INTEGER,
    lot_details VARCHAR(255)
)

CREATE TABLE Sales (
    sales_transaction_id INTEGER,
    sales_details VARCHAR(255)
)

CREATE TABLE Purchases (
    purchase_transaction_id INTEGER,
    purchase_details VARCHAR(255)
)

CREATE TABLE Investors (
    investor_id INTEGER,
    Investor_details VARCHAR(255)
)

CREATE TABLE Ref_Transaction_Types (
    transaction_type_code VARCHAR(10),
    transaction_type_description VARCHAR(80)
) ### Response: SELECT date_of_transaction, AVG(share_count) FROM Transactions


Instruction: Highest voted answers that have no competition.

Input:
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 ReviewTaskResults (
    Id number,
    ReviewTaskId number,
    ReviewTaskResultTypeId number,
    CreationDate time,
    RejectionReasonId number,
    Comment 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 PendingFlags (
    Id number,
    FlagTypeId number,
    PostId number,
    CreationDate time,
    CloseReasonTypeId number,
    CloseAsOffTopicReasonTypeId number,
    DuplicateOfQuestionId number,
    BelongsOnBaseHostAddress text
)

CREATE TABLE ReviewTaskResultTypes (
    Id number,
    Name text,
    Description 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 PostTags (
    PostId number,
    TagId 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 PostLinks (
    Id number,
    CreationDate time,
    PostId number,
    RelatedPostId number,
    LinkTypeId number
)

CREATE TABLE PostTypes (
    Id number,
    Name text
)

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

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name 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 FlagTypes (
    Id number,
    Name text,
    Description text
)

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

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

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

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

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

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

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 PostNoticeTypes (
    Id number,
    ClassId number,
    Name text,
    Body text,
    IsHidden boolean,
    Predefined boolean,
    PostNoticeDurationId number
)

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

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

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

Response: SELECT Id AS "post_link", Score FROM Posts WHERE PostTypeId = 2 AND ParentId IN (SELECT Id FROM Posts WHERE AnswerCount = 1) ORDER BY Score 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: Highest voted answers that have no competition. ### Input: 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 ReviewTaskResults (
    Id number,
    ReviewTaskId number,
    ReviewTaskResultTypeId number,
    CreationDate time,
    RejectionReasonId number,
    Comment 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 PendingFlags (
    Id number,
    FlagTypeId number,
    PostId number,
    CreationDate time,
    CloseReasonTypeId number,
    CloseAsOffTopicReasonTypeId number,
    DuplicateOfQuestionId number,
    BelongsOnBaseHostAddress text
)

CREATE TABLE ReviewTaskResultTypes (
    Id number,
    Name text,
    Description 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 PostTags (
    PostId number,
    TagId 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 PostLinks (
    Id number,
    CreationDate time,
    PostId number,
    RelatedPostId number,
    LinkTypeId number
)

CREATE TABLE PostTypes (
    Id number,
    Name text
)

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

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

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

CREATE TABLE VoteTypes (
    Id number,
    Name 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 FlagTypes (
    Id number,
    Name text,
    Description text
)

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

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

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

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

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

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

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 PostNoticeTypes (
    Id number,
    ClassId number,
    Name text,
    Body text,
    IsHidden boolean,
    Predefined boolean,
    PostNoticeDurationId number
)

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

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

CREATE TABLE Tags (
    Id number,
    TagName text,
    Count number,
    ExcerptPostId number,
    WikiPostId number
) ### Response: SELECT Id AS "post_link", Score FROM Posts WHERE PostTypeId = 2 AND ParentId IN (SELECT Id FROM Posts WHERE AnswerCount = 1) ORDER BY Score DESC


Instruction: What is the maximum number of starts?

Input:
CREATE TABLE table_3005915_3 (
    starts INTEGER
)

Response: SELECT MAX(starts) FROM table_3005915_3

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the maximum number of starts? ### Input: CREATE TABLE table_3005915_3 (
    starts INTEGER
) ### Response: SELECT MAX(starts) FROM table_3005915_3


Instruction: Margin of victory on no. 4 was?

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

Response: SELECT "Margin of victory" FROM table_24524 WHERE "No." = '4'

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


Instruction: What is the name of the person who was in the Original Broadway Cast that was Original West End Cast of sheila hancock?

Input:
CREATE TABLE table_name_56 (
    original_broadway_cast VARCHAR,
    original_west_end_cast VARCHAR
)

Response: SELECT original_broadway_cast FROM table_name_56 WHERE original_west_end_cast = "sheila hancock"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the person who was in the Original Broadway Cast that was Original West End Cast of sheila hancock? ### Input: CREATE TABLE table_name_56 (
    original_broadway_cast VARCHAR,
    original_west_end_cast VARCHAR
) ### Response: SELECT original_broadway_cast FROM table_name_56 WHERE original_west_end_cast = "sheila hancock"


Instruction: did they place better in 1987/88 or 1993/94 ?

Input:
CREATE TABLE table_204_35 (
    id number,
    "season" text,
    "tier" number,
    "division" text,
    "place" text
)

Response: SELECT "season" FROM table_204_35 WHERE "season" IN ('1987/88', '1993/94') ORDER BY "place" 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: did they place better in 1987/88 or 1993/94 ? ### Input: CREATE TABLE table_204_35 (
    id number,
    "season" text,
    "tier" number,
    "division" text,
    "place" text
) ### Response: SELECT "season" FROM table_204_35 WHERE "season" IN ('1987/88', '1993/94') ORDER BY "place" LIMIT 1


Instruction: Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes' Visualize by bar chart, list from high to low by the Y.

Input:
CREATE TABLE department (
    Department_ID int,
    Name text,
    Creation text,
    Ranking int,
    Budget_in_Billions real,
    Num_Employees real
)

CREATE TABLE head (
    head_ID int,
    name text,
    born_state text,
    age real
)

CREATE TABLE management (
    department_ID int,
    head_ID int,
    temporary_acting text
)

Response: SELECT Name, AVG(Num_Employees) FROM department AS T1 JOIN management AS T2 ON T1.department_ID = T2.department_ID WHERE T2.temporary_acting = 'Yes' GROUP BY Name ORDER BY AVG(Num_Employees) 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 the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes' Visualize by bar chart, list from high to low by the Y. ### Input: CREATE TABLE department (
    Department_ID int,
    Name text,
    Creation text,
    Ranking int,
    Budget_in_Billions real,
    Num_Employees real
)

CREATE TABLE head (
    head_ID int,
    name text,
    born_state text,
    age real
)

CREATE TABLE management (
    department_ID int,
    head_ID int,
    temporary_acting text
) ### Response: SELECT Name, AVG(Num_Employees) FROM department AS T1 JOIN management AS T2 ON T1.department_ID = T2.department_ID WHERE T2.temporary_acting = 'Yes' GROUP BY Name ORDER BY AVG(Num_Employees) DESC


Instruction: Tell me the class with rank of 89th

Input:
CREATE TABLE table_name_12 (
    class VARCHAR,
    rank VARCHAR
)

Response: SELECT class FROM table_name_12 WHERE rank = "89th"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tell me the class with rank of 89th ### Input: CREATE TABLE table_name_12 (
    class VARCHAR,
    rank VARCHAR
) ### Response: SELECT class FROM table_name_12 WHERE rank = "89th"


Instruction: What is the first year for Popgun?

Input:
CREATE TABLE table_55144 (
    "Title" text,
    "Publisher" text,
    "First Year" text,
    "Last Year" text,
    "Genre" text
)

Response: SELECT "First Year" FROM table_55144 WHERE "Title" = 'popgun'

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 first year for Popgun? ### Input: CREATE TABLE table_55144 (
    "Title" text,
    "Publisher" text,
    "First Year" text,
    "Last Year" text,
    "Genre" text
) ### Response: SELECT "First Year" FROM table_55144 WHERE "Title" = 'popgun'


Instruction: what character did Masaharu satou play

Input:
CREATE TABLE table_38210 (
    "Character Name" text,
    "Voice Actor (Japanese)" text,
    "Voice Actor (English 1997 / Saban)" text,
    "Voice Actor (English 1998 / Pioneer)" text,
    "Voice Actor (English 2006 / FUNimation)" text
)

Response: SELECT "Character Name" FROM table_38210 WHERE "Voice Actor (Japanese)" = 'masaharu satou'

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 character did Masaharu satou play ### Input: CREATE TABLE table_38210 (
    "Character Name" text,
    "Voice Actor (Japanese)" text,
    "Voice Actor (English 1997 / Saban)" text,
    "Voice Actor (English 1998 / Pioneer)" text,
    "Voice Actor (English 2006 / FUNimation)" text
) ### Response: SELECT "Character Name" FROM table_38210 WHERE "Voice Actor (Japanese)" = 'masaharu satou'


Instruction: What years did number 54 play for the jazz

Input:
CREATE TABLE table_16858 (
    "Player" text,
    "No." real,
    "Nationality" text,
    "Position" text,
    "Years for Jazz" text,
    "School/Club Team" text
)

Response: SELECT "Years for Jazz" FROM table_16858 WHERE "No." = '54'

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 years did number 54 play for the jazz ### Input: CREATE TABLE table_16858 (
    "Player" text,
    "No." real,
    "Nationality" text,
    "Position" text,
    "Years for Jazz" text,
    "School/Club Team" text
) ### Response: SELECT "Years for Jazz" FROM table_16858 WHERE "No." = '54'


Instruction: For each director, how many reviews have they received Visualize by bar chart, and could you rank from high to low by the Y-axis?

Input:
CREATE TABLE Rating (
    rID int,
    mID int,
    stars int,
    ratingDate date
)

CREATE TABLE Reviewer (
    rID int,
    name text
)

CREATE TABLE Movie (
    mID int,
    title text,
    year int,
    director text
)

Response: SELECT director, COUNT(*) FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director ORDER BY COUNT(*) DESC

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For each director, how many reviews have they received Visualize by bar chart, and could you rank from high to low by the Y-axis? ### Input: CREATE TABLE Rating (
    rID int,
    mID int,
    stars int,
    ratingDate date
)

CREATE TABLE Reviewer (
    rID int,
    name text
)

CREATE TABLE Movie (
    mID int,
    title text,
    year int,
    director text
) ### Response: SELECT director, COUNT(*) FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director ORDER BY COUNT(*) DESC


Instruction: Which lowest played has a Position of 2, and Goals against larger than 53?

Input:
CREATE TABLE table_name_6 (
    played INTEGER,
    position VARCHAR,
    goals_against VARCHAR
)

Response: SELECT MIN(played) FROM table_name_6 WHERE position = 2 AND goals_against > 53

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 lowest played has a Position of 2, and Goals against larger than 53? ### Input: CREATE TABLE table_name_6 (
    played INTEGER,
    position VARCHAR,
    goals_against VARCHAR
) ### Response: SELECT MIN(played) FROM table_name_6 WHERE position = 2 AND goals_against > 53


Instruction: What is the English title of the film directed by Fernando Meirelles?

Input:
CREATE TABLE table_name_53 (
    english_title VARCHAR,
    director_s_ VARCHAR
)

Response: SELECT english_title FROM table_name_53 WHERE director_s_ = "fernando meirelles"

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 English title of the film directed by Fernando Meirelles? ### Input: CREATE TABLE table_name_53 (
    english_title VARCHAR,
    director_s_ VARCHAR
) ### Response: SELECT english_title FROM table_name_53 WHERE director_s_ = "fernando meirelles"


Instruction: Name the college/junior club team for pick number 63

Input:
CREATE TABLE table_19548 (
    "Pick #" real,
    "Player" text,
    "Position" text,
    "Nationality" text,
    "NHL team" text,
    "College/junior/club team" text
)

Response: SELECT "College/junior/club team" FROM table_19548 WHERE "Pick #" = '63'

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 college/junior club team for pick number 63 ### Input: CREATE TABLE table_19548 (
    "Pick #" real,
    "Player" text,
    "Position" text,
    "Nationality" text,
    "NHL team" text,
    "College/junior/club team" text
) ### Response: SELECT "College/junior/club team" FROM table_19548 WHERE "Pick #" = '63'


Instruction: what is the total number of silver medals won by russia , norway , and sweden combined ?

Input:
CREATE TABLE table_204_761 (
    id number,
    "rank" number,
    "nation" text,
    "gold" number,
    "silver" number,
    "bronze" number,
    "total" number
)

Response: SELECT SUM("silver") FROM table_204_761 WHERE "nation" IN ('russia', 'norway', 'sweden')

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the total number of silver medals won by russia , norway , and sweden combined ? ### Input: CREATE TABLE table_204_761 (
    id number,
    "rank" number,
    "nation" text,
    "gold" number,
    "silver" number,
    "bronze" number,
    "total" number
) ### Response: SELECT SUM("silver") FROM table_204_761 WHERE "nation" IN ('russia', 'norway', 'sweden')


Instruction: Find the number of members living in each address.

Input:
CREATE TABLE shop (
    shop_id number,
    address text,
    num_of_staff text,
    score number,
    open_year text
)

CREATE TABLE happy_hour (
    hh_id number,
    shop_id number,
    month text,
    num_of_shaff_in_charge number
)

CREATE TABLE member (
    member_id number,
    name text,
    membership_card text,
    age number,
    time_of_purchase number,
    level_of_membership number,
    address text
)

CREATE TABLE happy_hour_member (
    hh_id number,
    member_id number,
    total_amount number
)

Response: SELECT COUNT(*), address FROM member GROUP BY address

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 number of members living in each address. ### Input: CREATE TABLE shop (
    shop_id number,
    address text,
    num_of_staff text,
    score number,
    open_year text
)

CREATE TABLE happy_hour (
    hh_id number,
    shop_id number,
    month text,
    num_of_shaff_in_charge number
)

CREATE TABLE member (
    member_id number,
    name text,
    membership_card text,
    age number,
    time_of_purchase number,
    level_of_membership number,
    address text
)

CREATE TABLE happy_hour_member (
    hh_id number,
    member_id number,
    total_amount number
) ### Response: SELECT COUNT(*), address FROM member GROUP BY address


Instruction: what is the variation of patient 006-181433's weight second measured on the current hospital visit compared to the first value measured on the current hospital visit?

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

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

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

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

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

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

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

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

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

Response: SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-181433' AND patient.hospitaldischargetime IS NULL) AND NOT patient.admissionweight IS NULL ORDER BY patient.unitadmittime LIMIT 1 OFFSET 1) - (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-181433' AND patient.hospitaldischargetime IS NULL) AND NOT patient.admissionweight IS NULL ORDER BY patient.unitadmittime LIMIT 1)

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the variation of patient 006-181433's weight second measured on the current hospital visit compared to the first value measured on the current hospital visit? ### Input: CREATE TABLE intakeoutput (
    intakeoutputid number,
    patientunitstayid number,
    cellpath text,
    celllabel text,
    cellvaluenumeric number,
    intakeoutputtime time
)

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

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

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

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

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

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

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

CREATE TABLE allergy (
    allergyid number,
    patientunitstayid number,
    drugname text,
    allergyname text,
    allergytime time
) ### Response: SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-181433' AND patient.hospitaldischargetime IS NULL) AND NOT patient.admissionweight IS NULL ORDER BY patient.unitadmittime LIMIT 1 OFFSET 1) - (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-181433' AND patient.hospitaldischargetime IS NULL) AND NOT patient.admissionweight IS NULL ORDER BY patient.unitadmittime LIMIT 1)


Instruction: how many patients with death status 0 had procedure icd9 code as 5011?

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

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

CREATE TABLE 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.icd9_code = "5011"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients with death status 0 had procedure icd9 code as 5011? ### Input: CREATE TABLE diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

CREATE TABLE 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.icd9_code = "5011"


Instruction: For those records from the products and each product's manufacturer, find headquarter and the amount of headquarter , and group by attribute headquarter, and visualize them by a bar chart, and I want to display x axis in descending order please.

Input:
CREATE TABLE Products (
    Code INTEGER,
    Name VARCHAR(255),
    Price DECIMAL,
    Manufacturer INTEGER
)

CREATE TABLE Manufacturers (
    Code INTEGER,
    Name VARCHAR(255),
    Headquarter VARCHAR(255),
    Founder VARCHAR(255),
    Revenue REAL
)

Response: SELECT Headquarter, COUNT(Headquarter) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter 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 records from the products and each product's manufacturer, find headquarter and the amount of headquarter , and group by attribute headquarter, and visualize them by a bar chart, and I want to display x axis in descending order please. ### Input: CREATE TABLE Products (
    Code INTEGER,
    Name VARCHAR(255),
    Price DECIMAL,
    Manufacturer INTEGER
)

CREATE TABLE Manufacturers (
    Code INTEGER,
    Name VARCHAR(255),
    Headquarter VARCHAR(255),
    Founder VARCHAR(255),
    Revenue REAL
) ### Response: SELECT Headquarter, COUNT(Headquarter) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter DESC


Instruction: What is To Par, when Place is 3?

Input:
CREATE TABLE table_name_43 (
    to_par VARCHAR,
    place VARCHAR
)

Response: SELECT to_par FROM table_name_43 WHERE place = "3"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is To Par, when Place is 3? ### Input: CREATE TABLE table_name_43 (
    to_par VARCHAR,
    place VARCHAR
) ### Response: SELECT to_par FROM table_name_43 WHERE place = "3"


Instruction: what age does patient 71192 have on the last hospital encounter?

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

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

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

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

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

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 icustays (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    first_careunit text,
    last_careunit text,
    first_wardid number,
    last_wardid number,
    intime time,
    outtime time
)

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

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

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

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

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

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

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

Response: SELECT admissions.age FROM admissions WHERE admissions.subject_id = 71192 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime 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: what age does patient 71192 have on the last hospital encounter? ### Input: CREATE TABLE d_items (
    row_id number,
    itemid number,
    label text,
    linksto text
)

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

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

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

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

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 icustays (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    first_careunit text,
    last_careunit text,
    first_wardid number,
    last_wardid number,
    intime time,
    outtime time
)

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

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

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

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

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

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

CREATE TABLE cost (
    row_id number,
    subject_id number,
    hadm_id number,
    event_type text,
    event_id number,
    chargetime time,
    cost number
) ### Response: SELECT admissions.age FROM admissions WHERE admissions.subject_id = 71192 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1


Instruction: On what date was god & guns released?

Input:
CREATE TABLE table_name_15 (
    date_of_release VARCHAR,
    title VARCHAR
)

Response: SELECT date_of_release FROM table_name_15 WHERE title = "god & guns"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On what date was god & guns released? ### Input: CREATE TABLE table_name_15 (
    date_of_release VARCHAR,
    title VARCHAR
) ### Response: SELECT date_of_release FROM table_name_15 WHERE title = "god & guns"


Instruction: From 11:00 to 4:00 , are there ECON 442 sections ?

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

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

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

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE area (
    course_id int,
    area varchar
)

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

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

Response: SELECT DISTINCT course_offering.end_time, course_offering.section_number, course_offering.start_time FROM course, course_offering, semester WHERE course_offering.end_time <= '4:00' AND course_offering.start_time >= '11:00' AND course.course_id = course_offering.course_id AND course.department = 'ECON' AND course.number = 442 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: From 11:00 to 4:00 , are there ECON 442 sections ? ### Input: CREATE TABLE ta (
    campus_job_id int,
    student_id int,
    location varchar
)

CREATE TABLE gsi (
    course_offering_id int,
    student_id int
)

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

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE area (
    course_id int,
    area varchar
)

CREATE TABLE course_prerequisite (
    pre_course_id int,
    course_id int
)

CREATE TABLE offering_instructor (
    offering_instructor_id int,
    offering_id int,
    instructor_id int
) ### Response: SELECT DISTINCT course_offering.end_time, course_offering.section_number, course_offering.start_time FROM course, course_offering, semester WHERE course_offering.end_time <= '4:00' AND course_offering.start_time >= '11:00' AND course.course_id = course_offering.course_id AND course.department = 'ECON' AND course.number = 442 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016


Instruction: What's the 2nd leg result in the round where team #1 is Iraklis?

Input:
CREATE TABLE table_19130829_4 (
    team__number1 VARCHAR
)

Response: SELECT 2 AS nd_leg FROM table_19130829_4 WHERE team__number1 = "Iraklis"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the 2nd leg result in the round where team #1 is Iraklis? ### Input: CREATE TABLE table_19130829_4 (
    team__number1 VARCHAR
) ### Response: SELECT 2 AS nd_leg FROM table_19130829_4 WHERE team__number1 = "Iraklis"


Instruction: what number of publications are indicated as being in print ?

Input:
CREATE TABLE table_204_692 (
    id number,
    "publication" text,
    "score" text,
    "review" text
)

Response: SELECT COUNT("publication") FROM table_204_692 WHERE "review" = 'print'

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 number of publications are indicated as being in print ? ### Input: CREATE TABLE table_204_692 (
    id number,
    "publication" text,
    "score" text,
    "review" text
) ### Response: SELECT COUNT("publication") FROM table_204_692 WHERE "review" = 'print'


Instruction: had patient 005-80291 been prescribed 30 ml cup : alum & mag hydroxide-simeth 200-200-20 mg/5ml po susp, potassium chloride 2 meq/ml iv soln or ondansetron hcl 4 mg/2ml ij soln since 2105?

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

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

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

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

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

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

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

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

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

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

Response: SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-80291')) AND medication.drugname IN ('30 ml cup : alum & mag hydroxide-simeth 200-200-20 mg/5ml po susp', 'potassium chloride 2 meq/ml iv soln', 'ondansetron hcl 4 mg/2ml ij soln') AND STRFTIME('%y', medication.drugstarttime) >= '2105'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: had patient 005-80291 been prescribed 30 ml cup : alum & mag hydroxide-simeth 200-200-20 mg/5ml po susp, potassium chloride 2 meq/ml iv soln or ondansetron hcl 4 mg/2ml ij soln since 2105? ### Input: CREATE TABLE lab (
    labid number,
    patientunitstayid number,
    labname text,
    labresult number,
    labresulttime time
)

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

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

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

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

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

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

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

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

CREATE TABLE medication (
    medicationid number,
    patientunitstayid number,
    drugname text,
    dosage text,
    routeadmin text,
    drugstarttime time,
    drugstoptime time
) ### Response: SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-80291')) AND medication.drugname IN ('30 ml cup : alum & mag hydroxide-simeth 200-200-20 mg/5ml po susp', 'potassium chloride 2 meq/ml iv soln', 'ondansetron hcl 4 mg/2ml ij soln') AND STRFTIME('%y', medication.drugstarttime) >= '2105'


Instruction: Give me the comparison about School_ID over the ACC_Road , and group by attribute All_Home, and sort from low to high by the y axis.

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

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

Response: SELECT ACC_Road, School_ID FROM basketball_match GROUP BY All_Home, ACC_Road ORDER BY School_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: Give me the comparison about School_ID over the ACC_Road , and group by attribute All_Home, and sort from low to high by the y axis. ### Input: 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
)

CREATE TABLE university (
    School_ID int,
    School text,
    Location text,
    Founded real,
    Affiliation text,
    Enrollment real,
    Nickname text,
    Primary_conference text
) ### Response: SELECT ACC_Road, School_ID FROM basketball_match GROUP BY All_Home, ACC_Road ORDER BY School_ID


Instruction: When 228 is the lap and chip ganassi racing is the team what is the race time?

Input:
CREATE TABLE table_21885 (
    "Season" text,
    "Date" text,
    "Driver" text,
    "Team" text,
    "Chassis" text,
    "Engine" text,
    "Laps" text,
    "Miles (km)" text,
    "Race Time" text,
    "Average Speed (mph)" text,
    "Report" text
)

Response: SELECT "Race Time" FROM table_21885 WHERE "Team" = 'Chip Ganassi Racing' AND "Laps" = '228'

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 228 is the lap and chip ganassi racing is the team what is the race time? ### Input: CREATE TABLE table_21885 (
    "Season" text,
    "Date" text,
    "Driver" text,
    "Team" text,
    "Chassis" text,
    "Engine" text,
    "Laps" text,
    "Miles (km)" text,
    "Race Time" text,
    "Average Speed (mph)" text,
    "Report" text
) ### Response: SELECT "Race Time" FROM table_21885 WHERE "Team" = 'Chip Ganassi Racing' AND "Laps" = '228'


Instruction: Which song was picked that was originally performed by Marisa Monte?

Input:
CREATE TABLE table_29668 (
    "Week #" text,
    "Theme" text,
    "Song Choice" text,
    "Original Artist" text,
    "Order #" text,
    "Result" text
)

Response: SELECT "Song Choice" FROM table_29668 WHERE "Original Artist" = 'Marisa Monte'

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 song was picked that was originally performed by Marisa Monte? ### Input: CREATE TABLE table_29668 (
    "Week #" text,
    "Theme" text,
    "Song Choice" text,
    "Original Artist" text,
    "Order #" text,
    "Result" text
) ### Response: SELECT "Song Choice" FROM table_29668 WHERE "Original Artist" = 'Marisa Monte'