我需要从当月计算上个月的最后一个星期四
set @ldom = dayofweek(last_day(curdate()));
select
case
when @ldom = 7 then last_day(curdate()) - interval 1 day
when @ldom = 6 then last_day(curdate())
when @ldom = 5 then last_day(curdate()) - interval 6 day
when @ldom = 4 then last_day(curdate()) - interval 5 day
when @ldom = 3 then last_day(curdate()) - interval 4 day
when @ldom = 2 then last_day(curdate()) - interval 3 day
else last_day(curdate()) - interval 6 day
end as last_friday
它给了我本月的最后一个星期五,但我需要计算上个月的最后一个星期五