You can just use function sum to get what you want. On Jan 16, 2008 6:23 AM, Imran <[EMAIL PROTECTED]> wrote:
> Hi: > > > > I have a table that I need help to summarize the data. I need to be able > to > create one row of data for custno + prodno + period + weekno combination > summarized by Invtot. > > > > Any help will be greatly appreciated. > > > > Best regards > > > > > > > > I am attaching the relevant info below: > > > > Sales Table > > > > CustNo > > ProdNo > > Period > > WeekNo > > InvTot > > InvDate > > > > Data > > --------- > > CustNo ProdNo Period WeekNo InvTot InvDate > > 0001 0500 2007-01 01 111.11 2007/01/01 > > 0001 0500 2007-01 01 112.11 2007/01/01 > > 0001 0500 2007-01 01 113.11 2007/01/02 > > 0001 0500 2007-02 01 114.11 2007/02/02 > > 0001 0500 2007-02 01 115.11 2007/02/02 > > 0001 0500 2007-02 01 116.11 2007/02/02 > > 0001 0500 2007-04 21 117.11 2007/04/08 > > 0001 0500 2007-04 21 118.11 2007/04/08 > > 0001 0500 2007-04 21 119.11 2007/04/08 > > 0001 0501 2007-05 25 111.11 2007/05/01 > > 0001 0501 2007-05 25 112.11 2007/05/01 > > 0001 0501 2007-05 25 113.11 2007/05/02 > > 0001 0501 2007-05 25 114.11 2007/05/02 > > 0001 0501 2007-06 30 115.11 2007/06/02 > > 0001 0505 2007-06 30 116.11 2007/06/02 > > 0001 0505 2007-06 30 117.11 2007/06/08 > > 0001 0506 2007-06 30 118.11 2007/06/08 > > 0001 0507 2007-06 30 119.11 2007/06/08 > > -- I'm a mysql DBA in china. More about me just visit here: http://yueliangdao0608.cublog.cn