View the step-by-step solution to:

Question

Create the following queries using the names shown (i.e., including the leading number):

1-NUMBER OF

EMPLOYEES BY DEPARTMENT: answers the question, "How many employees work for each department?" Include fields: NUMBEROFEMPLOYEES, DEPARTMENT.

2-TOTALPAY BY DEPARTMENT: answers the question, "How much total salaries are paid to each department?" Include fields: DEPARTMENT and a calculated field called TOTALPAY defined as HOURS*PAYBYHOUR.

3-TOTALPAY BY EMPLOYEE: answers the question, "What are the salaries paid to each employee?" Include fields: EMPLOYEEID, DEPARTMENT, WORKDATE, WORKCODE, WORKCODES. WORKNAME, HOURS, PAYBYHOUR, and a calculated field called TOTALPAY defined as HOURS*PAYBYHOUR.

4-TOTALPAY BY JOBTITLE: answers the question, "How much total salaries are paid to each job title (e.g., Business Analyst, Business Consultant)?" Include fields: JOBTITLE and a calculated field called TOTALPAY defined as HOURS*PAYBYHOUR.

5-TOTALPAY BY PAYBAND: answers the question, "How much total salaries are paid for each pay band?" Include fields: PAYBAND and a calculated field called TOTALPAY defined as HOURS*PAYBYHOUR.

6-TOTALSALARIES: answers the question, "What is the total amount salaries paid"?

Top Answer

1.Query for number of employees by department: SELECT DEPARTMENT, COUNT(DEPARTMENT) FROM EmpDetails GROUP BY... View the full answer

QUERY 1.PNG

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question