Quote Request LAB 7 Research Paper
Please provide quote for assingment. Please see LAB 6 which was also submitted for quote. It may need to be done first. This requires VPN and RDP to a server but I can provide easy instructions. Document Preview: Due Date: 3-12-13 LAB 7: Aggregate Functions & Grouping Data A (Chap 7). Business managers often need aggregate information such as Total and Average to support various decision-making tasks. Moreover, aggregate functions also provide exceptional situations like Max and Min. Aggregate functions are generally used with numeric data like salary and tax rate. Aggregate functions generally go hand in hand with the SQL clauses GROUP BY and HAVING. Two Rules to Remember: Aggregate functions can be used in both the SELECT and HAVING clauses. Aggregate functions cannot be used in a WHERE clause. Scalar Result: An aggregate function if used all by itself generally produces a scalar result/value. A scalar result is a single value (for example, average is 23.45) which is nothing but a table with a single row and a single column (1?1 table). 1. AVG Find the average salary of all employees in the company. Notice a scalar result. (EX_7.1a). SELECT AVG(emp_salary) Average Salary FROM employee; Find the average salary of employees who work only in department number 7. Notice a scalar result. (EX_7.1b). SELECT $ + CONVERT(Char(10), AVG(emp_salary), 1) Average Salary FROM employee WHERE emp_dpt_number = 7; 2. SUM a) Find the total work hours expended by employees on projects. If you check the data in the assignment table, you will notice that some employees have NULL work hours. These NULL values are ignored in aggregation by SQL Server. Notice a scalar result. (EX_7.2a). SELECT SUM(work_hours) Total Work Hours FROM assignment; b) Find the total and average work hours expended only in project number 20. Again, the NULL work hours will be simply by-passed in computation. Notice the result is not scalar anymore. (EX_7.2b). SELECT SUM(work_hours) TotalHours, AVG(work_hours) Average Hours FROM assignment WHERE work_pro_number = 20; 3. MIN and MAX a) Find the highest and lowest work hours expended. Attachments: LAB-7Aggreg.doc
Is this the question you were looking for? If so, place your order here to get started!