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

Code Example 1

SELECT age, count(age) 
  FROM Students 
 GROUP by age

Learn ReactJs, React Native from akashmittal.com