select hour(a.created) as hour, count(a.created) as cnt from log a left outer join user b on (a.username = b.token) where b.role = 'USER' and a.created >= '2022-05-28' group by hour order by hour asc;