mysql怎么查询本周周一到当前时间的日期,比如今天周三,我只需要拿到本周的周一20220829,周二的20220830,和今天的20220831,不需要拿到一整周的,请问怎么查呢,在网上找到的都是查询一整周的,
SELECT @a :=@a + 1 as `index`, DATE(ADDDATE(CURRENT_DATE, INTERVAL @a DAY)) AS `date`
FROM mysql.help_topic,(SELECT @a := 0) temp
WHERE @a < 6 - WEEKDAY(CURRENT_DATE)
UNION
SELECT @s :=@s - 1 as `index`, DATE(DATE_SUB(CURRENT_DATE, INTERVAL @s DAY)) AS `date`
FROM mysql.help_topic,(SELECT @s := WEEKDAY(CURRENT_DATE) + 1) temp
WHERE @s > 0
ORDER BY `date`
感谢帮忙,万分感谢