Query:
```sql
SELECT round(avg(log(2) * number), 6) AS k FROM numbers(10000000)
GROUP BY (number % 2) * (number % 3), number % 3, number % 2
HAVING avg(log(2) * number) > 3465735.3 ORDER BY k
SETTINGS allow_experimental_analyzer=1, optimize_group_by_function_keys=0;
```
Output:
```
Ok.

0 rows in set. Elapsed: 0.079 sec. Processed 10.01 million rows, 80.06 MB (127.02 million rows/s., 1.02 GB/s.)
```

Query:
```sql
SELECT round(avg(log(2) * number), 6) AS k FROM numbers(10000000)
GROUP BY (number % 2) * (number % 3), number % 3, number % 2
HAVING avg(log(2) * number) > 3465735.3 ORDER BY k
SETTINGS allow_experimental_analyzer=0, optimize_group_by_function_keys=0;
```

Output:
```
┌──────────────k─┐
│   3465735.9028 │
│   3465735.9028 │
│ 3465736.595947 │
└────────────────┘

3 rows in set. Elapsed: 0.085 sec. Processed 10.01 million rows, 80.06 MB (117.56 million rows/s., 940.52 MB/s.)
```

cc @kitaisreal 
return;
        
        auto lower_function_name = Poco::toLower(aggregate_function_node->getFunctionName());
        auto supported_function_it = supported_functions.find(lower_function_name);
        if (supported_function_it == supported_functions.end())
            return;
        const auto & inner_function_name = inner_function_node->getFunctionName();
        if (!supported_function_it->second.contains(inner_function_name))
            return;
        const auto * left_argument_constant_node = inner_function_arguments_nodes[0]->as<ConstantNode>();
        const auto * right_argument_constant_node = inner_function_arguments_nodes[1]->as<ConstantNode>();
        /** If we extract negative constant, aggregate function name must be updated.
          *
          * Example: SELECT min(-1 * id);
          * Result: SELECT -1 * max(id);
          */
        std::string function_name_if_constant_is_negative;
        if (inner_function_name == "multiply" || inner_function_name == "divide")
        {
            if (lower_function_name == "min")
                function_name_if_constant_is_negative = "max";
            else if (lower_function_name == "max")
                function_name_if_constant_is_negative = "min";
        }
        if (left_argument_constant_node && !right_argument_constant_node)
        {
            
            if (inner_function_name == "divide")
                return;