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 1r6CKx-00HYne-CL for pgsql-general@arkaria.postgresql.org; Thu, 23 Nov 2023 16:13:55 +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 1r6CKw-001zTj-16 for pgsql-general@arkaria.postgresql.org; Thu, 23 Nov 2023 16:13:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6CKu-001zTW-Ed for pgsql-general@lists.postgresql.org; Thu, 23 Nov 2023 16:13:53 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6CKn-0083zF-T2 for pgsql-general@lists.postgresql.org; Thu, 23 Nov 2023 16:13:51 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id CE1585C0200; Thu, 23 Nov 2023 11:13:44 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 23 Nov 2023 11:13:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1700756024; x=1700842424; bh=VPpwwmhu9HhTMu/3S5COvpKF/ypw65jjFgm 9m0oEWEo=; b=jCV/Csuv2WHSELd52LI6NqHYhcraF+CZKPdhqCbAs1RR7LP+XKh 7FncUIsa1K23VqeFJ01lj3ktHaYeTaje0vDsmQj+h6Q2eKZ6y7r+15Eii5ySaS/6 ZSEmf0WalZs11bmjfz2Uj6rWje8+Z5RPUOllVrBrK4kw/7c6h/pdHAqlkkJ39kfT XgA/VdGDuzkO/XV1uW49VjyMEGbWDpWJJrfPrlGEYZH2tcjnkjIZlZCpOJrVtPku v+Jno1sLggnNRAu0BDnlNd2w/dGijc2uJOPJVkM3OpyK8lEQkwpyuBllubwoOfZq 6xL2l/0iSKCk7tckxIHg2i19rNnmKNVIjQA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1700756024; x= 1700842424; bh=VPpwwmhu9HhTMu/3S5COvpKF/ypw65jjFgm9m0oEWEo=; b=F JyI30TbCqLzwlmdhtBCYNhsHmVshyEjSMSypTrBocueRNhPGePQ0fXrbaNxlp3pu FS90+bf8SgAqVrsExr5yYZthj7xPqmJ4IEl3ByUlV/kbvAOaQw/MNfuqeCO0fpww hfnV6phslleWaAtCPXOVajZLzwLuGNuIYfhV7Wx6jk49+ZOu0DIX4X6h0VxyRBFL kX9DLUgej+KDNr5k8les0u9PBF8pYM1nGqS1bOn57rsSn9FmNyJP6Jq9IPbkG5RP T5jNUSjJl2j8PhLtp0kt9YCxQmtxXWlEf86QK5vsvhuZHuv9z6YfgBWPA58evvBw ZKj66dtXep86c4EcSPp2A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehfedgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeffleegieefgfevudehtdfhkeeutdffjeevgeffgeej vedthefgudeiteefheejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Nov 2023 11:13:44 -0500 (EST) Message-ID: <6bee67fa-7742-4683-b20e-ad301f8ac14a@aklaver.com> Date: Thu, 23 Nov 2023 08:13:43 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Check Code Correction Current Period Prior Period Movement Content-Language: en-US To: Anthony Apollis , pgsql-general@lists.postgresql.org References: From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/23/23 06:02, Anthony Apollis wrote: > Please assist me? > I am trying to calculate >  Current Period  Prior Period  Movement > > from my data, the date columns are: > image.png > > Please check my code for any errors, code runs, i just want to make sure > it does what it's supposed to do. Since you have not specified '...what it's supposed to do' is there is really not much that can be said. Your best bet is to create some sample input data and expected output and then create a test that verifies that the input passes through the view statements and ends up as the expected output. -- Adrian Klaver adrian.klaver@aklaver.com