Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql count number of occurrences in a column

SELECT name,COUNT(*) 
FROM tablename 
GROUP BY name 
ORDER BY COUNT(*) DESC;
 
PREVIOUS NEXT
Tagged: #mysql #count #number #occurrences #column
ADD COMMENT
Topic
Name
8+7 =