defined a new virtual method DBAgent::select(DBAgentSelectWithStatementArg &selectArg).

DBAgent already has select(DBAgentSelectArg &selectArg) that
only provides function to data of columns, not formulas or
functions.

This 'select' receives a part of a query statment as an argument,
builds a statement with table name etc., executes it, and returns
the result. So more complicated processing is available.

The disadvantage of this 'select()' is lower compatibility.
DBAgent is an abstract layer for RDBMSs (currently only SQLite3
is suported though). However a free statement is potentially
break a compatibility among RDBMSs.