Hi Orlando,
Group by clause will help you retrieving the query for total number of employees hired in each year.
Formatting the Query results will give you the overall total number of employees.
The below code will satisfy this,
Code:
break on report skip 2
compute sum label 'Total' of "NO OF EMP" on report
select ' ', to_char(hiredate,'yyyy') "YEAR", count(*) "NO OF EMP" from emp
group by to_char(hiredate,'yyyy')
/
'' YEAR NO OF EMP
----------- ---- ----------
1980 1
1981 10
1982 1
1987 2
1999 1
----------
TOTAL 19
If you want to know more about Group by, i suggest you to go through the following link,
http://www.techonthenet.com/sql/group_by.php
Guess i've got your problem right.
Hopefully the SQL query & the link helps you.