I'm attempting to perform a LEFT JOIN on a table to consolidate some data, but I'd like to rename one of the fields I'm joining.
LEFT JOIN (SELECT email FROM user_email) AS foo ON (user_id = users.user_id)
I can select that data using
foo.email, but I'd like to rename this field in the join so I can reference
foo.user_email. What's the correct way to perform this?