Share
Explore BrainMass

SQL Database

Ramesh, I'm having trouble with my coding. Could you please look over my SQL Statement. Also I'm unsure how to use the GROUP Coding. Instructions are down below and PLEASE USE SQL SERVER 2008

Use the database and tables from last week's assignment to write SQL queries using Between, Like, and Union:

- Write a SQL query that joins two tables in the example database and uses BETWEEN to restrict record selection. Use salary to restrict data.

- Write a SQL query that joins two tables in the example database and uses BETWEEN to restrict record selection. Use hire dates to restrict data.

- Write a SQL query that joins two tables in the example database and uses LIKE to restrict record selection. Use telephone area codes to restrict data.

- Write a SQL query that joins two tables in the example database and uses LIKE to restrict record selection. Use age to restrict data.

- Write a SQL query that uses the UNION of the two tables to produce a third table.

Use the updated database to write the following queries, using the SQL GROUP statement: MAKE SURE TO USE THE GROUP METHOD

- Select employees' last names and group them by EEO-1 classification.
- Select employees' last names and group them by salary.
- Select employees' last names and group them by salary in their EEO-1 classification.
- Select employees' last names and group them by salary in job titles, grouped into exempt and non-exempt.

Note. Select all data from both tables before you perform the following:
1. Increase all employees' salaries with the selected EEO-1 classification by 10%.
2. Increase all employees' salaries by 5%.
3. Choose an employee from the Employee table and delete that employee.

Use the database and tables from last week's assignment to write SQL statements that do the following:

1. Calculate the average salary for all employees.
2. Calculate the maximum salaries for exempt and non-exempt employees.
3. Calculate the maximum salary for all employees.
4. Calculate the minimum salaries for exempt and non-exempt employees.
5. Calculate the minimum salary for all employees.

Attachments

Solution Summary

This solution assists with writing SQL queries.

$2.19