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 1soj8j-00DNXv-Vc for pgsql-general@arkaria.postgresql.org; Thu, 12 Sep 2024 12:41:38 +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 1soj8j-0079FD-M6 for pgsql-general@arkaria.postgresql.org; Thu, 12 Sep 2024 12:41:37 +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 1soj8j-0079F4-Br for pgsql-general@lists.postgresql.org; Thu, 12 Sep 2024 12:41:37 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1soj8g-000nus-M7 for pgsql-general@postgresql.org; Thu, 12 Sep 2024 12:41:36 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id E98392A14D6 for ; Thu, 12 Sep 2024 05:41:32 -0700 (PDT) Date: Thu, 12 Sep 2024 05:41:32 -0700 (PDT) From: Rich Shepard To: pgsql-general@postgresql.org Subject: Re: Removing duplicate rows in table In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 12 Sep 2024, Muhammad Usman Khan wrote: > You can try the following CTE which removes all the identical rows and only > leave single row Thank you, Muhammed. Rich