Use for a date three days ago:
WHERE t.date >= DATE_ADD(CURDATE(), INTERVAL -3 DAY);
Check the DATE_ADD documentation.
Or you can use:
WHERE t.date >= ( CURDATE() - INTERVAL 3 DAY )
More Related Contents:
- Recreating a query using INNER JOIN? [duplicate]
- Create a Cumulative Sum Column in MySQL
- MySQL – Get row number on select
- Group by clause in mySQL and postgreSQL, why the error in postgreSQL?
- Equivalent of explode() to work with strings in MySQL
- How can I tell when a MySQL table was last updated?
- mysql select dynamic row values as column names, another column as value
- Operand Should Contain 1 Column – MySQL NOT IN
- MySQL DELETE FROM with subquery as condition
- SQL – IF EXISTS UPDATE ELSE INSERT INTO
- SELECT / GROUP BY – segments of time (10 seconds, 30 seconds, etc)
- Is it possible to query a tree structure table in MySQL in a single query, to any depth?
- Simple Random Samples from a Sql database
- MySQL: Error Code: 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB
- What’s the difference between comma separated joins and join on syntax in MySQL? [duplicate]
- Determine Rank based on Multiple Columns in MySQL
- Checking multiple columns for one value
- What is better in MYSQL count(*) or count(1)?
- Delete query not working in mysql
- Best practices for SQL varchar column length [closed]
- How to get current date & time in MySQL?
- Laravel join with 3 Tables
- SELECT query return 1 row from each group
- MySql Single Table, Select last 7 days and include empty rows
- mysql SQL: specific item to be first and then to sort the rest of the items
- How to regex in a MySQL query
- MySQL Group By Hours
- RMySQL dbWriteTable with field.types
- Syntax error on MERGE statement
- ORDER BY alphabet first then follow by number