Re: Newbie: Help with count

2002-04-27 Thread George Chelidze
you can use: select messagestate, count(*) from table where uid=1 group by messagestate; for uid=1, if you want to do the same for all users with one query you can use: select uid, messagestate, count(*) from table group by uid, messagestate; Regards, Ben Holness wrote: > Hi all, > > I hav

Newbie: Help with count

2002-04-27 Thread Ben Holness
Hi all, I have a table that has data that looks something like this (fixed font on): UserID MessageID MessageState 1 1 PENDING 1 2 PENDING 2 3 FAILED 3 4 DELIVERED 2