Re: Getting distinct counts (solved)

2004-04-29 Thread Tbird67ForSale
...blind as a bat, it was right in front of me in basic SQL . Thank you kindly. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Getting distinct counts

2004-04-29 Thread Steve Davies
just drop the 'distinct' - should give you what you want mysql> select count(last_name) as "LnameCnt", last_name from table_ABC group by last_name; hth steve [EMAIL PROTECTED] wrote: I am using MySQL 4.0.18 and trying to generate a list of the number of row in a table with the same last name, b

Getting distinct counts

2004-04-29 Thread Tbird67ForSale
I am using MySQL 4.0.18 and trying to generate a list of the number of row in a table with the same last name, by last name. Is there any way to do this without creating another table? Here is what I am trying: mysql> select count(distinct last_name) as "LnameCnt", last_name from table_ABC gro