What is the problem there? -- See the result how it calculatedDECLARE @tab tABLE(ITEM VARCHAR(10), VALUE DEC(10,4), STATE VARCHAR(10))INSERT INTO @tabSELECT 'Item A', 69622.1990, 'RED' union allSELECT 'Item B', 47987.9352, 'YELLOW' union allSELECT 'Item C', 11237.4420, 'RED' union allSELECT 'Item D', 12063.1895, 'RED' union allSELECT 'Item E', 42324.9775, 'YELLOW' union allSELECT 'Item F', 24539.4310, 'RED'/*PERC OF MAX PERC OF SUM69,622.1990 100.00% 33.51%47,987.9352 68.93% 23.10%42,324.9775 60.79% 20.37%24,539.4310 35.25% 11.81%12,063.1895 17.33% 5.81%11,237.4420 16.14% 5.41%SUM 207,775.17 MAX 69,622.20 */SELECT VALUE ,VALUE*100/ Sums AS PERC_OF_SUM ,VALUE*100/ Maxx AS PERC_OF_MAXFROM ( SELECT SUM(Value) OVER() Sums, MAX(VALUE) OVER() Maxx, * FROM @tab )TORDER BY VALUE DESC
--Chandu