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

Code Example 1

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

Code Example 2

SELECT SUM(foo), DATE(mydate) FROM a_table GROUP BY DATE(a_table.mydate);

Learn ReactJs, React Native from akashmittal.com