SELECT * FROM (SELECT [UserID] FROM [User]) a LEFT JOIN (SELECT [TailUser], [Weight] FROM [Edge] WHERE [HeadUser] = 5043) b ON a.UserId = b.TailUser