📜  如何在mysql代码示例中获取上周之间的数据

📅  最后修改于: 2022-03-11 15:05:05.289000             🧑  作者: Mango

代码示例1
SELECT id FROM tbl
WHERE date >= curdate() - INTERVAL DAYOFWEEK(curdate())+6 DAY
AND date < curdate() - INTERVAL DAYOFWEEK(curdate())-1 DAY