0

I have a table with records as follows:

ID     Selection

 1        3,23,34,36,37,38,39,40,42,56
 2        7,13,19,29,32,34,45,46,52,59
 3       2,8,11,23,26,32,41,44,46,51

……

(there are 700,000 records, that is main reason why I need to filter down immediately)

I am going to draw 5 random numbers, for example: 2,23,29,34,46

And need to write a mysql statement that display the results that filter and retrieve only the rows that have at least guessed 3 numbers or more, but not necessarily all the drawn numbers.

In the above case the query would return rows 2 (29,34,46 in common) and 3 (2,23,46 in common) in the results.

Can you please help?

Your Common Sense
  • 156,878
  • 40
  • 214
  • 345
Rank
  • 59
  • 1
  • 5

0 Answers0