Re: Avarage monthly import

2003-12-09 Thread getting_out
Andrew Braithwaite wrote: Are you using MySQL? yes of course :) OK, if you are then first simplify your query: group by 1 thanks, I didn't know it. Then add the AVG column which will work ok with the "group by" : select date_format(dt_imp,'%Y/%m') as date, SUM(imp),

RE: Avarage monthly import

2003-12-08 Thread Andrew Braithwaite
Are you using MySQL? OK, if you are then first simplify your query: select date_format(dt_imp,'%Y/%m') as date, SUM(imp) from sp group by 1 order by 1 Then add the AVG column which will work ok with the "group by" : select date_format(dt_imp,'%Y/%