Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments. Visualize by pie chart.
CREATE TABLE Guests (
    guest_id INTEGER,
    gender_code CHAR(1),
    guest_first_name VARCHAR(80),
    guest_last_name VARCHAR(80),
    date_of_birth DATETIME
)

CREATE TABLE Apartments (
    apt_id INTEGER,
    building_id INTEGER,
    apt_type_code CHAR(15),
    apt_number CHAR(10),
    bathroom_count INTEGER,
    bedroom_count INTEGER,
    room_count CHAR(5)
)

CREATE TABLE Apartment_Bookings (
    apt_booking_id INTEGER,
    apt_id INTEGER,
    guest_id INTEGER,
    booking_status_code CHAR(15),
    booking_start_date DATETIME,
    booking_end_date DATETIME
)

CREATE TABLE Apartment_Buildings (
    building_id INTEGER,
    building_short_name CHAR(15),
    building_full_name VARCHAR(80),
    building_description VARCHAR(255),
    building_address VARCHAR(255),
    building_manager VARCHAR(50),
    building_phone VARCHAR(80)
)

CREATE TABLE Apartment_Facilities (
    apt_id INTEGER,
    facility_code CHAR(15)
)

CREATE TABLE View_Unit_Status (
    apt_id INTEGER,
    apt_booking_id INTEGER,
    status_date DATETIME,
    available_yn BIT
)
SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*)
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments. Visualize by pie chart. ### Input: CREATE TABLE Guests (
    guest_id INTEGER,
    gender_code CHAR(1),
    guest_first_name VARCHAR(80),
    guest_last_name VARCHAR(80),
    date_of_birth DATETIME
)

CREATE TABLE Apartments (
    apt_id INTEGER,
    building_id INTEGER,
    apt_type_code CHAR(15),
    apt_number CHAR(10),
    bathroom_count INTEGER,
    bedroom_count INTEGER,
    room_count CHAR(5)
)

CREATE TABLE Apartment_Bookings (
    apt_booking_id INTEGER,
    apt_id INTEGER,
    guest_id INTEGER,
    booking_status_code CHAR(15),
    booking_start_date DATETIME,
    booking_end_date DATETIME
)

CREATE TABLE Apartment_Buildings (
    building_id INTEGER,
    building_short_name CHAR(15),
    building_full_name VARCHAR(80),
    building_description VARCHAR(255),
    building_address VARCHAR(255),
    building_manager VARCHAR(50),
    building_phone VARCHAR(80)
)

CREATE TABLE Apartment_Facilities (
    apt_id INTEGER,
    facility_code CHAR(15)
)

CREATE TABLE View_Unit_Status (
    apt_id INTEGER,
    apt_booking_id INTEGER,
    status_date DATETIME,
    available_yn BIT
) ### Response: SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*)