Hello,
I'm running a query that will be used for summary data in a chart, and I'd like to restrict the chart to only 5 or 6 values. However, the query summary results will probably be returning a few more results than this. What I'd like to do is categorize the first 5 counts as their given values, but then roll every other item up into an "Other" category.
Here's the query that returns the counts:
select
customerloc,
count(*) as loc_count
from
csq_ccp_survey_sched,
csq_customers
where
sched_cust_id = customerid
group by
customerloc
order by
loc_count desc
Is there a way to insure that everything after the first 5 entries in this query can be rolled up into on "Other" location category, with a total "Other" count?
Thanks,
Peter![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
I'm running a query that will be used for summary data in a chart, and I'd like to restrict the chart to only 5 or 6 values. However, the query summary results will probably be returning a few more results than this. What I'd like to do is categorize the first 5 counts as their given values, but then roll every other item up into an "Other" category.
Here's the query that returns the counts:
select
customerloc,
count(*) as loc_count
from
csq_ccp_survey_sched,
csq_customers
where
sched_cust_id = customerid
group by
customerloc
order by
loc_count desc
Is there a way to insure that everything after the first 5 entries in this query can be rolled up into on "Other" location category, with a total "Other" count?
Thanks,
Peter
![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)