We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!Submit Feedback
This one took me a while as I'm not sure I fully got my head round the output format including the nulls, so there was a lot of trying to get my output to match the solution rather than answering the client question, but anyway, got there in the end with a slightly different method to the offical solution.
I think I have a better and more general solution than the posted one.
The posted solution yields 12 rows of merchants paired with [Null]. My solution throws those out in the same step as the de-duplication. Also, my solution will handle any number of columns.
As a bonus, I added a view of the data that sorts by most common combinations without respect to User ID. In the case of this particular data, only one pair rises above the rest, but I'm pretty sure it works. Let me know what you think.