I need to create a table to store matched pairs that I can query and get a count of how many times a particular matchup was entered. For example "5" might be paired with "6", but "6" might be also paired with "5". (Quotes are for clarity - not to designate strings.) I do not want to differentiate between the two, but have a query return a result of (2) for "5" and "6".
I can create a table with match_1 and match_2 and always force the lower number into match_1, but that seems like a hokey solution to me. Adding them together does not work because "4" and "7" produce the same sum.
I would appreciate any suggestions on what might be the best table structure for recording such entries and a solution for effectively querying for the results.