Instruction: What is the total when bronze has a silver larger than 2?

Input:
CREATE TABLE table_6350 (
    "Country" text,
    "Gold" real,
    "Silver" real,
    "Bronze" real,
    "Total" real
)

Response: SELECT COUNT("Bronze") FROM table_6350 WHERE "Silver" > '2'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total when bronze has a silver larger than 2? ### Input: CREATE TABLE table_6350 (
    "Country" text,
    "Gold" real,
    "Silver" real,
    "Bronze" real,
    "Total" real
) ### Response: SELECT COUNT("Bronze") FROM table_6350 WHERE "Silver" > '2'


Instruction: How many seasons have a production code of 204?

Input:
CREATE TABLE table_16581695_3 (
    no_in_season VARCHAR,
    production_code VARCHAR
)

Response: SELECT COUNT(no_in_season) FROM table_16581695_3 WHERE production_code = 204

Below are sql tables 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 seasons have a production code of 204? ### Input: CREATE TABLE table_16581695_3 (
    no_in_season VARCHAR,
    production_code VARCHAR
) ### Response: SELECT COUNT(no_in_season) FROM table_16581695_3 WHERE production_code = 204


Instruction: What is Petersville's census ranking?

Input:
CREATE TABLE table_21378 (
    "Official Name" text,
    "Status" text,
    "Area km 2" text,
    "Population" real,
    "Census Ranking" text
)

Response: SELECT "Census Ranking" FROM table_21378 WHERE "Official Name" = 'Petersville'

Below are sql tables 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 Petersville's census ranking? ### Input: CREATE TABLE table_21378 (
    "Official Name" text,
    "Status" text,
    "Area km 2" text,
    "Population" real,
    "Census Ranking" text
) ### Response: SELECT "Census Ranking" FROM table_21378 WHERE "Official Name" = 'Petersville'


Instruction: Which Club or province has a caps larger than 15 and has Chris Cusiter playing for them?

Input:
CREATE TABLE table_37217 (
    "Player" text,
    "Position" text,
    "Date of Birth (Age)" text,
    "Caps" real,
    "Club/province" text
)

Response: SELECT "Club/province" FROM table_37217 WHERE "Caps" > '15' AND "Player" = 'chris cusiter'

Below are sql tables 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 Club or province has a caps larger than 15 and has Chris Cusiter playing for them? ### Input: CREATE TABLE table_37217 (
    "Player" text,
    "Position" text,
    "Date of Birth (Age)" text,
    "Caps" real,
    "Club/province" text
) ### Response: SELECT "Club/province" FROM table_37217 WHERE "Caps" > '15' AND "Player" = 'chris cusiter'


Instruction: Which Byes have an Against larger than 1018, and a Wimmera FL of horsham diggers?

Input:
CREATE TABLE table_65614 (
    "Wimmera FL" text,
    "Wins" real,
    "Byes" real,
    "Losses" real,
    "Draws" real,
    "Against" real
)

Response: SELECT MIN("Byes") FROM table_65614 WHERE "Against" > '1018' AND "Wimmera FL" = 'horsham diggers'

Below are sql tables 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 Byes have an Against larger than 1018, and a Wimmera FL of horsham diggers? ### Input: CREATE TABLE table_65614 (
    "Wimmera FL" text,
    "Wins" real,
    "Byes" real,
    "Losses" real,
    "Draws" real,
    "Against" real
) ### Response: SELECT MIN("Byes") FROM table_65614 WHERE "Against" > '1018' AND "Wimmera FL" = 'horsham diggers'


Instruction: how many tons does the te class displace ?

Input:
CREATE TABLE table_203_764 (
    id number,
    "name" text,
    "date" number,
    "nation" text,
    "displacement" text,
    "speed" text,
    "number" number,
    "notes" text
)

Response: SELECT "displacement" FROM table_203_764 WHERE "name" = 'te-class'

Below are sql tables 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 tons does the te class displace ? ### Input: CREATE TABLE table_203_764 (
    id number,
    "name" text,
    "date" number,
    "nation" text,
    "displacement" text,
    "speed" text,
    "number" number,
    "notes" text
) ### Response: SELECT "displacement" FROM table_203_764 WHERE "name" = 'te-class'


Instruction: When the Home team score was 15.18 (108), what's the lowest Crowd turnout?

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

Response: SELECT MIN("Crowd") FROM table_77874 WHERE "Home team score" = '15.18 (108)'

Below are sql tables 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 the Home team score was 15.18 (108), what's the lowest Crowd turnout? ### Input: CREATE TABLE table_77874 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
) ### Response: SELECT MIN("Crowd") FROM table_77874 WHERE "Home team score" = '15.18 (108)'


Instruction: what was the first time patient 24894 received calcium, total in a lab test during the first hospital visit?

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

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

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

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

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

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

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 procedures_icd (
    row_id number,
    subject_id number,
    hadm_id number,
    icd9_code text,
    charttime time
)

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

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

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

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

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

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

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

Response: SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'calcium, total') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24894 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) ORDER BY labevents.charttime LIMIT 1

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the first time patient 24894 received calcium, total in a lab test during the first hospital visit? ### Input: CREATE TABLE prescriptions (
    row_id number,
    subject_id number,
    hadm_id number,
    startdate time,
    enddate time,
    drug text,
    dose_val_rx text,
    dose_unit_rx text,
    route text
)

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

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

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

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

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

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 procedures_icd (
    row_id number,
    subject_id number,
    hadm_id number,
    icd9_code text,
    charttime time
)

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

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

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

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

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

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

CREATE TABLE labevents (
    row_id number,
    subject_id number,
    hadm_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
) ### Response: SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'calcium, total') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24894 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) ORDER BY labevents.charttime LIMIT 1


Instruction: tell me the number of stations tv azteca owns .

Input:
CREATE TABLE table_204_796 (
    id number,
    "network name" text,
    "flagship" text,
    "programming type" text,
    "owner" text,
    "affiliates" number
)

