SELECT p.products_id,p.products_model,p.products_ordered, count(op.orders_products_id) AS Sales from products as p INNER JOIN orders_products as op ON p.products_id=op.orders_products_id where p.products_ordered >0 and p.products_model LIKE 'B%' ORDER BY p.products_ordered DESC
Just trying to see how many orders for these products have been placed. Not the total sold just unique orders...
products_id products_model products_ordered Sales NULL NULL NULL 0
Statement executes but no results which can't be correct.
I'm sure I'm missing something basic..
Any help is appreciated.










