On 16/04/2020 14:36, Edward Macnaghten wrote: > On 16/04/2020 09:35, Alex Magnum wrote: >> Hi, >> I have a simple table with singup timestamps >> >> What I would like to do is to create a table as shown below that >> displays the counts per our for the past n dates. SELECT hour, SUM(CASE(WHEN date = date THEN 1 ELSE 0 END)), ...., ... WHERE whatever GROUP BY hour Could be your friend