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

Code Example 1

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