You have a thousands of products in your range but suspect most don't sell. You want a list of product-types that are in your orders list.
You can GROUP BY the product-code and sum quantity if you want to know that, or use count(distinct <field>)ref.
In practice, you will probably want to see how many of each product you've sold.
SELECT ord_product, sum(ord_qty) FROM orders GROUP BY ord_product; |
If you don't you can use
SELECT count(distinct ord_product) FROM orders; |
This ignores null values of ord_product and throws away duplicates.