Yes ARWinner you are right, The column BRF.COL1 i was picking was not present in the group by statement so it was genearting the errors. since the query is working fine now so i can consider that aggregation is possible in the case statements and also the case is possible with aggregation. Anyways, THanks for your help!!!