title: Don't return row if SUM() is zero
body: <p>I have a query:</p>
  
  <pre><code>   SELECT DTH.PointPerson AS Person
            ,PDT.[Name] AS Project
            ,(CASE WHEN TSK.Name IS NULL THEN NULL
              WHEN SPT.[Name]+' - '+SPT.[Description] IS NULL THEN 'KanBan'
              ELSE SPT.[Name]+' - '+SPT.[Description]
              END) AS Sprint
            ,COALESCE(STY.[Number], NSS.IncidentNumber) AS Story
            ,TSK.[Name] AS Task
            ,SUM(CASE WHEN DATEPART(dw, DTH.ActivityDate) = 1 THEN DTH.[Hours] ELSE 0 END) AS Monday
            ,SUM(CASE WHEN DATEPART(dw, DTH.ActivityDate) = 2 THEN DTH.[Hours] ELSE 0 END) AS Tuesday
            ,SUM(CASE WHEN DATEPART(dw, DTH.ActivityDate) = 3 THEN DTH.[Hours] ELSE 0 END) AS Wednesday
            ,SUM(CASE WHEN DATEPART(dw, DTH.ActivityDate) = 4 THEN DTH.[Hours] ELSE 0 END) AS Thursday
            ,SUM(CASE WHEN DATEPART(dw, DTH.ActivityDate) = 5 THEN DTH.[Hours] ELSE 0 END) AS Friday
            ,SUM(CASE WHEN DATEPART(dw, DTH.ActivityDate) = 6 THEN DTH.[Hours] ELSE 0 END) AS Saturday
            ,SUM(CASE WHEN DATEPART(dw, DTH.ActivityDate) = 7 THEN DTH.[Hours] ELSE 0 END) AS Sunday
            ,SUM(DTH.[Hours]) AS Total
            FROM DailyTaskHours DTH
       LEFT JOIN Task TSK ON DTH.TaskId = TSK.PK_Task 
       LEFT JOIN Story STY ON TSK.StoryId = STY.PK_Story 
       LEFT JOIN NonScrumStory NSS ON DTH.NonScrumStoryId = NSS.PK_NonScrumStory 
       LEFT JOIN Sprint SPT ON STY.SprintId = SPT.PK_Sprint 
       LEFT JOIN Product PDT ON STY.ProductId = PDT.PK_Product
       GROUP BY  DTH.PointPerson, PDT.[Name], SPT.[Name]
                 ,SPT.[Description]
                 ,STY.[Number]
                 ,NSS.IncidentNumber
                 ,TSK.[Name]
  </code></pre>
  
  <p>If: SUM(DTH.[Hours]) AS Total = 0 I want the row to not be returned</p>
  
  <p>I believe the approach would be to use CASE WHEN but I am having trouble figuring out exactly where it goes.</p>