REGR_AVGY can be combined with ordered analytical functions in a SELECT list, QUALIFY clause, or ORDER BY clause. For more information on ordered analytical functions, see Window Aggregate Functions.
REGR_AVGY cannot be combined with aggregate functions within the same SELECT list, QUALIFY clause, or ORDER BY clause.