Select postgresql within 1 hour range of current date
Maybe you need something like

SELECT MIN(clock)
FROM history
WHERE date_trunc('day', clock) = CURRENT_DATE
/* or WHERE clock &gt;= CURRENT_DATE */
GROUP BY date_trunc('hour', clock)


?