Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help writing a SAS proc sql query to achieve the problem below please. The desired output is show below for reference to what

I need help writing a SAS proc sql query to achieve the problem below please. The desired output is show below for reference to what is needed for the query.

image text in transcribed

7. Building a Complex Query Using a Multi-Way Join Create a report using a multi-way inner join, which produces the total of the 2011 sales figures for each Orion Star employee. The report should be titled 2011 Total Sales Figures and must include both the managers' and employees' names (displayed as first name followed by last name), and the total retail value of all sales made by each employee in 2011. Present the information as follows: - Use one row per employee. - Organize the report so that the following standards are observed: - Employees under one manager are adjacent to each other (grouped together) on the report. - Within each manager's group, employees are listed in decreasing order of total sales. - The Australian groups are listed first, followed by the U.S. groups. - Manager names are in alphabetical order by last name and then first name. Remember that you can group and order by columns that are not included in the SELECT statement list. The data that you need can be found in the following tables (variables of interest in parentheses): - orion.order_fact (Employee_ID, Total_Retail_Price) - orion.employee_organization (Employee_ID, Manager_ID) - orion.employee_addresses (Employee_ID, Employee_Name)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions