CREATE TABLE Customer_Orders (order_id INT, customer_id INT, order_status_code VARCHAR, shipping_method_code VARCHAR, order_placed_datetime DATETIME, order_delivered_datetime DATETIME, order_shipping_charges VARCHAR)
CREATE TABLE Customers (customer_id INT, payment_method VARCHAR, customer_name VARCHAR, customer_phone VARCHAR, customer_email VARCHAR, customer_address VARCHAR, customer_login VARCHAR, customer_password VARCHAR)
CREATE TABLE Order_Items (item_id INT, order_item_status_code VARCHAR, order_id INT, product_id INT, item_status_code VARCHAR, item_delivered_datetime DATETIME, item_order_quantity VARCHAR)
CREATE TABLE Products (product_id INT, product_category VARCHAR, product_name VARCHAR)
CREATE TABLE Mailshot_Campaigns (mailshot_id INT, product_category VARCHAR, mailshot_name VARCHAR, mailshot_start_date DATETIME, mailshot_end_date DATETIME)
CREATE TABLE Customer_Addresses (customer_id INT, premise_id INT, date_address_from DATETIME, address_type_code VARCHAR, date_address_to DATETIME)
CREATE TABLE Premises (premise_id INT, premises_type VARCHAR, premise_details VARCHAR)
CREATE TABLE Mailshot_Customers (mailshot_id INT, customer_id INT, outcome_code VARCHAR, mailshot_customer_date DATETIME)

Show how many customer addresses in each address type code with a bar chart.
SELECT address_type_code, COUNT(address_type_code) FROM Customer_Addresses AS T1 JOIN Premises AS T2 ON T1.premise_id = T2.premise_id GROUP BY address_type_code
SELECT "address_type_code", COUNT("address_type_code") FROM "Customer_Addresses" AS "T1" JOIN "Premises" AS "T2" ON "T1"."premise_id" = "T2"."premise_id" GROUP BY "address_type_code"