A difficult SQL problem... please help

From: Lee Ka Wo <leekawo_at_netvigator.com>
Date: 1998/06/24
Message-ID: <3590FAC3.197F_at_netvigator.com>#1/1


Dear Experts,

I get a problem....

If I have a tables full of salary., I need to group them into several salary "ranges" like this:

        <1000 >=1000 to < 2000 >=2000 to <=2500 >2500

Male    100          200                  120            50  
Famale  50           222                  30             65



What should I do ??

I wonder whether "decode" and "union" can help me ??

e.g.

Select count(*) , decode (??????) from people group by sex

Ken Received on Wed Jun 24 1998 - 00:00:00 CEST

Original text of this message