Well, you can execute a query with API available against the tables available, even if they are direct POSTgres tables like pg_stat_all_tables. But it is not advisable.
Just out of curiosity:
How will you create tables for your Mendix app with out linking the entity?
And How will you manage it?
How do you want to show the output of the query without having an entity? Given the data widgets works only with entity?
There might other out of the box solutions available. Would advice you to explore them first.