title: Trying to get the right SQL Query (Joins)
body: <p>I've been trying to join a couple tables to get the right result.
  The problem is its returning some NULL values where this shouldn't be the case. </p>
  
  <p>EP.ProductId, CreateDate, IsproductActivated and Subject are returning a Null Value.I've noticed it That DossierID and dossier will return a value when I make a right join as stated below. 
  Could anyone help me with my case?</p>
  
  <pre><code>SELECT  
       EP.ProductId                           AS [ProductId]
      ,MAX(EP.CreateDate)                     AS [CreateDate]
      ,EP.IsProductActivated                  AS [IsProductActivated]
      ,PC.EntityId                            AS [DossierID]
      ,PC.EntityDiscriminator                 AS [EntityDiscriminator]
      ,PDCP.Name                              AS [Subject]
      ,D.Name                                 AS [Dossier]
  
  FROM 
  [tblEntityProduct] AS EP
  
  LEFT JOIN .tblPDCProduct AS PDCP
      ON  PDCP.id = EP.Productid
  
  LEFT JOIN 
      [tblProductContainerContent] AS PCC
      ON PCC.EntityProductId = EP.ProductId 
  
  RIGHT JOIN 
      [tblProductContainer] AS PC
      ON  PC.Id = PCC.Productcontainerid 
  
  LEFT JOIN
      [tblDossier] AS D
      ON D.Id = PC.Entityid
  WHERE PC.EntityId = 2803
  
      GROUP BY EP.Productid
              ,IsProductActivated 
              ,EntityId 
              ,EntityDiscriminator 
              ,PDCP.name
              ,D.name
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/uieHu.png" rel="nofollow noreferrer">The picture below shows the result of the above query. I want the values it suppose to have instead of the NULL</a></p>