SQL Count to include zero values

前端 未结 4 2168
太阳男子
太阳男子 2020-12-19 08:59

I have created the following stored procedure that is used to count the number of records per day between a specific range for a selected location:

[dbo].[ge         


        
4条回答
  •  忘掉有多难
    2020-12-19 09:07

    Use a left outer join. Such as

    select count(stuff_ID), extra_NAME 
    from dbo.EXTRAS 
    left outer join dbo.STUFF on suff_EXTRA = extra_STUFF 
    group by extra_NAME 
    

提交回复
热议问题