Postgres suma, kiedy

SUM(CASE WHEN column = value THEN column END) alias

eg

SUM(CASE WHEN car.brand = 'Toyota' THEN sales END) toyota_sales
Benedict Ouma