Perhaps you can cobble something out of this.... It's a Bird, It's a Plane, It's SQL Transpose! http://www2.sas.com/proceedings/forum2008/089-2008.pdf Ever wish you could easily transpose and summarize monthly data using just PROC SQL? Regardless of whether the data is stored in a SAS dataset or other relational databases? Even if scores of variables for dozen of months are involved? This paper tackles the task of data denormalization with a simple macro that uses PROC SQL to take a "vertical" table with multiple rows per subject and transform it into a "horizontal" table containing one row per subject with aggregated monthly values.
... View more