how to count specific column in mysql code example
Example 1: get table which have specific columns in mysql
SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME IN ('columnA','ColumnB')
AND TABLE_SCHEMA='YourDatabase';
Example 2: mysql count number of occurrences in a column
SELECT name,COUNT(*)
FROM tablename
GROUP BY name
ORDER BY COUNT(*) DESC;