views:

59

answers:

1

Hello,

the table looks like this:

tag | entryID
----+---------
foo | 1
foo | 2
bar | 3

And now i want to get all tags with its usage:

foo | 2
bar | 1

How can I do this?

Thank you

+3  A: 
select tag, count(*)
from MyTable
group by tag
RedFilter
okay, i shouldn't have skipped the grouping-part in the tutorial..thank you
jake