I don’t mean to select duplicate records only once.
Instead I wont to select those records from table, which are not duplicate. Records present in table only once.
For example:
in table cat_prod there are columns id_category and id_product.
One product can be in multiple categories.
How can I select only those product, which are only in one category?
You can group by the product id and select only those that have
COUNT(*) = 1in theHAVINGclause.