Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIPyt-0007OH-SF for pgsql-sql@arkaria.postgresql.org; Tue, 24 Aug 2021 06:32:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mIPys-00029q-Ig for pgsql-sql@arkaria.postgresql.org; Tue, 24 Aug 2021 06:32:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIPys-00029i-Al for pgsql-sql@lists.postgresql.org; Tue, 24 Aug 2021 06:32:18 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIPyp-0005O4-JW for pgsql-sql@lists.postgresql.org; Tue, 24 Aug 2021 06:32:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MR4Oci2diAyUSJWjwYeRK/1HD71V0aQMGIS7C/Zlau8=; b=crxmj7RadIEYWQ1eikR6E8ADS5 BQpfS5TFZZgeHjx4cmpzmRzHUO2a0yPv/vz/qx2i1DCAqh/TqhYHSAndaypO9QAlxsGKxVrDgtChs V8KZYDMUHV2UAwMqZzFYb52k+aZxrq5S0AhkrqPoFmE/qjbZjCZ4vuYpgavmzY9z3/Ws=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1mIPym-0003wT-JB; Tue, 24 Aug 2021 08:32:12 +0200 Date: Tue, 24 Aug 2021 08:32:12 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: aditya desai Cc: pgsql-sql Subject: Re: Partition by outer join Message-ID: <20210824063212.GA8911@depesz.com> Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Aug 23, 2021 at 09:22:47PM +0530, aditya desai wrote: > While trying to migrate Oracle to Postgres wera stuck with PARTITION BY > OUTER JOIN. Can someone help rewriting or helping with Postgres > equivalent of below query? Thanks in advance. It would make MUCH more sense to show us data and expected output. Why do you assume Pg dbas know and understand intricacies of Oracle? depesz