Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Employees table Contains a list of employees ID FirstName LastName Age Dept_number City 1 John 2Jane 3 Mary 4George Edwards 50 300 State Salary 1000

image text in transcribed

Employees table Contains a list of employees ID FirstName LastName Age Dept_number City 1 John 2Jane 3 Mary 4George Edwards 50 300 State Salary 1000 Phoenix AZ 5000 Chicago IL 2500 Phoenix AZ 3000 Chicago IL Smith Doe Smith 45 100 25 100 40 200 Departments table - Contains a list of Departments in the company Dept_number Dept_Name 100 200 300 HR IT Accounting Write a 1-3 page paper providing the SQL statements and the expected results for the following queries. NOTE: You are not expected to install any database software for this assignment. However, you can use an existing DB to verify your queries 1. Display the first name, last name, department name and age of all employees. Note you must display the Department Name and not the department number Display the same information ordered by Last Name Display the information in decreasing order of Age o o 2. Display all details for employees that are not from Chicago 3. Display all details for employees with age 40 or over 4. Calculate and display the total salary of all employees 5. Add a new employee with the following information: o FirstName: Jane o LastName: Smith o Age: 45 o Department: Accounting o City. Chicago o State: IL o Salary: 5000 6. Increase the salary of John Smith by $2000 7. Compute and display the total salary by City

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_2

Step: 3

blur-text-image_3

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

Database Theory Icdt 97 6th International Conference Delphi Greece January 8 10 1997 Proceedings Lncs 1186

Authors: Foto N. Afrati ,Phokion G. Kolaitis

1st Edition

3540622225, 978-3540622222

More Books

Students also viewed these Databases questions

Question

What activities make up personnel functions? Payroll functions?

Answered: 1 week ago

Question

Describe your ideal working day.

Answered: 1 week ago