Question: *************************************************************; * PRACTICE 6 (26 pts) *; * 1) Write a DATA step to create two temporary tables, *; * named parks and monuments, that

 *************************************************************; * PRACTICE 6 (26 pts) *; * 1) Write a

*************************************************************; * PRACTICE 6 (26 pts) *; * 1) Write a DATA step to create two temporary tables, *; * named parks and monuments, that are based on the *; * hw3.np_summary table. Read only national parks or *; * monuments from the input table. (Type is either NP *; * or NM.) (2 pts) *; * 2) Create a new column named Campers that is the sum of *; * all columns that contain counts of campers ; * (OtherCamping, TentCampers, RVCampers, *; * BackcountryCampers). (2 pts) *; * 3) When Type is NP, create a new column named ParkType *; * that is equal to Park, and write the row to the *; * parks table. When Type is NM, assign ParkType as *; * Monument and write the row to the monuments table. *; * (16 pts) *; * 4) Select and run the code. Check the values for *; * ParkType. Fix the issue using an appropriate *; * Statement. (2 pts) *; * 5) Keep Reg, ParkName, DayVisits, OtherLodging, Campers, *; * and ParkType in both output tables. (2 pts) *; * 6) Submit the program and view the output data. How *; * many rows are in each table? (2 pts) *; data parks monuments; set hw3.np_summary; where Type in ("NP", "NM"); Camper =sum(); if Type = "NP" then do; ParkType = "Park"; output parks; end; else do; run

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!