Databases Reference
In-Depth Information
Dept Employee Salary
----- ------------------------------ ----------
10 Whalen, Jennifer 4400
20 Hartstein, Michael 13000
20 Fay, Pat 6000
30 Raphaely, Den 11000
30 Khoo, Alexander 3100
30 Baida, Shelli 2900
30 Tobias, Sigal 2800
30 Himuro, Guy 2600
30 Colmenares, Karen 2500
40 Mavris, Susan 6500
...
100 Chen, John 8200
100 Urman, Jose Manuel 7800
100 Sciarra, Ismael 7700
100 Popp, Luis 6900
110 Higgins, Shelley 12000
110 Gietz, William 8300
Grant, Kimberely 7000
107 rows selected.
Janice wants to make the report more readable by using some of the reporting
features of iSQL*Plus. She also knows that King usually wants to see only
departments 30 and 60 in the report. She adds an IN clause to the query plus a
left-justified report title:
ttitle left 'Department Salary Report'
select department_id "Dept",
last_name || ', ' || first_name "Employee",
salary "Salary" from employees
where department_id in (30,60)
order by department_id asc, salary desc;
Search WWH ::




Custom Search