I have a table:
alphabet occurrence
a 22
b 22
c 21
d 12
a 22
g 20
h 11
c 22
b 32
how to find 3rd most occurring value in this table using SQL Command.\
I am using something like:
SELECT occurrence, COUNT(occurrence) from mytable group by occurrence order by count(occurrence) desc limit 3;
output expected:
if n = 3
c count(occurrence of c)
c 43