I think it says it clearly in the title:
lets assume we have this table called realestate:
id type
1 4
2 5
3 5
4 1
5 4
6 4
I want the output to be type=4 because it’s the highest frequent type and I want it to output the frequency of the previous type which is here count=3
Example – http://www.sqlize.com/817Dtyd4KD