if i run this queryselect sum(case when severity ='2. Major' then count(distinct shortid)*15 when severity ='3. Minor' then count(distinct shortid)*5 when severity ='1. Showstopper' then count(distinct shortid)*25end) as 'pmi' from DD where PP like 'XYZ %' and state in('Assigned') group by severity
i am getting this errorMsg 130, Level 15, State 1, Line 3Cannot perform an aggregate function on an expression containing an aggregate or a subquery.