Seaquel
MySQL error code

MySQL error 3028

MySQL server error 3028 is ER_AGGREGATE_ORDER_FOR_UNION, reported with SQLSTATE HY000.

Expression #%u of ORDER BY contains aggregate function and applies to a UNION, EXCEPT or INTERSECT
Error3028
NameER_AGGREGATE_ORDER_FOR_UNION
SQLSTATEHY000
GroupServer errors

Source: MySQL 8.4 Error Reference