Answers for "mysql group by having 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
0

SQL only show where count is great than 1

SELECT COUNT( * ) 
FROM agents 
HAVING COUNT(*)>1; --count is greater than 1
Posted by: Guest on March-17-2020
0

mysql count unique in group statement

COUNT(DISTINCT fieldname)
Posted by: Guest on August-26-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language