MS SQL RIGHT JOIN + GROUP BY
\nSELECT CUSTOMER_ID\nFROM CUSTOMER C\nRIGHT JOIN PRODUCT P\nON C.PRODUCT_KEY = P.PRODUCT_KEY\nGROUP BY CUSTOMER_ID \nHAVING COUNT(DISTINCT C.PRODUCT_KEY) = (SE
```\nSELECT CUSTOMER_ID\nFROM CUSTOMER C\nRIGHT JOIN PRODUCT P\nON C.PRODUCT_KEY = P.PRODUCT_KEY\nGROUP BY CUSTOMER_ID \nHAVING COUNT(DISTINCT C.PRODUCT_KEY) = (SELECT COUNT(DISTINCT PRODUCT_KEY) FROM PRODUCT)\n```\nHello guys! Please do comment and let me know if you have a better approach in MS SQL. Thanks!!
['MS SQL Server']