Conditional Processing - Exercise

Contact Us or call 1-877-932-8228
Conditional Processing - Exercise

Conditional Processing

Duration: 5 to 10 minutes.
  1. Start with a simple query that retrieves the street_address, postal_code, city, state_province and country_id from the locations table.
  2. Add a DECODE function call that checks the country_id. If the value of country id is 'US' then display the word 'Domestic' otherwise display the word 'Foreign'.
  3. Create a query with an inner join on the employees and jobs tables.
  4. In the query's SELECT statement, choose the first_name, last_name, job_title, salary increased by 10%, the min_salary and the max_salary.
  5. Add a case statement (aliased by new title) that appends the word 'Senior' to the title for any employee who's salary when adjusted by 10% exceeds the max_amount permitted for the job title.