| From: | Alex Magnum <magnum11200(at)gmail(dot)com> |
|---|---|
| To: | Edward Macnaghten <eddy(at)edlsystems(dot)com> |
| Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Recursive Queries |
| Date: | 2020-04-16 18:06:20 |
| Message-ID: | CA+cR4zd1AGhbr+9t+3gKwabTkmozUGczhGKOM4dSP0MKLzEQqQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
thanks for the suggestion. tablefunc extension might be the easiest one
On Thu, Apr 16, 2020 at 9:46 PM Edward Macnaghten <eddy(at)edlsystems(dot)com>
wrote:
> 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
>
>
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chris Stephens | 2020-04-16 18:28:33 | Re: possibilities for SQL optimization |
| Previous Message | Adrian Klaver | 2020-04-16 17:36:22 | Re: timestamp and timestamptz |