Hi-

I am trying to write a sql query that will select, group and tally records
returned.

select name, count from stats order by name;

foo    2
foo    4
foo    6
foo1    5
foo2    10
foo3    15

I would like the output to be like this:

foo    12
foo1    30

How do I accomplish this in mysql?

Thanks in advance,
Max





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to