Lets assume I have this postgresql table:
product_id store_id price
How do I query "which products hasn't the same price on every store".
I mean, same value on product_id but distinct value on price.
答案 0 :(得分:1)
SELECT product_id
FROM "ProductStore"
GROUP BY product_id
HAVING COUNT(DISTINCT price) > 1