It’s not clear to me if you have in fact one DB containing 18 Companies or not and a suitable answer will depend on what type of DB you actually have…
If you have one DB try to connect to the outer DB level so without selecting a single Company. You should see a list of Companies with all available Tables across the columns for that DB.
Like @cristian.angyal suggested I would keep this base query in tact and (right-click) Reference it for all others.
When you’ve created a Reference, select the Companies you need from the List, then select a single Table by removing all other columns. That way you end up with a 2 column table the first column contains the Company and the second the data in a nested table object. All that’s left is to expand the selected Table column containing the nested Table object and you are done.
Repeat the process for every table you need.
However if you’ll need to connect to each DB and Company separately. Consider the use of Dataflows if you are on a Pro licence - that way you’ll only have to set up the Combined tables for all Companies once and not for each report you’re going to built…
I hope this is helpful.