Received: from br1.brwholesale.com (br1.brwholesale.com [216.47.250.2]) by postgresql.org (Postfix) with ESMTP id 6435747587E for ; Tue, 26 Feb 2002 10:10:22 -0500 (EST) Received: from hp850.brwholesale.com (ws12.brwholesale.com [10.4.13.12]) by br1.brwholesale.com (Postfix) with ESMTP id A32C85619 for ; Tue, 26 Feb 2002 10:10:12 -0500 (EST) Message-Id: <5.1.0.14.2.20020226095955.00b17f10@imap.brwholesale.com> X-Sender: mhagerty@imap.brwholesale.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 26 Feb 2002 10:10:12 -0500 To: pgsql-sql@postgresql.org From: Matthew Hagerty Subject: Removing duplicates Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Archive-Number: 200202/395 X-Sequence-Number: 6817 Greetings, I have a customer database (name, address1, address2, city, state, zip) and I need a query (or two) that will give me a mailing list with the least amount of duplicates possible. I know that precise matching is not possible, i.e. "P.O. Box 123" will never match "PO Box 123" without some data massaging, but if I can isolate even 50% of any duplicates, that would help greatly. Also, any suggestions on which parameters to check the duplicates for? My first thoughts were to make sure there were no two addresses the same in the same zip code. Any insight (or examples) would be greatly appreciated. Thank you, Matthew