system.db.runScalarQuery(query, [database], [tx])
String query - A SQL query that should be designed to return one row and one column.
String database - The name of the database connection to execute against. If omitted or "", the project's default database connection will be used. [optional]
String tx - A transaction identifier. If omitted, the query will be executed in its own transaction. [optional]
Any - The value from the first row and first column of the results. Returns None if no rows were returned.
Vision Client, Perspective Session