Re: Recursive Queries

From: Edward Macnaghten <eddy(at)edlsystems(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Recursive Queries
Date: 2020-04-16 13:45:53
Message-ID: fa3c65cc-4547-9131-6e41-de027664567e@edlsystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Stephens 2020-04-16 14:08:09 possibilities for SQL optimization
Previous Message Olivier Gautherot 2020-04-16 13:42:44 Re: Recursive Queries