SQL How to show '0' value for a month, if no data exists in the table for that month

后端 未结 3 1933
天涯浪人
天涯浪人 2021-01-21 10:55

First of all my result looks like this:

KONTONR Month SELSKAPSKODE BE
3条回答
  •  甜味超标
    2021-01-21 11:38

    if you don't want to do all that you could also modify this: SUM(BELOP) with this: Sum (case when BELOP is not null then 1 else 0 end)

提交回复
热议问题