Response: SELECT COUNT("network name") FROM table_204_796 WHERE "owner" = 'tv azteca'

Below are sql tables 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 number of stations tv azteca owns . ### Input: CREATE TABLE table_204_796 (
    id number,
    "network name" text,
    "flagship" text,
    "programming type" text,
    "owner" text,
    "affiliates" number
) ### Response: SELECT COUNT("network name") FROM table_204_796 WHERE "owner" = 'tv azteca'


Instruction: What place has the score of 67-74=141?

Input:
CREATE TABLE table_name_2 (
    place VARCHAR,
    score VARCHAR
)

Response: SELECT place FROM table_name_2 WHERE score = 67 - 74 = 141

Below are sql tables 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 place has the score of 67-74=141? ### Input: CREATE TABLE table_name_2 (
    place VARCHAR,
    score VARCHAR
) ### Response: SELECT place FROM table_name_2 WHERE score = 67 - 74 = 141


Instruction: What is the census ranking for the Perth parish?

Input:
CREATE TABLE table_176524_2 (
    census_ranking VARCHAR,
    official_name VARCHAR
)

Response: SELECT census_ranking FROM table_176524_2 WHERE official_name = "Perth"

Below are sql tables 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 census ranking for the Perth parish? ### Input: CREATE TABLE table_176524_2 (
    census_ranking VARCHAR,
    official_name VARCHAR
) ### Response: SELECT census_ranking FROM table_176524_2 WHERE official_name = "Perth"


Instruction: Who was the home team on March 5, 2008?

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

Response: SELECT "Home" FROM table_10100 WHERE "Date" = 'march 5, 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: Who was the home team on March 5, 2008? ### Input: CREATE TABLE table_10100 (
    "Date" text,
    "Visitor" text,
    "Score" text,
    "Home" text,
    "Leading scorer" text,
    "Attendance" real,
    "Record" text
) ### Response: SELECT "Home" FROM table_10100 WHERE "Date" = 'march 5, 2008'


Instruction: how many player with no being 12

Input:
CREATE TABLE table_12962773_5 (
    player VARCHAR,
    no VARCHAR
)

Response: SELECT COUNT(player) FROM table_12962773_5 WHERE no = 12

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many player with no being 12 ### Input: CREATE TABLE table_12962773_5 (
    player VARCHAR,
    no VARCHAR
) ### Response: SELECT COUNT(player) FROM table_12962773_5 WHERE no = 12


Instruction: Which driver has a # smaller than 40, less than 151 points, and Winnings of $84,400?

Input:
CREATE TABLE table_12045 (
    "Driver" text,
    "Car #" real,
    "Make" text,
    "Points" real,
    "Laps" real,
    "Winnings" text
)

Response: SELECT "Make" FROM table_12045 WHERE "Car #" < '40' AND "Points" < '151' AND "Winnings" = '$84,400'

Below are sql tables 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 driver has a # smaller than 40, less than 151 points, and Winnings of $84,400? ### Input: CREATE TABLE table_12045 (
    "Driver" text,
    "Car #" real,
    "Make" text,
    "Points" real,
    "Laps" real,
    "Winnings" text
) ### Response: SELECT "Make" FROM table_12045 WHERE "Car #" < '40' AND "Points" < '151' AND "Winnings" = '$84,400'


Instruction: How many documents in different starting date? Return a line chart grouping by starting date.

Input:
CREATE TABLE Employees (
    Employee_ID INTEGER,
    Role_Code CHAR(15),
    Employee_Name VARCHAR(255),
    Gender_MFU CHAR(1),
    Date_of_Birth DATETIME,
    Other_Details VARCHAR(255)
)

CREATE TABLE Roles (
    Role_Code CHAR(15),
    Role_Name VARCHAR(255),
    Role_Description VARCHAR(255)
)

CREATE TABLE Documents_to_be_Destroyed (
    Document_ID INTEGER,
    Destruction_Authorised_by_Employee_ID INTEGER,
    Destroyed_by_Employee_ID INTEGER,
    Planned_Destruction_Date DATETIME,
    Actual_Destruction_Date DATETIME,
    Other_Details VARCHAR(255)
)

CREATE TABLE Ref_Calendar (
    Calendar_Date DATETIME,
    Day_Number INTEGER
)

CREATE TABLE Document_Locations (
    Document_ID INTEGER,
    Location_Code CHAR(15),
    Date_in_Location_From DATETIME,
    Date_in_Locaton_To DATETIME
)

CREATE TABLE Ref_Locations (
    Location_Code CHAR(15),
    Location_Name VARCHAR(255),
    Location_Description VARCHAR(255)
)

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

CREATE TABLE All_Documents (
    Document_ID INTEGER,
    Date_Stored DATETIME,
    Document_Type_Code CHAR(15),
    Document_Name CHAR(255),
    Document_Description CHAR(255),
    Other_Details VARCHAR(255)
)

Response: SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations GROUP BY Date_in_Location_From

Below are sql tables 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 documents in different starting date? Return a line chart grouping by starting date. ### Input: CREATE TABLE Employees (
    Employee_ID INTEGER,
    Role_Code CHAR(15),
    Employee_Name VARCHAR(255),
    Gender_MFU CHAR(1),
    Date_of_Birth DATETIME,
    Other_Details VARCHAR(255)
)

CREATE TABLE Roles (
    Role_Code CHAR(15),
    Role_Name VARCHAR(255),
    Role_Description VARCHAR(255)
)

CREATE TABLE Documents_to_be_Destroyed (
    Document_ID INTEGER,
    Destruction_Authorised_by_Employee_ID INTEGER,
    Destroyed_by_Employee_ID INTEGER,
    Planned_Destruction_Date DATETIME,
    Actual_Destruction_Date DATETIME,
    Other_Details VARCHAR(255)
)

CREATE TABLE Ref_Calendar (
    Calendar_Date DATETIME,
    Day_Number INTEGER
)

