3 months before today:
select * from table where timestamp >= now()-interval 3 month;
Start with first of month:
select * from table where timestamp >= last_day(now()) + interval 1 day - interval 3 month;
More Related Contents:
- SELECTING with multiple WHERE conditions on same column
- grant remote access of MySQL database from any IP address
- Should MySQL have its timezone set to UTC?
- JDBC batch insert performance
- SQL – Update multiple records in one query
- How to find gaps in sequential numbering in mysql?
- Can I create view with parameter in MySQL?
- MySQL: Invalid use of group function
- Scaling solutions for MySQL (Replication, Clustering)
- MySQL show status – active or total connections?
- MySQL dynamic pivot table
- mysql check if numbers are in a comma separated list
- mySQL DataSource on Visual Studio 2012
- MySQL update case help
- Dropping Unique constraint from MySQL table
- limiting the rows to where the sum a column equals a certain value in MySQL
- MySql Transpose Row into Column and Column into Row [duplicate]
- Dump a mysql database to a plaintext (CSV) backup from the command line
- Mysql select distinct
- Mysql permission errors with ‘load data’
- How to select column names dynamically in mySQL
- How would I use ON DUPLICATE KEY UPDATE in my CodeIgniter model?
- MySQL concatenating all columns
- Transpose rows into columns in MySQL
- MySQL Join Where Not Exists
- MYSQL declaring variables
- get a recursive parent list
- Trouble with GROUP_CONCAT and Longtext in MySQL
- How to pass a variable to a IN clause?
- How can I make a table in MySQL called “order”?