sql server 2008 - Getting an average in SQL -
I basically try to get the average of one column, so i have the amount of column (aerosation 12) The number of rows is divided into the number (the number is divided by the brandDebabAbbroR). I have the code below, but it does not seem to work.
Announcement @G table (Genproduct varchar (50) primary key) Enter'g 'value (' 44505080000310 '), (' 44505080000320 ') Branddisc Abb Select the rear, as 12 [month], the erosion in the form of aerosation 12, the average (aerosone 12) to the aerosonadata 2, where in genproduct (Brandedus abbrator, select a Zneprodent by Aerosynon 12).
aeroson 12 by group : 12 days Select [month] as, / * Aerosystem 12 as aerosision, * / aerosian data from average (Aerosion 12) 2 where in genproduct (GRProdint @ g Unen)) When you group by errosion12 , you will have the same value for all records so that the average waste. Or, if you need all individual slash 12 values The average one windowing function within the a D group uses: Select [month] as 12 days, Aeroson 12 to erosion data from aerosian data 2 In GenProdIdent as AVG (Aerocon12) Over (Participated by BrandDisk Abbror) (select @GenProdIdent @)
Comments
Post a Comment