Answers for "how to get last week data in mysql"

SQL
2

sql select data from last week

select id from tbname

where date between date_sub(now(),INTERVAL 1 WEEK) and now();
Posted by: Guest on July-31-2020
1

sql select data from last week

select id from tbname
where date between date_sub(now(),INTERVAL 1 WEEK) and now();
Posted by: Guest on April-07-2020
0

how to get data between a last week in mysql

SELECT id FROM tbl
WHERE date >= curdate() - INTERVAL DAYOFWEEK(curdate())+6 DAY
AND date < curdate() - INTERVAL DAYOFWEEK(curdate())-1 DAY
Posted by: Guest on May-25-2021

Code answers related to "how to get last week data in mysql"

Code answers related to "SQL"

Browse Popular Code Answers by Language