The SqlQuery module allows you to perform SQL queries from within the policy script. You can query the same tables and columns that you use in a report query.
You can use the following methods from the SqlQuery module:
query(‘sql query statement
’): runs a SQL query.
For more information about SQL queries against data, see Managing reports.