SQL выберите данные на прошлой неделе
select id from tbname
where date between date_sub(now(),INTERVAL 1 WEEK) and now();
Pro___coder$
select id from tbname
where date between date_sub(now(),INTERVAL 1 WEEK) and now();
select id from tbname
where date between date_sub(now(),INTERVAL 1 WEEK) and now();
select min(date), max(date)
from calendar
where week = datepart(week, getdate() - 7)
and year = datepart(year, getdate() - 7)