select date_trunc('h',now()) -interval '24 h';
WHERE a.req_time BETWEEN (date_trunc('h',now()) -interval '24 h') AND date_trunc('h',now())
参考:
https://www.cnblogs.com/jixiaoleng4/p/10599442.html