Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
SQL
SELECT 'AverageCost' AS Cost_Sorted_By_Production_Days,
[0], [1], [2], [3], [4]
FROM
(SELECT DaysToManufacture, StandardCost
    FROM Production.Product) AS SourceTable
PIVOT
(
AVG(StandardCost)
FOR DaysToManufacture IN ([0], [1], [2], [3], [4])
) AS PivotTable; 

how to add mutiple aggregate field in this query?
Posted
Updated 28-Jul-14 0:53am
v2
Comments
Manoj Kumar Choubey 28-Jul-14 7:06am    
what do yu want exact result can you eleborate ?
Maciej Los 28-Jul-14 7:21am    
Not sure what you mean by "add multiple aggregate field in this query"?

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900