title: LEFT JOIN not keeping only records that occur in a SELECT query
body: <p>I have the following SQL select statement that I use to get a subset of products, or wines:</p>
  <pre><code>SELECT pv.SkProdVariantId AS id,
         pa.Colour AS colour,
    FROM Dim.ProductVariant AS pv
    JOIN ProductAttributes_new AS pa
      ON pv.SkProdVariantId = pa.SkProdVariantId
   WHERE pv.ProdTypeName = 'Wines'
  </code></pre>
  <p>The length of this table generated is 3,905. I want to get all the transactional data for these products.
  At the moment I'm using this select statement</p>
  <pre><code>SELECT c.CalDate AS timestamp,
         f.SkProductVariantId AS sku_id,
         f.Quantity AS quantity
    FROM fact.FTransactions AS f
  LEFT JOIN Dim.Calendar AS c
            ON f.SkDateId = c.SkDateId
  LEFT JOIN (    
    SELECT pv.SkProdVariantId AS id,
           pa.Colour AS colour,
      FROM Dim.ProductVariant AS pv
      JOIN ProductAttributes_new AS pa
        ON pv.SkProdVariantId = pa.SkProdVariantId
     WHERE pv.ProdTypeName = 'Wines'  
    ) AS s
    ON s.id = f.SkProductVariantId
   WHERE c.CalDate LIKE '%2019%'
  </code></pre>
  <p>The calendar dates are correct, but the number of <strong>unique</strong> products returned is 5,648, rather than the expected 3,905 from the select query.</p>
  <p>Why does my <code>LEFT JOIN</code> on the first select query not work as I expect it to, please?</p>
  <p>Thanks for any help!</p>