select school.val
sum(case when addrlocatr <> ('d') then 1 else 0 end) as Living
from address
sample output
school.val living
business 6000
humanities 1000
mass comm 2000
Now I want to combine the school.val if the the value is humanities and mass. They should be combined into one school.al called humanities. it should be a distinct count which I belive I address with the then 1 else 0 end) procedure. Therefore the desired output should be
school.val living
business 6000
humanities 3000
sum(case when addrlocatr <> ('d') then 1 else 0 end) as Living
from address
sample output
school.val living
business 6000
humanities 1000
mass comm 2000
Now I want to combine the school.val if the the value is humanities and mass. They should be combined into one school.al called humanities. it should be a distinct count which I belive I address with the then 1 else 0 end) procedure. Therefore the desired output should be
school.val living
business 6000
humanities 3000