Aggregations with cases

is there somewhere it explained how to use aggregation functions with the case statement other than the documentation because I didn't really find it useful for my case