Skip to content
Advertisement

a query that sum the count of a row from multiple columns in SQL

I have to write a query that sum the count of a row from multiple columns

My code is like this, but total doesn’t work:

input:

output:

Advertisement

Answer

Use coalesce as follows:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement