I would like to display a graph of clicks of the last 7 days. The only problem is, I am not sure how to structure my database query to retrieve such numbers.
Here is my database structure for each click:
id Date ip device
_______________________________________________
1 2021-07-06 12:34:32 192.168.0.1 Mobile
2 2021-07-06 01:53:43 192.168.0.1 Desktop
3 2021-07-07 12:34:01 192.168.0.1 Mobile
4 2021-07-08 06:32:56 192.168.0.1 Mobile
5 2021-07-08 11:42:54 192.168.0.1 Mobile
I want to get the number of clicks from July 6th, the number of clicks from July 7th, etc, basically all of the dates from last week.
Any solution?