Subject RE: [firebird-support] Average Average!
Author Steffen Heil
select branch, clerk, avg( value ) group by branch, clerk

If you need something else, please explain it more in detail.


-----Original Message-----
From: gorepj [mailto:peter@...]
Sent: Wednesday, April 21, 2004 8:16 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Average Average!

Hi all,
here's my table

MyTable

Branch Clerk transaction item value
1 1 1 1 1.10
1 1 1 2 3.25
1 1 2 1 0.95
2 1 1 1 1.10
2 1 1 2 0.50
2 1 2 1 1.10
2 2 3 1 0.95
2 2 3 2 0.55
2 3 4 1 9.99
etc...
What I need to get is average transaction value by branch by clerk from a
single query. So I need to sum values for each transaction by clerk by
branch then average those summed values so I have what I need, average
transaction value by clerk by branch. I've trie but no luck so far. Any
ideas?
Regards
Peter Gore





Yahoo! Groups Links