group by include 0 code example
Example: count number of entries including 0s sql
-- If the table which contains the primary key is
-- mentioned first in the QUERY then use LEFT join else RIGHT join.
select WARDNO, count(WARDCODE) from MAIPADH
right join MSWARDH on MSWARDH.WARDNO = MAIPADH.WARDCODE
group by WARDNO