CREATE TABLE Document_Locations (
    Document_ID INTEGER,
    Location_Code CHAR(15),
    Date_in_Location_From DATETIME,
    Date_in_Locaton_To DATETIME
)

CREATE TABLE Ref_Locations (
    Location_Code CHAR(15),
    Location_Name VARCHAR(255),
    Location_Description VARCHAR(255)
)

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

CREATE TABLE All_Documents (
    Document_ID INTEGER,
    Date_Stored DATETIME,
    Document_Type_Code CHAR(15),
    Document_Name CHAR(255),
    Document_Description CHAR(255),
    Other_Details VARCHAR(255)
) ### Response: SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations GROUP BY Date_in_Location_From


Instruction: How many places have an Artist of august , and a Draw smaller than 6?

Input:
CREATE TABLE table_64729 (
    "Draw" real,
    "Artist" text,
    "Song" text,
    "Points" real,
    "Place" real
)

Response: SELECT COUNT("Place") FROM table_64729 WHERE "Artist" = 'augustė' AND "Draw" < '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 places have an Artist of august , and a Draw smaller than 6? ### Input: CREATE TABLE table_64729 (
    "Draw" real,
    "Artist" text,
    "Song" text,
    "Points" real,
    "Place" real
) ### Response: SELECT COUNT("Place") FROM table_64729 WHERE "Artist" = 'augustė' AND "Draw" < '6'


Instruction: On what date was game 3?

Input:
CREATE TABLE table_79596 (
    "Game" text,
    "Date" text,
    "Opponent" text,
    "Score" text,
    "Location Attendance" text,
    "Record" text
)

Response: SELECT "Date" FROM table_79596 WHERE "Game" = '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: On what date was game 3? ### Input: CREATE TABLE table_79596 (
    "Game" text,
    "Date" text,
    "Opponent" text,
    "Score" text,
    "Location Attendance" text,
    "Record" text
) ### Response: SELECT "Date" FROM table_79596 WHERE "Game" = '3'


Instruction: What is the region 4 (Aus) date associated with a region 1 (US) date of January 16, 2007?

Input:
CREATE TABLE table_240936_2 (
    region_4__australia_ VARCHAR,
    region_1__us_ VARCHAR
)

Response: SELECT region_4__australia_ FROM table_240936_2 WHERE region_1__us_ = "January 16, 2007"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the region 4 (Aus) date associated with a region 1 (US) date of January 16, 2007? ### Input: CREATE TABLE table_240936_2 (
    region_4__australia_ VARCHAR,
    region_1__us_ VARCHAR
) ### Response: SELECT region_4__australia_ FROM table_240936_2 WHERE region_1__us_ = "January 16, 2007"


Instruction: What is the highest React that has a 7.61 Mark and a heat bigger than 1?

Input:
CREATE TABLE table_name_84 (
    react INTEGER,
    mark VARCHAR,
    heat VARCHAR
)

Response: SELECT MAX(react) FROM table_name_84 WHERE mark = "7.61" AND heat > 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 highest React that has a 7.61 Mark and a heat bigger than 1? ### Input: CREATE TABLE table_name_84 (
    react INTEGER,
    mark VARCHAR,
    heat VARCHAR
) ### Response: SELECT MAX(react) FROM table_name_84 WHERE mark = "7.61" AND heat > 1


Instruction: What year was USF founded?

Input:
CREATE TABLE table_1160660_1 (
    date_founded VARCHAR,
    acronym VARCHAR
)

Response: SELECT date_founded FROM table_1160660_1 WHERE acronym = "USF"

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What year was USF founded? ### Input: CREATE TABLE table_1160660_1 (
    date_founded VARCHAR,
    acronym VARCHAR
) ### Response: SELECT date_founded FROM table_1160660_1 WHERE acronym = "USF"


Instruction: what is the position in table when the team is hartlepool united?

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

Response: SELECT "Position in table" FROM table_64562 WHERE "Team" = 'hartlepool united'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the position in table when the team is hartlepool united? ### Input: CREATE TABLE table_64562 (
    "Team" text,
    "Outgoing manager" text,
    "Manner of departure" text,
    "Date of vacancy" text,
    "Replaced by" text,
    "Date of appointment" text,
    "Position in table" text
) ### Response: SELECT "Position in table" FROM table_64562 WHERE "Team" = 'hartlepool united'


Instruction: What was the position of the player from Butler High School?

Input:
CREATE TABLE table_17065 (
    "Player" text,
    "Position" text,
    "School" text,
    "Hometown" text,
    "College" text
)

Response: SELECT "Position" FROM table_17065 WHERE "School" = 'Butler High School'

Below are sql tables 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 position of the player from Butler High School? ### Input: CREATE TABLE table_17065 (
    "Player" text,
    "Position" text,
    "School" text,
    "Hometown" text,
    "College" text
) ### Response: SELECT "Position" FROM table_17065 WHERE "School" = 'Butler High School'


Instruction: what is age and religion of subject id 84129?

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

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

CREATE TABLE 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 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 demographic.age, demographic.religion FROM demographic WHERE demographic.subject_id = "84129"

Below are sql tables 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 age and religion of subject id 84129? ### Input: CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
)

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

CREATE TABLE 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 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 demographic.age, demographic.religion FROM demographic WHERE demographic.subject_id = "84129"


Instruction: how many prescriptions for multivitamins have been ordered?

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

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

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

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

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

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

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

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

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

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

Response: SELECT COUNT(*) FROM medication WHERE medication.drugname = 'multivitamins'

Below are sql tables 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 prescriptions for multivitamins have been ordered? ### Input: CREATE TABLE patient (
    uniquepid text,
    patienthealthsystemstayid number,
    patientunitstayid number,
    gender text,
    age text,
    ethnicity text,
    hospitalid number,
    wardid number,
    admissionheight number,
    admissionweight number,
    dischargeweight number,
    hospitaladmittime time,
    hospitaladmitsource text,
    unitadmittime time,
    unitdischargetime time,
    hospitaldischargetime time,
    hospitaldischargestatus text
)

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

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

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

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

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

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

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

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

