SQL FILTER clause on aggregates vs CASE inside an aggregate: how they differ and when to prefer FILTER
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks how the SQL FILTER clause on aggregate functions works and how it compares with a CASE expression inside the aggregate. Tests NULL handling in aggregates, the edge cases where the two forms return different results, and when engine support or readability should decide.