I have a very simple table with product_id of a product and its height, width, and depth. Product_id can exist multiple times in a table which I'm using, hence I've used distinct statement. However, the combination of height, width and depth for a particular product_id should be unique.
Example given below: For product_id 1003 it is okay, because it has only one dimension combination (6,2,2) For product_id 1002 it is not okay, because it has two combinations of dimensions (7,3,3 and 9,3,3)
How to tell sql to show ONLY these records like 1002, where for one product_id we have multiple dimensions combination?
Thank you very much in advance for help.