Using the example databases and tables below, 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 greater than to restrict record selection. (Use date
of birth to restrict data.)
- Write a SQL query that joins two tables and restricts the data based on a single job classification.
- Write a SQL query that joins two tables and restricts data based on a specific job title and hire_date that is before a specific
date.
- Write a SQL query that uses UNION of the two tables to return appropriate results.
- Write a SQL query that finds a job title record which has no associated employee.
- Write a SQL query that finds all the job classifications(no duplicates).
- Write a SQL query that finds all employees whose last name begins with the letters p through z.
Write the following queries using the SQL GROUP statement.
- Group employees by job classification: Select the employees' last names and group them by EEO-1 Classification.
- Group employees by salary: Select the employees' last names and group them by salary.
- Group employees by salary within their job classification: Select the employees' last names and group them by salary within their EEO-1 Classification.
Write the following queries.
- Find the number of employees within each job classification.
- Find the number of exempt employees within each job title.