SELECT last_name, job_id, salary,
WHEN job_id LIKE 'SA_MAN' AND salary < 12000 THEN '10%'
or %% added in the end.
WHEN job_id LIKE 'SA_MAN' AND salary >= 12000 THEN '15%'
WHEN job_id LIKE 'IT_PROG' AND salary < 9000 THEN '8%'
WHEN job_id LIKE 'IT_PROG' AND salary >= 9000 THEN '12%'
ELSE 'NOT APPLICABLE'
END ) Raise
Read more on CASE:
Use a CASE
Statement in Oracle SQL
This assignment will ask you to
modify an existing report to use the CASE statement. Your
assignment is to use a CASE statement as follows:
* CASE 1: Books with total sales
greater than $100,000, display “Best Seller”
* CASE 2: Books with total sales
between $10,000 and $99,999 display “Average Seller”
* CASE 3: Books with sales less than
$10,000 display “Poor Seller”
store_name format a25
col book_title format a25
total_sales format $999,999
col sales format a15
break on sales
sum(quantity)*book_retail_price > 100000 then 'Best Seller'
when sum(quantity)*book_retail_price < 10000 then 'Poor
else 'Average Seller'
end ) sales,
store.store_key = sales.store_key
sales.book_key = book.book_key
Get the Complete
Oracle SQL Tuning Information
The landmark book
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
for 30% off directly from the publisher.