上一周

SELECT
    DATE_FORMAT(
        date_add(
            now(),
            INTERVAL - (8 + weekday(now())) DAY),
            '%Y-%m-%d 00:00:00'
        ),
        DATE_FORMAT(
            date_add(
                now(),
                INTERVAL - (1 + weekday(now())) DAY),
                '%Y-%m-%d 23:59:59'
            )

你可能感兴趣的:(上一周)