On Fri, 29 Aug 2003 12:42:03 -0700
Grant Cooper <[EMAIL PROTECTED]> wrote:

> I'm trying to get a query to work by listing all the people in a row with
> the same last name and first name.
> 
> key, fname, lname
> 1 ,John, Smith
> 4, John, Smith
> 5, Cody,Edwards
> 2, Cody, Edwards

SELECT fname,lname, COUNT(*) as cnt FROM table GROUP BY CONCAT(fname,lname);

---
WBR,
Antony Dovgal aka tony2001
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to