Question: List the name and count of each product in all orders.
Schema: create table orders (order_id varchar, PRIMARY KEY (order_id)); create table products (product_name varchar, product_id varchar, PRIMARY KEY (product_name)); create table order_items (order_id varchar, product_id varchar, PRIMARY KEY (order_id))
SQL: 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