Show me all the products.
select * from products
Show me only the products that have been ordered.
select * 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
Show me only the count and id of each product
select count(*), t3.product_id 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