CREATE TABLE vitalperiodic (
    vitalperiodicid number,
    patientunitstayid number,
    temperature number,
    sao2 number,
    heartrate number,
    respiration number,
    systemicsystolic number,
    systemicdiastolic number,
    systemicmean number,
    observationtime time
) ### Response: SELECT COUNT(*) FROM medication WHERE medication.drugname = 'multivitamins'


Instruction: Which analog channel is Fox on?

Input:
CREATE TABLE table_52794 (
    "Analog Channel" text,
    "Digital Channel" text,
    "Call sign" text,
    "Name" text,
    "Network" text
)

Response: SELECT "Analog Channel" FROM table_52794 WHERE "Network" = 'fox'

Below are sql tables 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 analog channel is Fox on? ### Input: CREATE TABLE table_52794 (
    "Analog Channel" text,
    "Digital Channel" text,
    "Call sign" text,
    "Name" text,
    "Network" text
) ### Response: SELECT "Analog Channel" FROM table_52794 WHERE "Network" = 'fox'


Instruction: first opponent to defeat mocho cota in mexico city

Input:
CREATE TABLE table_204_373 (
    id number,
    "wager" text,
    "winner" text,
    "loser" text,
    "location" text,
    "date" text
)

Response: SELECT "winner" FROM table_204_373 WHERE "loser" = 'mocho cota' AND "location" = 'mexico city' ORDER BY "date" 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: first opponent to defeat mocho cota in mexico city ### Input: CREATE TABLE table_204_373 (
    id number,
    "wager" text,
    "winner" text,
    "loser" text,
    "location" text,
    "date" text
) ### Response: SELECT "winner" FROM table_204_373 WHERE "loser" = 'mocho cota' AND "location" = 'mexico city' ORDER BY "date" LIMIT 1


Instruction: what is admission time and drug dose of subject id 74032?

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

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

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

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

Response: SELECT demographic.admittime, prescriptions.drug_dose FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.subject_id = "74032"

Below are sql tables 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 admission time and drug dose of subject id 74032? ### 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 diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
) ### Response: SELECT demographic.admittime, prescriptions.drug_dose FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.subject_id = "74032"


Instruction: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the average of salary over the job_id , and group by attribute job_id, I want to order in descending by the JOB_ID please.

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

CREATE TABLE countries (
    COUNTRY_ID varchar(2),
    COUNTRY_NAME varchar(40),
    REGION_ID decimal(10,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 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 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 departments (
    DEPARTMENT_ID decimal(4,0),
    DEPARTMENT_NAME varchar(30),
    MANAGER_ID decimal(6,0),
    LOCATION_ID decimal(4,0)
)

Response: SELECT JOB_ID, AVG(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_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 whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the average of salary over the job_id , and group by attribute job_id, I want to order in descending by the JOB_ID please. ### Input: CREATE TABLE jobs (
    JOB_ID varchar(10),
    JOB_TITLE varchar(35),
    MIN_SALARY decimal(6,0),
    MAX_SALARY decimal(6,0)
)

CREATE TABLE countries (
    COUNTRY_ID varchar(2),
    COUNTRY_NAME varchar(40),
    REGION_ID decimal(10,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 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 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 departments (
    DEPARTMENT_ID decimal(4,0),
    DEPARTMENT_NAME varchar(30),
    MANAGER_ID decimal(6,0),
    LOCATION_ID decimal(4,0)
) ### Response: SELECT JOB_ID, AVG(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID DESC


Instruction: What is the highest Aug 2013 with a Nov 2011 smaller than 968, and a Jul 2012 with 31, and a Jun 2011 larger than 30?

Input:
CREATE TABLE table_51528 (
    "Feb 2010" text,
    "Mar 2010" text,
    "May 2010" real,
    "Jun 2010" real,
    "Jul 2010" real,
    "Aug 2010" real,
    "Sep 2010" real,
    "Oct 2010" real,
    "Nov 2010" real,
    "Dec 2010" real,
    "Jan 2011" real,
    "Feb 2011" real,
    "Mar 2011" real,
    "Apr 2011" real,
    "May 2011" real,
    "Jun 2011" real,
    "Jul 2011" real,
    "Aug 2011" real,
    "Sep 2011" real,
    "Oct 2011" real,
    "Nov 2011" real,
    "Dec 2011" real,
    "Jan 2012" real,
    "Feb 2012" real,
    "Mar 2012" real,
    "Apr 2012" real,
    "May 2012" real,
    "Jun 2012" real,
    "Jul 2012" real,
    "Aug 2012" real,
    "Sep 2012" real,
    "Oct 2012" real,
    "Nov 2012" real,
    "Dec 2012" real,
    "Jan 2013" real,
    "Feb 2013" real,
    "Mar 2013" real,
    "Apr 2013" real,
    "May 2013" real,
    "Jun 2013" real,
    "Jul 2013" real,
    "Aug 2013" real,
    "Sep 2013" real,
    "Oct 2013" real
)

Response: SELECT MAX("Aug 2013") FROM table_51528 WHERE "Nov 2011" < '968' AND "Jul 2012" = '31' AND "Jun 2011" > '30'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest Aug 2013 with a Nov 2011 smaller than 968, and a Jul 2012 with 31, and a Jun 2011 larger than 30? ### Input: CREATE TABLE table_51528 (
    "Feb 2010" text,
    "Mar 2010" text,
    "May 2010" real,
    "Jun 2010" real,
    "Jul 2010" real,
    "Aug 2010" real,
    "Sep 2010" real,
    "Oct 2010" real,
    "Nov 2010" real,
    "Dec 2010" real,
    "Jan 2011" real,
    "Feb 2011" real,
    "Mar 2011" real,
    "Apr 2011" real,
    "May 2011" real,
    "Jun 2011" real,
    "Jul 2011" real,
    "Aug 2011" real,
    "Sep 2011" real,
    "Oct 2011" real,
    "Nov 2011" real,
    "Dec 2011" real,
    "Jan 2012" real,
    "Feb 2012" real,
    "Mar 2012" real,
    "Apr 2012" real,
    "May 2012" real,
    "Jun 2012" real,
    "Jul 2012" real,
    "Aug 2012" real,
    "Sep 2012" real,
    "Oct 2012" real,
    "Nov 2012" real,
    "Dec 2012" real,
    "Jan 2013" real,
    "Feb 2013" real,
    "Mar 2013" real,
    "Apr 2013" real,
    "May 2013" real,
    "Jun 2013" real,
    "Jul 2013" real,
    "Aug 2013" real,
    "Sep 2013" real,
    "Oct 2013" real
) ### Response: SELECT MAX("Aug 2013") FROM table_51528 WHERE "Nov 2011" < '968' AND "Jul 2012" = '31' AND "Jun 2011" > '30'


Instruction: How many rounds were on July 10?

Input:
CREATE TABLE table_24626 (
    "Round" real,
    "Date" text,
    "City and venue" text,
    "Winner" text,
    "Runner-up" text,
    "3rd placed" text,
    "4th placed" text,
    "Results" text
)

Response: SELECT COUNT("Round") FROM table_24626 WHERE "Date" = 'July 10'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many rounds were on July 10? ### Input: CREATE TABLE table_24626 (
    "Round" real,
    "Date" text,
    "City and venue" text,
    "Winner" text,
    "Runner-up" text,
    "3rd placed" text,
    "4th placed" text,
    "Results" text
) ### Response: SELECT COUNT("Round") FROM table_24626 WHERE "Date" = 'July 10'


Instruction: what country lost the most ships to u-502 ?

Input:
CREATE TABLE table_203_268 (
    id number,
    "date" text,
    "name" text,
    "nationality" text,
    "tonnage\n(grt)" number,
    "fate" text
)

Response: SELECT "nationality" FROM table_203_268 GROUP BY "nationality" ORDER BY COUNT("name") 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 country lost the most ships to u-502 ? ### Input: CREATE TABLE table_203_268 (
    id number,
    "date" text,
    "name" text,
    "nationality" text,
    "tonnage\n(grt)" number,
    "fate" text
) ### Response: SELECT "nationality" FROM table_203_268 GROUP BY "nationality" ORDER BY COUNT("name") DESC LIMIT 1


Instruction: how many hours have it been since the first time patient 027-140654 received procedures during their current hospital encounter?

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

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

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

Response: SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-140654' AND patient.hospitaldischargetime IS NULL)) ORDER BY treatment.treatmenttime 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: how many hours have it been since the first time patient 027-140654 received procedures during their current hospital encounter? ### Input: CREATE TABLE medication (
    medicationid number,
    patientunitstayid number,
    drugname text,
    dosage text,
    routeadmin text,
    drugstarttime time,
    drugstoptime time
)

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

