Query String for Email. Can you perform a JOIN statement with AML?

Two of my tables will always stay separate in terms of relationship, although, one of the tables, Table A, does have table B's ID as a related field.

If I'm using the query string for the Email notifications, this becomes tricky, because the query string is sent specifically as AML only, and moreover as one-time batch of AML. Therefore I must somehow select from Table B, where a Table A record has table B's id.

My other option is to query all of Table B, and then in the Body of the email, use XPath to find the B record who's ID is in the A record.