Hey there!
Each winning/drawn number has its own row, however you would probably unpivot the data in both tables so that you have a key for which group of numbers it belongs to. Then you connect the unpivoted tables for the first one, count the rows, and then you get a count of matches. In order to retrieve the row(s) with the most matches, you need to perform the same processes for each row of the winning numbers table for the second drawing, grouping them by a counted unique drawing identification.
That's basically what most of the posts and a lot of the code on this thread suggests. Have you some alternative code that you'd like to share?
--Jeff Moden
Change is inevitable... Change for the better is not.