CREATE TABLE intakeoutput (
    intakeoutputid number,
    patientunitstayid number,
    cellpath text,
    celllabel text,
    cellvaluenumeric number,
    intakeoutputtime 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 lab (
    labid number,
    patientunitstayid number,
    labname text,
    labresult number,
    labresulttime 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 microlab (
    microlabid number,
    patientunitstayid number,
    culturesite text,
    organism text,
    culturetakentime time
) ### Response: SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-140654' AND patient.hospitaldischargetime IS NULL)) ORDER BY treatment.treatmenttime LIMIT 1


Instruction: What district has counties represented by Baltimore county, a committee of health and government operations, and a first elected smaller than 2002?

Input:
CREATE TABLE table_15822 (
    "District" text,
    "Counties Represented" text,
    "Party" text,
    "First Elected" real,
    "Committee" text
)

Response: SELECT "District" FROM table_15822 WHERE "Counties Represented" = 'baltimore county' AND "Committee" = 'health and government operations' AND "First Elected" < '2002'

Below are sql tables 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 district has counties represented by Baltimore county, a committee of health and government operations, and a first elected smaller than 2002? ### Input: CREATE TABLE table_15822 (
    "District" text,
    "Counties Represented" text,
    "Party" text,
    "First Elected" real,
    "Committee" text
) ### Response: SELECT "District" FROM table_15822 WHERE "Counties Represented" = 'baltimore county' AND "Committee" = 'health and government operations' AND "First Elected" < '2002'


Instruction: what is the number of routes that intersect highway 91 ?

Input:
CREATE TABLE table_203_333 (
    id number,
    "kilometers" number,
    "name" text,
    "location" text,
    "intersecting routes" text
)

Response: SELECT COUNT("intersecting routes") FROM table_203_333

Below are sql tables 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 routes that intersect highway 91 ? ### Input: CREATE TABLE table_203_333 (
    id number,
    "kilometers" number,
    "name" text,
    "location" text,
    "intersecting routes" text
) ### Response: SELECT COUNT("intersecting routes") FROM table_203_333


Instruction: Who is the home side when the away side scores 11.15 (81)?

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

Response: SELECT "Home team" FROM table_33617 WHERE "Away team score" = '11.15 (81)'

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the home side when the away side scores 11.15 (81)? ### Input: CREATE TABLE table_33617 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
) ### Response: SELECT "Home team" FROM table_33617 WHERE "Away team score" = '11.15 (81)'


Instruction: What is the frequency of the dates (bin into weekday interval) that had the top 5 cloud cover rates? You can draw me a bar chart for this purpose, and could you sort from low to high by the y-axis?

Input:
CREATE TABLE status (
    station_id INTEGER,
    bikes_available INTEGER,
    docks_available INTEGER,
    time TEXT
)

CREATE TABLE station (
    id INTEGER,
    name TEXT,
    lat NUMERIC,
    long NUMERIC,
    dock_count INTEGER,
    city TEXT,
    installation_date TEXT
)

