You need DATE_ADD/DATE_SUB
:
AND v.date > (DATE_SUB(CURDATE(), INTERVAL 2 MONTH))
AND v.date < (DATE_SUB(CURDATE(), INTERVAL 1 MONTH))
should work.
More Related Contents:
- MySQL Query GROUP BY day / month / year
- Error in MySQL when setting default value for DATE or DATETIME
- Difference between two dates in MySQL
- How to select date from datetime column?
- mysql: get record count between two date-time
- How to cast DATETIME as a DATE in mysql?
- MySQL – select data from database between two dates
- How to compare timestamp dates with date-only parameter in MySQL?
- How to convert a string to date in MySQL?
- Converting a date in MySQL from string field
- MySQL: Select All Dates In a Range Even If No Records Present
- Mysql: Select all data between two dates
- MySQL SELECT WHERE datetime matches day (and not necessarily time)
- MySQL Query – Records between Today and Last 30 Days
- MySQL Query to select data from last week?
- MySQL convert date string to Unix timestamp
- CURRENT_DATE/CURDATE() not working as default DATE value
- How to get difference between two dates in months using MySQL query?
- Select mysql query between date?
- SQL Query to show nearest date?
- How to subtract hours from a datetime in MySQL?
- Select data between a date/time range
- Date in a URL dd/mm/yyyy
- Select all months within given date span, including the ones with 0 values
- Update date + one year in mysql
- mysql date comparison with date_format
- how to partition a table by datetime column?
- MySQL cumulative sum grouped by date
- MySQL select all rows from last month until (now() – 1 month), for comparative purposes
- MySQL – How to parse a string value to DATETIME format inside an INSERT statement?