Answers for "mysql count group by"

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
1

sql groub by count

SELECT COUNT(Id), Country 
  FROM Customer
 GROUP BY Country
Posted by: Guest on June-01-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language