> This page is for Docs.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# Export ZOQL Clause Limits

> Overview of limits for Export ZOQL clauses, including restrictions on fields in group by clauses, alias function usage, and nested aggregate functions.

Overview of limits for Export ZOQL clauses, including restrictions on fields in group by clauses, alias function usage, and nested aggregate functions.

Export ZOQL clauses have the following limits:

<table>
  <tr>
    <th>
      Limit
    </th>

    <th>
      Description
    </th>
  </tr>

  <tr>
    <td>
      Maximum Fields on `group by` clause
    </td>

    <td>
      A maximum of five fields allowed when using `group by.`
    </td>
  </tr>

  <tr>
    <td>
      Alias Function Limited Support
    </td>

    <td>
      The alias function is allowed only to define column labels in the result file. You cannot replace an aggregate function with its alias in `having` or `orderby` clauses. Duplicate aliases for column labels are not supported.
    </td>
  </tr>

  <tr>
    <td>
      Nested Aggregate Functions Not Allowed
    </td>

    <td>
      Nested aggregate functions are not allowed.
    </td>
  </tr>

  <tr>
    <td>
      Alias in the SELECT clause might be ignored in certain cases.
    </td>

    <td>
      When an alias in the SELECT clause is the same as the corresponding full column name of the object (case insensitive), the header name in the result file uses the full column name instead of the alias.

      For example, for `select Account.Id, Account.InvoiceDeliveryPrefsEmail as "account.invoicedeliveryprefsemail" from Account` , the header names in the result file are `Account.Id, Account.InvoiceDeliveryPrefsEmail` . The all lower-case `account.invoicedeliveryprefsemail` is ignored.
    </td>
  </tr>
</table>