Seaquel
SQL Server error code

SQL Server error 8710

SQL Server raises error 8710 at severity 16, which marks a problem with the query or data that you can correct.

Aggregate functions that are used with CUBE, ROLLUP, or GROUPING SET queries must provide for the merging of subaggregates. To fix this problem, remove the aggregate function or write the query using UNION ALL over GROUP BY clauses.
Msg8710
NameQUERY2_CUBE_ILLEGAL_AGG_FUNC
Severity16
Group8000–8999

What it means

An aggregate function has been used with CUBE, ROLLUP, or GROUPING SETS that does not provide a method for merging subaggregates.

Source: Database Engine events and errors