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 t
Because the TOP 1 from the ordered sub-query does not have profile_id = 'u162231993' Remove where u.id = 'u162231993' and see results then.
TOP 1
profile_id = 'u162231993'
where u.id = 'u162231993'
Run the sub-query separately to understand what's going on.