Skip site navigation (1) Skip section navigation (2)

Re: finding firstname + lastname groups

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: finding firstname + lastname groups
Date: 2008-06-19 21:14:45
Message-ID: 20080619211445.GP2572@frubble.xen.chris-lamb.co.uk (view raw or flat)
Thread:
Lists: pgsql-general
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

In response to

Responses

pgsql-general by date

Next:From: Joshua D. DrakeDate: 2008-06-19 22:15:06
Subject: Re: Losing data
Previous:From: David WilsonDate: 2008-06-19 20:47:42
Subject: Re: renumber table

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group