my sql query is
Select SUM(case when value1 =351 then 1 else 0 end) as value2 from table1
The output will be 1 if value1 =351.
is it possible to write the query as
Select SUM(case when value1 =351 then Y else N end) as value2 from table1
to get the output as Y or N?
I would use MAX instead: