There are some commonly-used SQL functions that are implemented differently by SQL vendors. Example:
T-SQL -- @@ROWCOUNT
MySQL -- ROW_COUNT()
In Advanced Query, you can get around the T-SQL @@ by kludging input parameters, but why not have an OutSystems function --- maybe RowsAffected() -- that could be used in the OutSystems query definition dialog. That way, the OutSystems SQL transpiler could output @@ROWCOUNT for MSSQL, ROW_COUNT() for MySQL and whatever the equivalent is for Oracle.
Pretty much anywhere T-SQL uses @@ and MySQL uses a function call, this would be helpful and go a long way towards making Advanced Queries more vendor-neutral.