Explore BrainMass

SQL Queries to Manipulate Tables

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Please refer to the attached file SQL1.txt that contains SQL commands to create two tables Employee and Job_Title, and populate them with data.

Write SQL queries to accomplish following.

1. Choose a Job Description and increase by 10% all employees' salaries that have the selected Job Description (not Job Title).

2. Decrease all Exempt employees' salaries from a certain State by 15%.

3. Increase all Non-Exempt employees' salaries by 5%, if employee was hired more than 3 years ago and is less than 30 years of Age.

4. Delete Exempt employees earning a Salary greater than a certain amount.

5. Calculate the maximum salary of all Exempt employees.

6. Calculate the minimum, maximum, and average salary for each Job_Description.

7. Insert 3 additional Job_Title records that no Employee holds.
Write a Select query that displays ALL Job_Descriptions and the first and last name of anyone holding that description. The query MUST show all Job_descriptions, including the 3 additional just added.

© BrainMass Inc. brainmass.com October 25, 2018, 3:25 am ad1c9bdddf


Solution Summary

This solution provides a detailed tutorial of the given computer science problem.

See Also This Related BrainMass Solution

SQL Joins and Typical Query Usage.

Create the following queries on the ITCO630_A database used in unit 3 and save them all in a file called ITCO630_P5.SQL. Please note that you can execute individual queries in a query file by highlighting the lines that you want to execute before running the script. Remember to define what database to use with a USE statement.

1. Using a join, get the full details of all the students who work on the mid-term exam assignment.
2. Get the assignment names (duplicates eliminated) being worked on by students at Central University.
3. Get the last names of all the students who are working on assignment A1.
4. Get the student numbers and start dates of all the students with start dates equal to the earliest date.
5. Insert yourself into the student table using the last five digits of your phone number as the student number and show yourself as attending Central University. Then show all the records in the student table.
6. Delete yourself from the student table by matching your student number, and then show all the records in the student table.

You should create a zip file called ITCO630_P5.ZIP with your query file (ITCO630_P5.SQL) included.

- Communicate with a relational database to create tables, and query and manipulate data.
- Use normalizing and data integrity methodologies when designing a database.
- Create and manage databases and their related components.

View Full Posting Details