Explore BrainMass
Share

Write SQL queries using BETWEEN, LIKE and UNION

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

Using the database and tables from the attached file, 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 the 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 the 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 find all people in their 20's.)

Write a SQL query that uses UNION of the two tables. Be creative.

Using the updated database, write the following queries using the SQL GROUP BY statement and appropriate aggregate statements (when needed):

Write a SQL query that displays the average salary / hourly wage grouped by job_title.

Write a SQL query that displays the number of people in each EE0-1 Classification and the average salary / hourly wage for each classification.

Group employees by EEO classification: Select the employees' last names and group them by EEO-1 Classification

Group employees by salary within their EEO classification: Select the employees' last names and group them by salary within their EEO-1 Classification.

Select the employees' last names and group them by salary within job titles that are grouped into exempt and non-exempt.

© BrainMass Inc. brainmass.com March 21, 2019, 6:09 pm ad1c9bdddf
https://brainmass.com/computer-science/sql/write-sql-queries-between-union-247061

Attachments

Solution Summary

The expert writes an SQL queries using BETWEEN, LIKE and UNION.

$2.19