当数据库的时间是:2023-02-09 17:18:00 timestamp类型
SELECT
DATE(h.At ) AS DATE,
COUNT(1) AS getcount
FROM
test h
WHERE
DATE(h.At) >='2023-02-01' and DATE(h.At) <='2023-02-10'
GROUP BY
DATE(h.At )
当数据库的时间是:1605410116304 int8类型
SELECT
to_timestamp(h.At/1000 ) :: DATE AS dt,
COUNT(1) AS getcount,
round(COUNT(1)*100::numeric/5000 ::numeric,2)AS getrate
FROM
test h
WHERE
h.at>='1675180800000'
GROUP BY
to_timestamp(h.At/1000 ) :: DATE ORDER BY dt