Skip to content
Advertisement

Find most frequent value in SQL column

How can I find the most frequent value in a given column in an SQL table?

For example, for this table it should return two since it is the most frequent value:

Advertisement

Answer

Replace column and my_table. Increase 1 if you want to see the N most common values of the column.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement