Are you looking for https://docs.mendix.com/howto/integration/execute-an-sql-statement-on-an-external-database ?