Use the ORION library and create a SAS program that performs the following tasks: [10 marks]
Produce a report of Orion Star sales force employees’ aggregate sales in 2011.
Select the Country, First_Name, Last_Name, Value_Sold, Orders, and Avg_Order columns by joining the orion.order_fact and orion.sales tables on Employee_ID. Group the report by Country, First_Name, and Last_Name. Include only employees having an aggregate Value_Sold of $200.00 or more. Order the results by Country, Value_Sold (descending), and Orders (descending).
Calculate Value_Sold by summing Total_Retail_Price.
Calculate Orders by using the count(distinctOrder_ID) function to count the number of unique rows for each employee.
NOTE: An employee can have multiple Order_ID row values for different products. Rows with the same orderID do not count as a separate order.
Calculate Avg_Order by dividing Value_Sold by Orders.
Subset the data to return only the rows for sales in 2011.
Title the report appropriately.
Rewrite the query created in part a) above and use it as an in-line view. Select Country and the maximum Value_Sold, Orders, and Avg_Order values, as well as the minimum Avg_Order value for each country. Name the report 2011 Sales Summary by Country.
Hint: An in-line view cannot use the ORDER BY clause.
Include appropriate comments/ documentation so that it is clear to the reader what your code does.
SAVE your program as familyname_student_id_task2.sas
SAVE your results as familyname_student_id_task2.pdf