Re: SUM() the results of a COUNT()

2004-02-20 Thread Peter Brawley
>But how would i get something like this? >+++ >| A | B | >+++ >| 5 | 10 | >+++ >Where A = the number of unique UID's (the number of rows from table 2) >and B = the SUM of C (derived from >"SELECT count(*) as C from table GROUP BY uid") SELECT SU

Re: SUM() the results of a COUNT()

2004-02-20 Thread David Scott
That is SPOT on, takes 2seconds to process but thats still better than 5 :) -- Dave - Original Message - From: "Michael Stassen" <[EMAIL PROTECTED]> To: "David Scott" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, February 20, 2004 5:30

Re: SUM() the results of a COUNT()

2004-02-20 Thread Michael Stassen
David Scott wrote: Hiya peeps... If i have a table like this: +++ | id | uid| +++ | 1 | 26 | | 2 | 26 | | 3 | 267| | 4 | 267| | 5 | 269| | 6 | 269| | 7 | 271| | 8 | 271| | 9 | 271| | 10 | 424| +++ I could do

SUM() the results of a COUNT()

2004-02-20 Thread David Scott
Hiya peeps... If i have a table like this: +++ | id | uid| +++ | 1 | 26 | | 2 | 26 | | 3 | 267| | 4 | 267| | 5 | 269| | 6 | 269| | 7 | 271| | 8 | 271| | 9 | 271| | 10 | 424| +++ I could do this to get the cou