Connecting Tech Pros Worldwide Forums | Help | Site Map

how to find the count of employee in the following issue

Newbie
 
Join Date: Aug 2007
Posts: 1
#1: Aug 9 '07
hi friends ,

in a table there are so many employees with different ages ..i want the count of the employees greater than the age of that employee....


ex...
empno age
1 35
2 23
3 24
4 27



the output should be

empno age noofpersons

1 35 0
2 23 3
3 24 2
4 27 1

debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,508
#2: Aug 9 '07

re: how to find the count of employee in the following issue


use COUNT() and DECODE() functions .
Reply


Similar Oracle Database bytes