Avg aggregate support for both grouped & ungrouped queries