group by range [message #315671] |
Tue, 22 April 2008 06:30  |
durai
Messages: 38 Registered: December 2006
|
Member |
|
|
select * from emp;
Emp_id Emp_name Work_class
------- -------- ----------
001 AAA 01
002 BBB 01
003 CCC 02
004 DDD 03
005 EEE 04
006 FFF 04
007 GGG 05
i need output like below
count of work_class 01-02 as 3
count of work_class 03-04 as 3
count of work_class above 04 as 1
i mean i want to group it by work class(range 01-02, 03-04, above 04)
is it possible to get the above result using plain sql(Not by PL/SQL)
Thanx in advance
|
|
|
|