Answers for "mysql group by get count"

SQL
0

mysql count grouped rows

SELECT DISTINCT my_field, COUNT(*) FROM my_table GROUP BY my_field;

-- Count of grouped rows:
SELECT COUNT(*) FROM (
  SELECT DISTINCT my_field FROM my_table
);
Posted by: Guest on April-23-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language