I'm attempting to use a coalesce, but obviously am misunderstanding something. In the code below, the code after the first from (including the paren) - up to '= en.personID) st)' gives a listing of distinct stateIDs as expected. But when I run the entire code I get an error: Incorect syntax near the keyword 'where'. Can anyone see what I am doing wrong? Can you use a select/subquery in a coalesce? Thank you!I'm attempting to use a coalesce, but obviously