Skip to content
Advertisement

Tag: sql

Summing the total of 4 alias

I have the following query: SELECT SUM(case when s1 = ‘fel’ then 1 else 0 end) as s1_count, SUM(case when s2 = ‘fel’ then 1 else 0 end) as s2_count, SUM(case when s3 = ‘fel’ then 1 else 0 …