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, 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 group by last_name;
...such that I could get this:
LnameCnt last_name ------------------ ------------------------ 10 Connor 255 Jones 2 Puttinger
Any ideas?
TIA, tony
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]