Check out example codes for "sql groub by count". It will help you in understanding the concepts better.

Code Example 1

SELECT COUNT(Id), Country 
  FROM Customer
 GROUP BY Country

Code Example 2

SELECT COUNT(DISTINCT program_name) AS Count,
  program_type AS [Type] 
FROM cm_production 
WHERE [email protected]_number 
GROUP BY program_type

Learn ReactJs, React Native from akashmittal.com