Write the following as MySQL query: Find the employee ID, first and last name, and salary for each employee whose salary is more than $20,000 or who works in the shipping department. Use the UNION set operator.

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter8: Sql Functions And Procedures
Section: Chapter Questions
Problem 2SCG
icon
Related questions
Question

Write the following as MySQL query:

Find the employee ID, first and last name, and salary for each employee whose salary is
more than $20,000 or who works in the shipping department. Use the UNION set operator.

List the country ID, country name, city, and state/province. Be sure all country names are
included in the result, regardless of whether there is no matching city and state/province. You 
have to use an outer join. 

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Multiple table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage