Question
Employees table - Contains a list of employees ID FirstName LastName Age Dept_number City State Salary 1 John Smith 45 100 Chicago IL 1000 2
Employees table - Contains a list of employees
ID | FirstName | LastName | Age | Dept_number | City | State | Salary |
1 | John | Smith | 45 | 100 | Chicago | IL | 1000 |
2 | Jane | Doe | 25 | 100 | Phoenix | AZ | 5000 |
3 | Mary | Smith | 40 | 200 | Chicago | IL | 2500 |
4 | George | Edwards | 50 | 300 | Phoenix | AZ | 3000 |
Departments table - Contains a list of Departments in the company
Dept_number | Dept_Name |
100 | HR |
200 | IT |
300 | Accounting |
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
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:
FirstName: Jane
LastName: Smith
Age: 45
Department: Accounting
City: Chicago
State: IL
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