How to determine most often element in postgreSQL? -
if have column similar this:
2012 2013 2012 2012 2011 how determine year more used others? (in example 2012, since there 3 entries year).
one way calculate numbers of occurences elements
order them number in descending order, , take first one:
select element table1 group element order count(*) desc limit 1 ;
Comments
Post a Comment