CREATE TABLE weather (
    date TEXT,
    max_temperature_f INTEGER,
    mean_temperature_f INTEGER,
    min_temperature_f INTEGER,
    max_dew_point_f INTEGER,
    mean_dew_point_f INTEGER,
    min_dew_point_f INTEGER,
    max_humidity INTEGER,
    mean_humidity INTEGER,
    min_humidity INTEGER,
    max_sea_level_pressure_inches NUMERIC,
    mean_sea_level_pressure_inches NUMERIC,
    min_sea_level_pressure_inches NUMERIC,
    max_visibility_miles INTEGER,
    mean_visibility_miles INTEGER,
    min_visibility_miles INTEGER,
    max_wind_Speed_mph INTEGER,
    mean_wind_speed_mph INTEGER,
    max_gust_speed_mph INTEGER,
    precipitation_inches INTEGER,
    cloud_cover INTEGER,
    events TEXT,
    wind_dir_degrees INTEGER,
    zip_code INTEGER
)

CREATE TABLE trip (
    id INTEGER,
    duration INTEGER,
    start_date TEXT,
    start_station_name TEXT,
    start_station_id INTEGER,
    end_date TEXT,
    end_station_name TEXT,
    end_station_id INTEGER,
    bike_id INTEGER,
    subscription_type TEXT,
    zip_code INTEGER
)

Response: SELECT date, COUNT(date) FROM weather ORDER BY COUNT(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: What is the frequency of the dates (bin into weekday interval) that had the top 5 cloud cover rates? You can draw me a bar chart for this purpose, and could you sort from low to high by the y-axis? ### Input: CREATE TABLE status (
    station_id INTEGER,
    bikes_available INTEGER,
    docks_available INTEGER,
    time TEXT
)

CREATE TABLE station (
    id INTEGER,
    name TEXT,
    lat NUMERIC,
    long NUMERIC,
    dock_count INTEGER,
    city TEXT,
    installation_date TEXT
)

CREATE TABLE weather (
    date TEXT,
    max_temperature_f INTEGER,
    mean_temperature_f INTEGER,
    min_temperature_f INTEGER,
    max_dew_point_f INTEGER,
    mean_dew_point_f INTEGER,
    min_dew_point_f INTEGER,
    max_humidity INTEGER,
    mean_humidity INTEGER,
    min_humidity INTEGER,
    max_sea_level_pressure_inches NUMERIC,
    mean_sea_level_pressure_inches NUMERIC,
    min_sea_level_pressure_inches NUMERIC,
    max_visibility_miles INTEGER,
    mean_visibility_miles INTEGER,
    min_visibility_miles INTEGER,
    max_wind_Speed_mph INTEGER,
    mean_wind_speed_mph INTEGER,
    max_gust_speed_mph INTEGER,
    precipitation_inches INTEGER,
    cloud_cover INTEGER,
    events TEXT,
    wind_dir_degrees INTEGER,
    zip_code INTEGER
)

CREATE TABLE trip (
    id INTEGER,
    duration INTEGER,
    start_date TEXT,
    start_station_name TEXT,
    start_station_id INTEGER,
    end_date TEXT,
    end_station_name TEXT,
    end_station_id INTEGER,
    bike_id INTEGER,
    subscription_type TEXT,
    zip_code INTEGER
) ### Response: SELECT date, COUNT(date) FROM weather ORDER BY COUNT(date)


Instruction: what is the diagnosis icd9 code for patient name kurt buczek?

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

Response: SELECT diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Kurt Buczek"

Below are sql tables 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 diagnosis icd9 code for patient name kurt buczek? ### 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 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
) ### Response: SELECT diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Kurt Buczek"


Instruction: Find dates and attendance for exhibitions that happened in 2004, show me the attendance by date with a bar chart.

Input:
CREATE TABLE exhibition_record (
    Exhibition_ID int,
    Date text,
    Attendance int
)

CREATE TABLE artist (
    Artist_ID int,
    Name text,
    Country text,
    Year_Join int,
    Age int
)

CREATE TABLE exhibition (
    Exhibition_ID int,
    Year int,
    Theme text,
    Artist_ID int,
    Ticket_Price real
)

Response: SELECT T1.Date, T1.Attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.Exhibition_ID = T2.Exhibition_ID WHERE T2.Year = 2004

Below are sql tables 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 dates and attendance for exhibitions that happened in 2004, show me the attendance by date with a bar chart. ### Input: CREATE TABLE exhibition_record (
    Exhibition_ID int,
    Date text,
    Attendance int
)

CREATE TABLE artist (
    Artist_ID int,
    Name text,
    Country text,
    Year_Join int,
    Age int
)

CREATE TABLE exhibition (
    Exhibition_ID int,
    Year int,
    Theme text,
    Artist_ID int,
    Ticket_Price real
) ### Response: SELECT T1.Date, T1.Attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.Exhibition_ID = T2.Exhibition_ID WHERE T2.Year = 2004


Instruction: Short Favorited Commented Questions with no Answers.

Input:
CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

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

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 PostLinks (
    Id number,
    CreationDate time,
    PostId number,
    RelatedPostId number,
    LinkTypeId number
)

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

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

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

CREATE TABLE PostTypes (
    Id number,
    Name text
)

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

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 PostTags (
    PostId number,
    TagId number
)

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

