CREATE TABLE Order_Items (order_item_id INT, product_id INT, order_id INT, order_item_status VARCHAR, order_item_details VARCHAR)
CREATE TABLE Products (product_id INT, product_name VARCHAR, product_details VARCHAR)
CREATE TABLE Invoices (invoice_number INT, invoice_date DATETIME, invoice_details VARCHAR)
CREATE TABLE Shipments (shipment_id INT, order_id INT, invoice_number INT, shipment_tracking_number VARCHAR, shipment_date DATETIME, other_shipment_details VARCHAR)
CREATE TABLE Shipment_Items (shipment_id INT, order_item_id INT)
CREATE TABLE Orders (order_id INT, customer_id INT, order_status VARCHAR, date_order_placed DATETIME, order_details VARCHAR)
CREATE TABLE Customers (customer_id INT, customer_name VARCHAR, customer_details VARCHAR)

List the name and count of each product in all orders. Plot them as pie chart.
SELECT T3.product_name, SUM(COUNT(*)) FROM Orders AS T1 JOIN Order_Items AS T2 JOIN Products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_name
SELECT "T3"."product_name", SUM(COUNT(*)) FROM "Orders" AS "T1" CROSS JOIN "Products" AS "T3" JOIN "Order_Items" AS "T2" ON "T1"."order_id" = "T2"."order_id" AND "T2"."product_id" = "T3"."product_id" GROUP BY "T3"."product_name"