mysql count by name code example
Example 1: select count from table mysql
SELECT COUNT(*) FROM count_demos;
Example 2: mysql count number of occurrences in a column
SELECT name,COUNT(*)
FROM tablename
GROUP BY name
ORDER BY COUNT(*) DESC;
SELECT COUNT(*) FROM count_demos;
SELECT name,COUNT(*)
FROM tablename
GROUP BY name
ORDER BY COUNT(*) DESC;