Answers for "get last week date range in sql"

SQL
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

date sql get the last week count

select * from dt_table where  `date` >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)
Posted by: Guest on October-26-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language