In my line of work, rollup refers to combining/averaging months or quarters. In this case, the rollup is based on INDCODE and PERIOD. I have a table named INDUSTRY that contains data from quarters 1, 2, 3, and 4. Below is a sample of what it looks like.
State area periodyear period indcode firms avgemp
32 000001 2016 01 447125 25 412
32 000001 2016 02 447125 28 427
32 000001 2016 03 447125 29 429
32 000001 2016 04 447125 26 385
First, I am trying to average certain fields but not all. In this case, it would be firms and avgemp. If I was wanting it to look like the desired result below, can I use the rollup function? I want the new averaged data to be in the same table as quarters 1, 2, 3, and 4. Is it better to put the averaged data in a new table?
State area periodyear period indcode firms avgemp
32 000001 2016 01 447125 25 412
32 000001 2016 02 447125 28 427
32 000001 2016 03 447125 29 429
32 000001 2016 04 447125 26 385
32 000001 2016 00 447125 27 413