• Without seeing the data returned I don't know that I can give definitive answer, but I would venture to say that you can probably do it in either place. If you are not going to be doing any drill-down on the data over 35 weeks I'd recommend doing it in the procedure. It might look something like this:

    SELECT

    COUNT(events) AS number_of_events,

    CASE

    WHEN number_of_weeks > 35 THEN 'OVER 35'

    ELSE number_of_weeks

    END AS number_of_weeks

    FROM

    event_table

    GROUP BY

    CASE

    WHEN number_of_weeks > 35 THEN 'OVER 35'

    ELSE number_of_weeks

    END

    You might have to do some tweaking to make sure you have the ordering you want.