Subject RE: [firebird-support] COMPUTE
Author Alan McDonald
> All Alan
> I need resume the import by clients and AVG as sales average for
> Salesmans.

if the statement I offered is not what you want, then I suggest you write a
selectable stored procedure to tally up what you want.
Alan


> > > salesman clie import
> > > ----------- ----------- ---------------------
> > > 101 2101 1458.0000
> > > sum
> > > ---------------------
> > > 1458.0000
> > >
> > > salesman clie import
> > > ----------- ----------- ---------------------
> > > 101 2102 3978.0000
> > > sum
> > > ---------------------
> > > 3978.0000
> > >
> > > salesman clie import
> > > ----------- ----------- ---------------------
> > > 101 2108 150.0000
> > > sum
> > > ---------------------
> > > 150.0000
> > >
> > > salesman clie import
> > > ----------- ----------- ---------------------
> > > 101 2113 22500.0000
> > > sum
> > > ---------------------
> > > 22500.0000
> > >
> > > sum avg
> > > --------------------- ---------------------
> > > 28086.0000 7021.5000
> > >
> > >
> > > salesman clie import
> > > ----------- ----------- ---------------------
> > > 102 2106 1896.0000
> > > 102 2106 2130.0000
> > > sum
> > > ---------------------
> > > 4026.0000
> > >
> > > salesman clie import
> > > ----------- ----------- ---------------------
> > > 102 2114 15000.0000
> > > sum
> > > ---------------------
> > > 15000.0000
> > >
> > > salesman clie import
> > > ----------- ----------- ---------------------
> > > 102 2120 3750.0000
> > > sum
> > > ---------------------
> > > 3750.0000
> > >
> > > sum avg
> > > --------------------- ---------------------
> > > 22776.0000 5694.0000
> > >
> > > Best Regards...
> > > Yerena