SQL 语句
一、统计今天(时间戳)
SELECT
COUNT( mob_id ) AS count
FROM
shipping_mob
WHERE
del_flag = 0
AND FROM_UNIXTIME( mob_time / 1000, '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d')
二、统计3天内(时间戳)
SELECT
COUNT( mob_id )
FROM
shipping_mob
WHERE
STATUS = 0
AND del_flag = 0
AND FROM_UNIXTIME( mob_time / 1000, '%Y-%m-%d %H:%i:%s' ) >= now() - INTERVAL 3 DAY;