select
DATENAME(MONTH,LIFTINGDATE) as [Month],
sum(liftingbirds)[LiftingBirds],
round(sum(totalweight),0)[Tot.Weight],
round(sum(totalamount),0)[Tot.Amount],
round(sum(totalweight)/sum(liftingbirds),2)[Avg.Weight],
Round(Sum(Totalamount)/Sum(totalweight),2)[Avg.Rate]
from k_LiftingEntryRecords
where (liftingdate BETWEEN '2013-04-01 00:00.000' AND getdate())
group by DATENAME(MONTH,LIFTINGDATE) order by DATENAME(MONTH,LIFTINGDATE)
如何订购。我哪里出错了。o / p就像六月,四月,八月一样来。期望的手术是 4 月 6 月 7 月