select name, avg(v1),avg(v2),avg(v3) from yourtable group by name with rollup
SELECT 'AVERAGE',AVG(V1),AVG(V2),AVG(V3) FROM TABLENAME UNION SELECT NAME,V1,V2,V3 FROM TABLENAME ORDER BY 1
select name,v1 from( select 'Avg' as name,AVG(V1) as v1 from temp union select name,v1 from temp) as ss
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)