And what you want to be returned from this table?
When the price, then which one - as there are several of them for every product, department, and order?
With current table design, you can get the average price per product, department, and order.
To get the specific price from table, you need additional condition fields, adding of which makes the combination of conditions unique. P.e. a field, which indicates, how many times the current combination of product, department, and order, did appear starting from top row of table.
Both those possibilities are presented in attached file
|