SELECT T3.product_name, 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_id
Sebutkan nama dan hitungan setiap produk dalam semua pesanan.
CREATE TABLE orders (order_id VARCHAR); CREATE TABLE products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR)