public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: Anthony Apollis <[email protected]>
Cc: [email protected]
Subject: Re: Calendar Table
Date: Wed, 10 Jul 2024 08:48:34 -0700
Message-ID: <CAKFQuwbf7g4iJ6ytqosXKuQzG7g3JCfU9yQLhGHAPssdK1NTwQ@mail.gmail.com> (raw)
In-Reply-To: <CAJyMCYJAKCB+RTKxddG=hAbyFLQvTF2BuHhfwWvmhb4MTTB3pA@mail.gmail.com>
References: <CAJyMCYJAKCB+RTKxddG=hAbyFLQvTF2BuHhfwWvmhb4MTTB3pA@mail.gmail.com>
On Wed, Jul 10, 2024 at 8:38 AM Anthony Apollis <[email protected]>
wrote:
> -- Query to get the year and number of days
>
> SELECT
> EXTRACT(YEAR FROM "Date") AS "Year",
> COUNT(*) AS "NumberOfDays"
> FROM "Prod"."IMETA_Calendar"
> GROUP BY EXTRACT(YEAR FROM "Date")
> ORDER BY EXTRACT(YEAR FROM "Date");
>
Seems odd to be using extract year from date when you have an FY column.
> I get some output: [image: f6]
>
Nothing you've shown produces that output. I would suggest you simplify
and make self-contained a script-based test case, ideally using psql, that
you can run and share, asking questions regarding the main piece here which
is creating a table, populating it with data, and querying it. Once you
get that part solid you can figure out how to incorporate your spreadsheets
- which is mostly outside the realm of on-topic help for a
PostgreSQL mailing list.
David J.
>
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Calendar Table
In-Reply-To: <CAKFQuwbf7g4iJ6ytqosXKuQzG7g3JCfU9yQLhGHAPssdK1NTwQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox