Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Introducing: the View, but first more Selects. List the full names of the cashiers and what city each lives in. Sort the results by city.

Introducing: the View, but first more Selects.

  1. List the full names of the cashiers and what city each lives in. Sort the results by city. Assume that you do not know the job code when formulating your SQL statement.
  2. Display the total amount of earnings for Ashley ODay during the pay period that ended on 30 May 2003. Assume that you do not know Ashleys employee ID when formulating your SQL statement. Dont forget about her OT earnings too
  3. What are the social insurance number and employee ID of employees who paid more than $150 income tax during the pay period that ended on 23 May 2003?
  4. What are the social insurance number and employee ID of employees who paid more than $150 income tax during the pay period that ended on 23 May 2003?
  5. What are the full names of employees who have earned money? Eliminate duplicate names.
  6. What are the job descriptions of employees who contributed more than $10 to the pension plan during the pay period that ended on 23 May 2003?
  7. List the full name of employees who received pay for the pay period that ended on 23 May 2003 but did not pay any income tax.
  8. Display each employees full name and net (ie. after deductions) pay for the pay period that ended on 30 May 2003.
  9. List every single employee of our company and the pay period and number of regular hours he or she worked each pay period. Sort your records according to employee surname.
  10. Create a view called RegEarningsVU. Use all the columns in the Earnings table except the OtimeEarnings column.
  11. Show all the data in RegEarningsVU. Then insert a record into the Earnings table and display again all the data in RegEarningsVU. Did you notice any changes in the views data? Explain your answer.

  1. Create a view called PayrollMay30VU that displays the following columns from the Earnings and the Deductions tables:
    • Empid as Employee ID
    • Regearnings as Regular Earnings
    • Otimeearnings as Overtime Earnings
    • The sum of the EI, CPP, uniondues, pensionplan, incometax columns as Total Deductions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions