@afotab
First as you guessed @gpscruise’s answer is for subscription only.
Second the database itself doesn’t matter, H2, PostgreSQL etc. What I was really trying to solicit was the I’m using BDM or I’m using MySQL part as this was not clear in the question (you said table rather than BDM, big difference as far as I’m concerned 
To answer the question, in this version of Bonitasoft, 7.4.x. Unfortunately it is NOT possible to build compound statements like you are asking.
BDM queries are strictly limited to the BDM where they are specified and cannot be built outside, which is where you would want to do this.
So for example:
select * from A - can only reference BDM A where is is built
select * from B - can only reference BDM B where is is built
but
Select A.f1, b.f2 from A join B where A.f3 = B.f3 cannot be built at all.
This is a function of how Bonitasoft have designed/built the BDM model as it stands.
I admit it is limited but most of my data is outside in PostgreSQL so this doesn’t matter to me.
However there is hope, maybe tomorrow this might be addressed in 7.5 beta (though possibly unlikely), it will be announced on the blog so keep an eye on it. No - I have no idea what is in 7.5 so can’t say.
If not then i would suggest adding an Idea for future development here http://community.bonitasoft.com/ideas, or create a bug here https://bonita.atlassian.net/secure/Dashboard.jspa, stating the issue and goals you are trying to achieve and as such why you consider it a bug.
regards
Seán
PS: While this may not be the complete answer you’re hoping for, it does indicate a possible solution, please mark as resolved.