Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sRZZF-00GbVA-Is for pgsql-general@arkaria.postgresql.org; Wed, 10 Jul 2024 15:49:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sRZZD-006fbM-ET for pgsql-general@arkaria.postgresql.org; Wed, 10 Jul 2024 15:49:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sRZZD-006fbE-2e for pgsql-general@lists.postgresql.org; Wed, 10 Jul 2024 15:49:15 +0000 Received: from mail-oo1-xc2a.google.com ([2607:f8b0:4864:20::c2a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sRZZA-001OYZ-GV for pgsql-general@lists.postgresql.org; Wed, 10 Jul 2024 15:49:13 +0000 Received: by mail-oo1-xc2a.google.com with SMTP id 006d021491bc7-5c44ec4f2dbso3438160eaf.2 for ; Wed, 10 Jul 2024 08:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720626552; x=1721231352; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=n4oqsnevmq0rxiSFK7bQ/nVbvcl0ybEmBoHx9CeSQ7E=; b=F0+Gkc06PxWEPvl+ujEm8q3uDf9PFv+RI0BLdrUnw94H6sJHykhBhAo+Lm9ZqjJfYY b+PShXPzm3mXp00bXE9m4fbanMpngvOnwS/8pxKiKIZ7Xdpx4jFerOp67dz12TnMK19O GaKcNyVK1RVRU0mpZSb8G0XQW+vXMnGJkPN5X9Bj2TWG1CU+x72inf0D+2Lgnbf30BBw 8XGul489zjIcqbutA+8vAAI/iJ8jXCB53paVm4nr5rohGK/jU8xhvxxtxVRSVEVkC1wZ ph6qkJgy68iHrbrYV+q9pyDpKIvvdWU9+h/AeEEJqDKEAgtwH9FtthnyGgBLl1FU+dm5 DDVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720626552; x=1721231352; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=n4oqsnevmq0rxiSFK7bQ/nVbvcl0ybEmBoHx9CeSQ7E=; b=iy+2vc2aG0CW0fnZ5x2GU38XBZlGN7XUHvvwgFwDaobLX9LlC4YLo4zlAuMvmBGLZk zYXvY0oYjI7fd/iV4rFP8iXJTUod97Nw3himHj5xKdavCBGBCMt0KLla4m3eGn6E0zjv S9qRVb79KMlzK6ADTi4AHCeNYFfWlfIftQsb7xU70A+JO8F/nSMihqrkehoo8r2bDU9K ghU0o4CnvVnguo9djTg90jfNgW+GcPmMzr7FotbTIQ4k5qgFsJ1HBeOYrm01/qORCuY7 4a+qOKM+hDDtS1Vvr7gSLUPXizC+DBMBk72Y+GwAXnReO9QXa3DpDF6Izuctw9h6t/Db D4Jg== X-Gm-Message-State: AOJu0YzGsdi/DuLttYNzM1o0uPU9NYchjI/4VTVoYNzpGk7YBEMnpH23 oYh6isrTBy6v6Kra98kLHo8Gy8KpBaukS6TJN4KzLv9AHD18iLhax4z6jPuWPnFTHgBsQqA/eBz r3Rk8GUKdrtCKhd+uNZDj9jzQU+Q= X-Google-Smtp-Source: AGHT+IG5jBj5w48oosDvbIDDFN4WRiX+z1SYsfxevPcxSe2x7LVPZcDelx4G1P5iQeLlWPlQpY3vGy7FzbJ6ZI6ogZM= X-Received: by 2002:a05:6820:1a0d:b0:5c6:9320:53a3 with SMTP id 006d021491bc7-5c69320547dmr7502654eaf.4.1720626551635; Wed, 10 Jul 2024 08:49:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "David G. Johnston" Date: Wed, 10 Jul 2024 08:48:34 -0700 Message-ID: Subject: Re: Calendar Table To: Anthony Apollis Cc: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000066c4c5061ce696fd" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000066c4c5061ce696fd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jul 10, 2024 at 8:38=E2=80=AFAM Anthony Apollis 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. > --00000000000066c4c5061ce696fd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Jul 10, 2024 at 8:38=E2=80=AFAM Anthony Apollis &l= t;anthony.apollis@gmail.com> wrote:


Nothing you've shown produces that output.=C2=A0 I would suggest you s= implify and make self-contained a script-based test case, ideally using psq= l, that you can run and share, asking questions regarding the main piece he= re which is creating a table, populating it with data, and querying it.=C2= =A0 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 Po= stgreSQL=C2=A0mailing list.

--00000000000066c4c5061ce696fd--