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 1sTkYd-0022Qj-1H for pgsql-general@arkaria.postgresql.org; Tue, 16 Jul 2024 15:57:39 +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 1sTkYa-0029me-Tc for pgsql-general@arkaria.postgresql.org; Tue, 16 Jul 2024 15:57:36 +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 1sTkYa-0029mW-He for pgsql-general@lists.postgresql.org; Tue, 16 Jul 2024 15:57:36 +0000 Received: from mail-oa1-x31.google.com ([2001:4860:4864:20::31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sTkYX-002Mi6-Ur for pgsql-general@postgresql.org; Tue, 16 Jul 2024 15:57:35 +0000 Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-25e150603a6so2855199fac.3 for ; Tue, 16 Jul 2024 08:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721145453; x=1721750253; darn=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=j1gA5YQWnrn49VO2o9NyEYERzN/oslELCU+t+2mzSZw=; b=YouMaz/lY74XUcAlllR8EalXANOufHGvvs58vsDBBdInn98Ft4Z6dIoOIR3rloL4X3 hXR32+eEoybRCve4S6jEOGd8k8uLiCnnWfJatzCe0pHZcmdZll/gAvHNBU9xtoWFdJ69 a2Z9Au3o/cpzrnRJRFrcH+URheAkwKqCP7ifrTXVjRx80nNn1jBr67cVqhm5pzxgyTA3 bpp/tASvFZpnR2DiRmwd9OzsSjwForz3pp+65wLtsABJMel2nlLbBoqOH2t9AKGFn9PZ DlNMVBCF6a0//RYR7JObeYMPSpr5SDuZKPuXp6UhIlbSRTJwlIc70noalFZWzqD0q9dP fHRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721145453; x=1721750253; 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=j1gA5YQWnrn49VO2o9NyEYERzN/oslELCU+t+2mzSZw=; b=Fi8RMaMS24GM+QCYQcwhY3+J5jXPFUT6c+kZWxdhqjLXvbJ+ydxP+PNmBEWJPgMofg DhZ10EWnthJnRg/kDYkyeTuX97GqaMGdWt2sI5vNQEGhRkh6Mxtuki7ASfbAk9FaWRTe mhl0I/GQ36MaSZhC3i7Eyvufoh/2OFvEPWWDGfDA9Ouc3tmMObnUsIIaVgLaCMWZHE/H +7XvdWK3VOb6xsr0pLsNqi5xLqLC8LttbcPno9Z8kEkQ/iKUGq1OrbPIZwZN33xWEdBt hrKFHBSxB/YIZX4AMhXO3r68wEd8Dt4fWJyA6Ovh1lrpabApWd48Q7DQRVb4avWUsYn1 sJng== X-Gm-Message-State: AOJu0YzskG8na5exmB59GYE5CR8wyfnxMUxPiO27PtsKMPZJ3cmciBPw hvv5MJZoZun+EEf7nTudkGiyVJRo9sOhLrm1Y32+SKBfMAMkAAg9TIBphsetayQMd5TBg39ked1 rSBvdGsS4i9XIsa5A+IbL1foQwFDwSIy+ X-Google-Smtp-Source: AGHT+IG1TsawYIQstbU4P+ZlJbM7Qv1ZBV7JIXc16JJRXKx19fK9gtcboskmaxXQ3vvI1p+PbrWEHX6xC4LtA2ZGhqs= X-Received: by 2002:a05:6870:7020:b0:25e:1be2:a163 with SMTP id 586e51a60fabf-260bdfbed0amr1995164fac.47.1721145452913; Tue, 16 Jul 2024 08:57:32 -0700 (PDT) MIME-Version: 1.0 References: <1fd63ee5-a8a3-492e-a38d-82ff21da26b8@aklaver.com> <82ff4dac-d8b0-4b8b-aa88-e5d74f624a4d@aklaver.com> <5b8cb137-121d-40c6-b907-7d59e53b5e13@aklaver.com> <145933da-bfe0-4755-a99d-e7bde94d7416@aklaver.com> In-Reply-To: <145933da-bfe0-4755-a99d-e7bde94d7416@aklaver.com> From: Anthony Apollis Date: Tue, 16 Jul 2024 17:57:20 +0200 Message-ID: Subject: Re: Code does Not Read in FY 2025 Data To: Adrian Klaver Cc: pgsql-general Content-Type: multipart/alternative; boundary="00000000000053ea66061d5f6738" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000053ea66061d5f6738 Content-Type: text/plain; charset="UTF-8" That very same code is picking up all the data in the Original Table. Which only contains past data. On Tue, 16 Jul 2024 at 17:39, Adrian Klaver wrote: > On 7/16/24 08:28, Anthony Apollis wrote: > > Only data up until 2024 is picked up in Revised table, whic contains > > 2025 data. THe Maxdate calculation seems to be the problem. > > This: > > 'Only data up until 2024 is picked up in Revised table, whic contains > 2025 data. .." > > is consistent with: > > MaxDate AS ( > SELECT > MAX("Date") AS "MaxDate" > FROM > FullWeeks > WHERE > "Date" < CURRENT_DATE > ) > > I don't see how you expect to fetch data from the future when you limit > the data to the past. > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > > --00000000000053ea66061d5f6738 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
That very same code is picking up all the data in the Orig= inal Table. Which only contains past data.

On Tue, 16 Jul 2024 at 17:39, Adr= ian Klaver <adrian.klaver@a= klaver.com> wrote:
On 7/16/24 08:28, Anthony Apollis wrote:
> Only data up until=C2=A02024 is picked up in Revised table, whic conta= ins
> 2025 data. THe Maxdate calculation seems to be the problem.

This:

'Only data up until 2024 is picked up in Revised table, whic contains <= br> 2025 data. .."

is consistent with:

MaxDate AS (
=C2=A0 =C2=A0 =C2=A0SELECT
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0MAX("Date") AS "MaxDate&qu= ot;
=C2=A0 =C2=A0 =C2=A0FROM
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FullWeeks
=C2=A0 =C2=A0 =C2=A0WHERE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"Date" < CURRENT_DATE
)

I don't see how you expect to fetch data from the future when you limit=
the data to the past.


--
Adrian Klaver
adrian.klave= r@aklaver.com

--00000000000053ea66061d5f6738--