title: Top 1 with a left join
body: <p>Given the query below there might be multiple rows in dps_markers with the same marker key but we only want to join against the first.  If I take this query and remove the top 1 and ORDER BY I get a value for mbg.marker_value but run as it is it always returns null</p>
  
  <pre><code>SELECT u.id, mbg.marker_value 
  FROM dps_user u
  LEFT JOIN 
      (SELECT TOP 1 m.marker_value, um.profile_id
       FROM dps_usr_markers um (NOLOCK)
           INNER JOIN dps_markers m (NOLOCK) 
               ON m.marker_id= um.marker_id AND 
                  m.marker_key = 'moneyBackGuaranteeLength'
       ORDER BY m.creation_date
      ) MBG ON MBG.profile_id=u.id 
  WHERE u.id = 'u162231993'
  </code></pre>