I'm making a panel where I want to show the number of records made per day, week, month and year.
When a new record is made, the date with the format d/m/Y is saved in the database in a column of the table.
For example to obtain how many records have been made in a day I use:
SELECT COUNT(*) FROM {$wpdb->prefix}emails WHERE registration_date = '$today'
What I want to achieve is to know how many records I have obtained in the week in which we are knowing that the week starts on Monday and ends on Sunday.
The truth is that I have no great idea to make queries and any help is welcome.
Thanks in advance.