I need someone who knows mysql quite well. I have a table with random numbers from 0 to 9. It could be hundreds of those random numbers.
let's say this is an example. Lets say I have table A with 100 random numbers between 0 and 9
I will provide how many items I want, lets say 10 (this number I need to be able to change). I need then to read last 10 entries in that table A and find out number of occurrences of each of those digits.
then based on the number of occupancies I like to display the highest choices based on the following criteria:
1. If we have two digits tied for the top pick, use only those digits, plus the second best digit (with ties) in our combinations.
2. If there are three or more digits tied for the highest frequency, use only those digits for that position.
3. If we have two or more digits tied for the second highest frequency in a position, use the highest and the second highest digit with ties.
4. If we have any ties with the third highest frequency digit use only the top and second picks.
I did play with mysql while back and I know a lot of those frequencies can be handled inside mysql, I prefer to use mysql for it rather than getting items from DB to php and then processing it as speed might be a factor. I think mysql can handle large quantities of numbers much better than php would. But I need php so I can integrate it into my website.
About the recuiterMember since Nov 11, 2022 Divyaprakash
from Pas-de-Calais, France