My table is,
customdata check service loc value
101 0 0 4 4
101 0 0 3 3
101 5 4 4 3
102 0 0 1 2
102 4 4 3 3
103 0 0 4 4
My result should be like,
customdata cnt splcnt//count of check when not 0
101 3 1
102 2 1
103 1 0
Can anyone tell me how should i have my query to take this both this count.
Use a
CASEstatement to conditionallySUMbased on the value ofcheck: