[thelist] Creating Reports: Where to put the logic?
Casey Crookston
caseyc at IntelliSoftmn.com
Wed Jun 21 11:31:32 CDT 2006
Ok, I'm creating a report which totals up sales by sales reps. To
simplify, we've got a query that looks like this (not really but for my
learning purposes this will do):
SELECT salesRep, salesAmount FROM sales
And returns this:
Billy Bob 45.00
Billy Bob 50.00
Sally Jane 79.00
Sally Jane 32.00
Billy Bob 5.00
Sally Jane 20.00
Sally Jane 10.00
I need the report to look like this:
Billy Bob 100.00
Sally Jane 141.00
I would really prefer to do the logic in the query, if that's possible.
I've been looking at the sum(column) function, but can't quit get it
working. Is it possible, and if so, what would the query look like?
Thanks!
Casey
More information about the thelist
mailing list