These queries worked perfectly. Thanks again!
Just a quick question
Lets say that I added another column name: record_id
In this column I could have records such as
Sometimes the records will be duplicate.
However, I want the count to ignore the duplicate records of that column.
So I'm thinking its something like this but unsure of the syntax:
WHERE `date` >= CURRENT_DATE - INTERVAL DAYOFMONTH(CURRENT_DATE)-1 DAY
- INTERVAL 1 MONTH
AND `date` < CURRENT_DATE - INTERVAL DAYOFMONTH(CURRENT_DATE)-1 DAY
AND NOT 'record_id' = duplicate?