Getting the Sum in Query

lerwane

Registered User.
Local time
Today, 05:32
Joined
Jan 9, 2004
Messages
22
i have a query w/ 2 fields(by_year, by_months), and i want to get the sum
all entries in each field of every user.

select query.by_year, query.by_mos where userID = ....

is it possible to make it in a query design
automatically? or should i make a function for it?

please help. thanks
 
Something like this should work:

SELECT userID, Sum(by_year) AS SumYear, Sum(by_mos) AS SumMos
FROM TableName
GROUP BY userID

That's off the top of my head, so may need tweaking.
 
:)

i was able to fix it out, using function directly in the report.

Thanks then. :)
 

Users who are viewing this thread

Back
Top Bottom