Question: Redo the query using SSRS. 1. List the top 25% of employees (number, last name, first name, rank, total gross sale) in term of their

Redo the query using SSRS.

1. List the top 25% of employees (number, last name, first name, rank, total gross sale) in term of their total sales (gross sale)

SELECT EMPLOYEE_NO, LNAME, FNAME, Rank, SALES_TOTAL

FROM (SELECT EMPLOYEE_NO, LNAME, FNAME, SALES_TOTAL,

DENSE_RANK() OVER (ORDER BY SALES_TOTAL DESC) AS Rank

FROM EMP_FUZZY_SALES) WHERE SALES_TOTAL>=0.25;

2. In the decision table, how many employees are in each decision?

SELECT Decision,COUNT(*) AS EmployeeCount FROM FAOES2E.FUZZY_DECISION;

GROUP BY Decision;

3. How many employees are in each of the Number_Orders, Number_Products, and sales fuzzy categories?

SELECT 'NUMBER_ORDERS' AS Sales_Category, NUMBER_ORDERS AS NUMBER_ORDERS,

COUNT(*) AS EmployeeCount FROM EMP_FUZZY_PERFORMANCE GROUP BY NUMBER_ORDERS

UNION ALL

SELECT 'NUMBER_PRODUCTS' AS Sales_Category, NUMBER_PRODUCT AS NUMBER_PRODUCT,

COUNT(*) AS EmployeeCount FROM EMP_FUZZY_PERFORMANCE GROUP BY NUMBER_PRODUCT

UNION ALL

SELECT 'SALES_TOTAL' AS Sales_Category,SALES_TOTAL AS SALES_TOTAL,COUNT(*) AS EmployeeCount

FROM EMP_FUZZY_PERFORMANCE GROUP BY SALES_TOTAL;

4. Based on each state, how many employees are in each of the decision categories?

SELECT State,Decision,COUNT(*) AS EmployeeCount FROM EMPLOYEE,FAOES2E.FUZZY_DECISION GROUP BY State, Decision

ORDER BY State, Decision;

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 Programming Questions!