|
-
sum of the range
Hi
i have some data like this
select count(subs_id) "Number of subscribers" , cnt "Number of Profiles"
from ( select subs_id,count(*) cnt
from subscriber_INFO
where caller_type=1
group by subs_id)
group by cnt
The output will be like this
Subcr profiles
ibers
18 1
9 2
6 3
5 4
1 5
2 8
1 10
There will be millions of subscribers and each might have upto 50 profiles or something.
so i want the output something like
Number of subscribers Range of profile [ 1-10 ]
ie... this many number of subscribers having profiles ranging 1-10
33 1-10
24 11-20
8 21-30
like this..
this has to be in a single query..
pls help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|