CREATE TABLE CloseReasonTypes (
    Id number,
    Name text,
    Description 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 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 ReviewTasks (
    Id number,
    ReviewTaskTypeId number,
    CreationDate time,
    DeletionDate time,
    ReviewTaskStateId number,
    PostId number,
    SuggestedEditId number,
    CompletedByReviewTaskId number
)

CREATE TABLE SuggestedEditVotes (
    Id number,
    SuggestedEditId number,
    UserId number,
    VoteTypeId number,
    CreationDate time,
    TargetUserId number,
    TargetRepChange 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 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 Badges (
    Id number,
    UserId number,
    Name text,
    Date time,
    Class number,
    TagBased boolean
)

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 ReviewTaskStates (
    Id number,
    Name text,
    Description text
)

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

Response: SELECT Id AS "post_link", Tags FROM Posts WHERE LENGTH(Body) < 100 AND PostTypeId = 1 AND ClosedDate IS NULL AND DeletionDate IS NULL AND CommunityOwnedDate IS NULL AND AnswerCount = 0 AND CommentCount > 0 AND FavoriteCount > 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: Short Favorited Commented Questions with no Answers. ### Input: CREATE TABLE VoteTypes (
    Id number,
    Name text
)

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

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

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

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 PostLinks (
    Id number,
    CreationDate time,
    PostId number,
    RelatedPostId number,
    LinkTypeId number
)

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

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

CREATE TABLE PostHistoryTypes (
    Id number,
    Name text
)

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

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

CREATE TABLE PostTypes (
    Id number,
    Name text
)

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

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 PostTags (
    PostId number,
    TagId number
)

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

CREATE TABLE CloseReasonTypes (
    Id number,
    Name text,
    Description 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 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 ReviewTasks (
    Id number,
    ReviewTaskTypeId number,
    CreationDate time,
    DeletionDate time,
    ReviewTaskStateId number,
    PostId number,
    SuggestedEditId number,
    CompletedByReviewTaskId number
)

CREATE TABLE SuggestedEditVotes (
    Id number,
    SuggestedEditId number,
    UserId number,
    VoteTypeId number,
    CreationDate time,
    TargetUserId number,
    TargetRepChange 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 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 Badges (
    Id number,
    UserId number,
    Name text,
    Date time,
    Class number,
    TagBased boolean
)

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 ReviewTaskStates (
    Id number,
    Name text,
    Description text
)

CREATE TABLE ReviewTaskResultTypes (
    Id number,
    Name text,
    Description text
) ### Response: SELECT Id AS "post_link", Tags FROM Posts WHERE LENGTH(Body) < 100 AND PostTypeId = 1 AND ClosedDate IS NULL AND DeletionDate IS NULL AND CommunityOwnedDate IS NULL AND AnswerCount = 0 AND CommentCount > 0 AND FavoriteCount > 0


Instruction: For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the sum of price , and group by attribute name, I want to show from high to low by the x axis.

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

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

Response: SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name DESC

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the sum of price , and group by attribute name, I want to show from high to low by the x axis. ### Input: CREATE TABLE Manufacturers (
    Code INTEGER,
    Name VARCHAR(255),
    Headquarter VARCHAR(255),
    Founder VARCHAR(255),
    Revenue REAL
)

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


Instruction: Which club lost exactly 7 matches?

Input:
CREATE TABLE table_74082 (
    "Club" text,
    "Played" text,
    "Won" text,
    "Drawn" text,
    "Lost" text,
    "Points for" text,
    "Points against" text,
    "Tries for" text,
    "Points" text
)

Response: SELECT "Club" FROM table_74082 WHERE "Lost" = '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: Which club lost exactly 7 matches? ### Input: CREATE TABLE table_74082 (
    "Club" text,
    "Played" text,
    "Won" text,
    "Drawn" text,
    "Lost" text,
    "Points for" text,
    "Points against" text,
    "Tries for" text,
    "Points" text
) ### Response: SELECT "Club" FROM table_74082 WHERE "Lost" = '7'


Instruction: What is Tie no, when Date is '18 Nov 1989', and when Home Team is 'Doncaster Rovers'?

Input:
CREATE TABLE table_name_32 (
    tie_no VARCHAR,
    date VARCHAR,
    home_team VARCHAR
)

Response: SELECT tie_no FROM table_name_32 WHERE date = "18 nov 1989" AND home_team = "doncaster rovers"

Below are sql tables 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 Tie no, when Date is '18 Nov 1989', and when Home Team is 'Doncaster Rovers'? ### Input: CREATE TABLE table_name_32 (
    tie_no VARCHAR,
    date VARCHAR,
    home_team VARCHAR
) ### Response: SELECT tie_no FROM table_name_32 WHERE date = "18 nov 1989" AND home_team = "doncaster rovers"


Instruction: On August 22, how many people came to the game?

Input:
CREATE TABLE table_67152 (
    "Date" text,
    "Opponent" text,
    "Score" text,
    "Loss" text,
    "Attendance" real,
    "Record" text
)

Response: SELECT "Attendance" FROM table_67152 WHERE "Date" = 'august 22'

Below are sql tables 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 August 22, how many people came to the game? ### Input: CREATE TABLE table_67152 (
    "Date" text,
    "Opponent" text,
    "Score" text,
    "Loss" text,
    "Attendance" real,
    "Record" text
) ### Response: SELECT "Attendance" FROM table_67152 WHERE "Date" = 'august 22'


Instruction: What is the latest year any of the incumbents were first elected?

Input:
CREATE TABLE table_1342270_42 (
    first_elected INTEGER
)

Response: SELECT MAX(first_elected) FROM table_1342270_42

Below are sql tables 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 latest year any of the incumbents were first elected? ### Input: CREATE TABLE table_1342270_42 (
    first_elected INTEGER
) ### Response: SELECT MAX(first_elected) FROM table_1342270_42


Instruction: count the number of people who were prescribed chlorhexidine gluconate 0.12% oral rinse within 2 months following a diagnosis of oth spf gastrt w hmrhg until 2102.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Response: SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'oth spf gastrt w hmrhg') AND STRFTIME('%y', diagnoses_icd.charttime) <= '2102') AS t1 JOIN (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'chlorhexidine gluconate 0.12% oral rinse' AND STRFTIME('%y', prescriptions.startdate) <= '2102') AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND DATETIME(t2.startdate) BETWEEN DATETIME(t1.charttime) AND DATETIME(t1.charttime, '+2 month')

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of people who were prescribed chlorhexidine gluconate 0.12% oral rinse within 2 months following a diagnosis of oth spf gastrt w hmrhg until 2102. ### Input: CREATE TABLE d_items (
    row_id number,
    itemid number,
    label text,
    linksto text
)

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

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE cost (
    row_id number,
    subject_id number,
    hadm_id number,
    event_type text,
    event_id number,
    chargetime time,
    cost number
) ### Response: SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'oth spf gastrt w hmrhg') AND STRFTIME('%y', diagnoses_icd.charttime) <= '2102') AS t1 JOIN (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'chlorhexidine gluconate 0.12% oral rinse' AND STRFTIME('%y', prescriptions.startdate) <= '2102') AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND DATETIME(t2.startdate) BETWEEN DATETIME(t1.charttime) AND DATETIME(t1.charttime, '+2 month')


