how do I group by by hour in postgresql with a “time” field? March 31, 2023 by Tarik use date_trunc: group by cdate, date_trunc('hour', ctime)