SAQL query handling