Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started