Counting unique combinations
问题 I have a table in the following format: And I am trying to find a way to count different combinations of the categories. Here is the output I am looking for: I tried grouping the Category field, but I cannot figure out a way to create a unique combination. Screenshots are in excel, simply for illustration purposes. Actual data is in ms-access. 回答1: First get the unique pairs in a subquery and then join twice to the table to group and count: select t1.Category & '+' & t2.Category as Category,