SQL Aggregates Support CASE Statements