FetchXML method using javascript in CRM, allows me to use linked entities, so I can query attributes from different tables and linke them together with some primary attribute.
Here's example:
// Prepare variables
var fetchMapping = "logical";
var entityName = "entitiyname"; //first attribute to fetch from this entity [CHANGE THIS]
var FirstColumn = "attributename1"; //first attribute to fetch from this entity [CHANGE THIS]
var SecondColumn = "attributename2"; //second attribute to fetch from this entity [CHANGE THIS]
var ThirdColumn = "attributename3"; //third attribute to fetch from this entity [CHANGE THIS]