Answer the question
In order to leave comments, you need to log in
How to display the value that repeats the most?
let's say I have:
1б2, 34, 56, 7, 7, 7, 7, 7, 7, 7, 4, 7, 3, 4, 5, 7, 7, 7
Answer the question
In order to leave comments, you need to log in
if they are in the table:
select distinct(value) from table where value=7
Well, for example:
select i from t group by i order by count(*) desc limit 1;
In the acc array (the key is the value from the ref array), you add the current index of the ref array with a separator to the value.
In the array you find the longest list and form a string by indexes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question