Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql select most frequent value in group

SELECT col, COUNT(col) AS value_occurrence
FROM m_table GROUP BY col ORDER BY value_occurrence DESC;
 
PREVIOUS NEXT
Tagged: #sql #select #frequent #group
ADD COMMENT
Topic
Name
1+6 =