Question: Open the pg2.np_yearlytraffic table. Notice the Count column records the number of cars that have passed through a particular Location at each Park. Write a

Open the pg2.np_yearlytraffic table. Notice the Count column records the number of cars that have passed through a particular Location at each Park. Write a PROC SORT step to create a new table named traffic_sort based on the data in pg2.np_yearlytraffic: The table should be sorted by ParkType, and then by ParkName within ParkType (both in ascending order). The table should only include rows where ParkType is "National Preserve", "National River", or "National Seashore". Write a DATA step to create a new table named total_traffic based on traffic_sort: . Group the data by ParkType, and then by ParkName within ParkType (both in ascending order). . Create a new column named TypeCount that is the running total of Count within each ParkType. Reset the count for each new value of ParkType. . Create a new column named NameCount that is the running total of Count within each ParkName. Reset the count for each new value of ParkName. . Format TypeCount and NameCount so values are displayed with commas. . Keep only the ParkType, ParkName, TypeCount, and NameCount columns. . Write only the last row for each ParkName to the output table. Write a PROC PRINT to display total_traffic. Show all your code and a screenshot of the PROC PRINT output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