Instruction: when was the last time since 04/2104 that patient 88659 was prescribed vial and iso-osmotic dextrose at the same time?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Response: SELECT t1.startdate FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'vial' AND admissions.subject_id = 88659 AND STRFTIME('%y-%m', prescriptions.startdate) >= '2104-04') AS t1 JOIN (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'iso-osmotic dextrose' AND admissions.subject_id = 88659 AND STRFTIME('%y-%m', prescriptions.startdate) >= '2104-04') AS t2 ON t1.subject_id = t2.subject_id WHERE DATETIME(t1.startdate) = DATETIME(t2.startdate) ORDER BY t1.startdate 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: when was the last time since 04/2104 that patient 88659 was prescribed vial and iso-osmotic dextrose at the same time? ### Input: 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 outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value number
)

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

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE d_items (
    row_id number,
    itemid number,
    label text,
    linksto text
) ### Response: SELECT t1.startdate FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'vial' AND admissions.subject_id = 88659 AND STRFTIME('%y-%m', prescriptions.startdate) >= '2104-04') AS t1 JOIN (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'iso-osmotic dextrose' AND admissions.subject_id = 88659 AND STRFTIME('%y-%m', prescriptions.startdate) >= '2104-04') AS t2 ON t1.subject_id = t2.subject_id WHERE DATETIME(t1.startdate) = DATETIME(t2.startdate) ORDER BY t1.startdate DESC LIMIT 1


Instruction: Name the ppv for sky famiglia and dar 16:9 for mtv dance

Input:
CREATE TABLE table_20379 (
    "N\u00b0" real,
    "Television service" text,
    "Country" text,
    "Language" text,
    "Content" text,
    "DAR" text,
    "HDTV" text,
    "PPV" text,
    "Package/Option" text
)

Response: SELECT "PPV" FROM table_20379 WHERE "Package/Option" = 'Sky Famiglia' AND "DAR" = '16:9' AND "Television service" = 'MTV Dance'

Below are sql tables 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 ppv for sky famiglia and dar 16:9 for mtv dance ### Input: CREATE TABLE table_20379 (
    "N\u00b0" real,
    "Television service" text,
    "Country" text,
    "Language" text,
    "Content" text,
    "DAR" text,
    "HDTV" text,
    "PPV" text,
    "Package/Option" text
) ### Response: SELECT "PPV" FROM table_20379 WHERE "Package/Option" = 'Sky Famiglia' AND "DAR" = '16:9' AND "Television service" = 'MTV Dance'


Instruction: Show institution names along with the number of proteins for each institution in a bar chart, and order by the y-axis in desc.

Input:
CREATE TABLE protein (
    common_name text,
    protein_name text,
    divergence_from_human_lineage real,
    accession_number text,
    sequence_length real,
    sequence_identity_to_human_protein text,
    Institution_id text
)

CREATE TABLE building (
    building_id text,
    Name text,
    Street_address text,
    Years_as_tallest text,
    Height_feet int,
    Floors int
)

CREATE TABLE Institution (
    Institution_id text,
    Institution text,
    Location text,
    Founded real,
    Type text,
    Enrollment int,
    Team text,
    Primary_Conference text,
    building_id text
)

Response: SELECT Institution, COUNT(*) FROM Institution AS T1 JOIN protein AS T2 ON T1.Institution_id = T2.Institution_id GROUP BY T1.Institution_id 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: Show institution names along with the number of proteins for each institution in a bar chart, and order by the y-axis in desc. ### Input: CREATE TABLE protein (
    common_name text,
    protein_name text,
    divergence_from_human_lineage real,
    accession_number text,
    sequence_length real,
    sequence_identity_to_human_protein text,
    Institution_id text
)

CREATE TABLE building (
    building_id text,
    Name text,
    Street_address text,
    Years_as_tallest text,
    Height_feet int,
    Floors int
)

CREATE TABLE Institution (
    Institution_id text,
    Institution text,
    Location text,
    Founded real,
    Type text,
    Enrollment int,
    Team text,
    Primary_Conference text,
    building_id text
) ### Response: SELECT Institution, COUNT(*) FROM Institution AS T1 JOIN protein AS T2 ON T1.Institution_id = T2.Institution_id GROUP BY T1.Institution_id ORDER BY COUNT(*) DESC


Instruction: what is the record when the round is before 3 and the time si 4:59?

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

Response: SELECT "Record" FROM table_48174 WHERE "Round" < '3' AND "Time" = '4:59'

Below are sql tables 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 record when the round is before 3 and the time si 4:59? ### Input: CREATE TABLE table_48174 (
    "Res." text,
    "Record" text,
    "Opponent" text,
    "Method" text,
    "Event" text,
    "Round" real,
    "Time" text,
    "Location" text
) ### Response: SELECT "Record" FROM table_48174 WHERE "Round" < '3' AND "Time" = '4:59'


Instruction: A line chart for finding the number of the enrollment date for all the tests that have 'Pass' result.

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

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

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

Response: SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" GROUP BY date_of_enrolment

Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A line chart for finding the number of the enrollment date for all the tests that have 'Pass' result. ### Input: CREATE TABLE Subjects (
    subject_id INTEGER,
    subject_name VARCHAR(120)
)

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

CREATE TABLE Student_Tests_Taken (
    registration_id INTEGER,
    date_test_taken DATETIME,
    test_result VARCHAR(255)
) ### Response: SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" GROUP BY date_of_enrolment