Hello Roberto,
In mendix you join two tables like this by using the association like this.the R1 will be association between two tables
Select SAMP.*, COM.*
FROM
SAMPLING$SAMPLEREQUEST SAMP,
USERMANAGMENT$COMPANY COM,
SAMPLING$SAMPLEREQUEST_COMPANY R1
WHERE
SAMP.id=R1.SAMPLING$SAMPLEREQUESTID
and COM.id =R1.USERMANAGMENT$COMPANYID
You should think about if you really need this. In Mendix, you usually retrieve the main object and you are still able to display associated data (In grids, listviews,...)
Have you tries using Aliases for the selected columns?
Nevertheless, seriously consider if you need to do a raw SQL query.
regards, Fabian