Hi. I have a big dataset (1 million records) which i've been working with in excel. But its getting too slow, so i want to do the task with SQL.
the dataset contains sales data and includes the fields State, productType, and Month. I need to get one record for each combination of these fields. In Excel, I created a calculated field as State&productType&Month and then deduplicated on that.
I've done the easy bit: Select * from salesData where ...
Thanks. I forgot to mention, that there are lots of other fields, eg productId, productPrice, and I need them included in the output (but not regarded as DISTINCT).
... A bit more explanation.... I'm looking to get one example record for each combination of State, ProductType and Month, and I need all the other fields in that example record.