Choose the most frequent from the column in

Hey. I have a column in a table and I want to select the most common item from the selected column. The table is configured. Publish:

  • ID
  • Title
  • published

I want to be able to choose the most repetitive places to publish publications. Is it possible to do this?
Thanks in advance
Dean

+3
source share
1 answer
select published, count(*) nbr
from table1
group by published
order by nbr desc
limit 1

, , , . , , , , , . limit 1, .

+3

Source: https://habr.com/ru/post/1751387/


All Articles