query SQL question

Description

Can someone help me the question I attached the file below in word. I got stuck some where

Don't use plagiarized sources. Get Your Custom Assignment on
query SQL question
From as Little as $13/Page

Unformatted Attachment Preview

1. Determine the Appropriate Command and Write a QUERY:


The employees table and job history table both have similar columns.
Please write a queries that performs a UNION of the data that you choose to select.
Make sure to suppress any duplicates when doing this.
My Query:
Select EMPLOYEE_ID, JOB_ID, DEPARTMENT_ID
From EMPLOYEES
Union
Select EMPLOYEE_ID, JOB_ID, DEPARTMENT_ID
From JOB_HISTORY;

How does this differ from if you were to run these two queries individually?
2. Determine the Appropriate Function and Write a QUERY:

Choose a table that has a column with a number data type. Make sure this column
is one that makes sense to take the average of.



Then return the rounded average of that column.
GROUP the data by another column in the table.
Choose the fields for your query.
My Query:
Select MAX_SALARY, ROUND(AVG(MAX_SALARY)) AS Average_MAX_SALARY
From JOBS
Group by MAX_SALARY;
3. Determine the Appropriate Function and Write a QUERY:


Add the HAVING Clause to your Query in Problem #2.
Explain what the HAVING Clause did as a result of you adding it to the Query.
4. Determine the Appropriate Command and Write a QUERY:
─ Redo problem #2, to not suppress any duplicates.
─ What did you notice about the change of results.

Purchase answer to see full
attachment