An aggregate may not appear in the WHERE clause
AND we.UpdatedDate = (SELECT MAX(we.UpdatedDate)) is the offending statement.

Two easy ways to solve this are to get the Max(we.UpdateDate) in a variable first, or add an inner join (select max(we.UpdateDate) from WorkerExtension ) and joing that back to the "we" aliased table.