Skip to content
Advertisement

Show when order number is unique for the item number

enter image description here

I attached a simple table with two columns, Item number and Order number. In the example attached only item number C5664 and A9930 met the criteria. How do I write this code in SQL?

Advertisement

Answer

If you group by the item numbers then the unique count for the order numbers will be 1

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement