From you question get the idea you are trying to access the internal mendix database via the database connector.
Are you aware that the database connector is mean to connect with external databases? The internal Mendix database can be accessed by doing a retrieve activity for example from a microflow.
The select sql statement you are indicating can be translated to a retrieve activity with: