Redo the query using SSRS. 1. List the top 25% of employees (number, last name, first name,
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 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;
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill