Re: finding firstname + lastname groups

From: "blackwater dev" <blackwaterdev(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: finding firstname + lastname groups
Date: 2008-06-20 00:34:33
Message-ID: 34a9824e0806191734m99e265en454eb97a293d7751@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Great, thanks!

On Thu, Jun 19, 2008 at 5:14 PM, Sam Mason <sam(at)samason(dot)me(dot)uk> wrote:

> On Thu, Jun 19, 2008 at 03:38:28PM -0400, blackwater dev wrote:
> > The problem is name is not one column but made up of firstname,
> > lastname...how do I do this?
>
> I'd probably do something like:
>
> SELECT firstname, lastname, COUNT(*)
> FROM people
> GROUP BY firstname, lastname
> HAVING COUNT(*) > 1;
>
>
> Sam
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2008-06-20 00:35:03 Re: Importing undelimited files (Flat Files or Fixed-Length records)
Previous Message Gregory Williamson 2008-06-19 23:58:04 Re: Importing undelimited files (Flat Files or Fixed-Length records)