From: Matthew Hagerty <matthew@venux.net>
To: John M. Flinchbaugh <glynis@butterfly.hjsoft.com>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Query for duplicates.
Date: Thu, 05 Aug 1999 16:45:19 -0400
Message-ID: <4.1.19990805164505.009d2830@mail.venux.net> (raw)
In-Reply-To: <Pine.LNX.4.10.9908051618140.13066-100000@butterfly.hjsoft. com>
References: <4.1.19990805123926.009fcbf0@mail.venux.net>
Thanks, that works great!
Matthew
At 04:19 PM 8/5/99 -0400, John M. Flinchbaugh wrote:
>On Thu, 5 Aug 1999, Matthew Hagerty wrote:
>> I found myself in an unusual situation today. I need a query to display
>> only customers with addresses that appear more than once. Usually I am
>> having to get unique addresses, etc. at which I have become very good, but
>> this one is giving me a run for.
>> What I need is something like this:
>> create table customer (
>> custdate date,
>> name varchar(30),
>> address varchar(30),
>> city varchar(20),
>> state varchar(2),
>> zip varchar(10));
>> select address,city,state,zip from customer
>> where custdate<='05-30-1999'
>> group by address having count(address)>1;
>
>select address,city,state,zip from customer
>where custdate<='05-30-1999'
>group by address,city,state,zip
>having count(*)>1;
>
>____________________}John Flinchbaugh{______________________
>| -> glynis@hjsoft.com <- john@cs.millersv.edu |
>| glynis@netrax.net http://www.hjsoft.com/~glynis/ |
>~~Powered by Linux: Reboots are for hardware upgrades only~~
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: matthew@venux.net, glynis@butterfly.hjsoft.com
Subject: Re: [SQL] Query for duplicates.
In-Reply-To: <4.1.19990805164505.009d2830@mail.venux.net>
References: <4.1.19990805123926.009fcbf0@mail.venux.net> <4.1.19990805164505.009d2830@mail.venux.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox