Hi All,
Given the following:
select sum(col1), count(col1), sum(col2), count(col2) , sum(col3), count(col3) from table
how can I unpivot so that I get the following:
Description sum count
col1 _name sum_col1 count_col1
col2_name sum_col2 count_col2
col3_name sum_col3 count_col3
My thinking is that somehow I need to create a pseudo group name for the columns, and I want to avoid using a union clause to get the data separately
Thanks