I have a database of supermarket transactions that I wish to use for associative data mining purposes. Below is an image of my current SQL query however I am not sure if what I require is possible with SQL (Explained below image).
I need my results to be in the following format - Each unique ProductName needs to have its own column with a binary 0/1 representation of whether the CustomerID purchased the product.
Is this possible? If so where exactly would I start?
PIVOT
it into another result set (which would have no limitation on columns). ThePIVOT
query can be saved as a View (which he may then run into such a limitation), but it doesn't have to be. And we have no context on how he plans to consume this, e.g. if it's being pulled into Excel, then he's still in the clear as far as that column limitation goes.