Check out example codes for "mysql group by day". It will help you in understanding the concepts better.

Code Example 1

GROUP BY DATE_FORMAT(record_date, '%Y%m')

Learn ReactJs, React Native from akashmittal.com