```sql
RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED       FOLLOWING
VS 
RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED       PRECEDING


select product_name, price, group_name, round(avg0), round(avg1)
from (
SELECT
	product_name,
	price,
	group_name,
	avg(price) OVER (PARTITION BY group_name ORDER BY price) avg0,
	avg(price) OVER (PARTITION BY group_name ORDER BY
			price RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) avg1
FROM products INNER JOIN  product_groups USING (group_id)) t
order by group_name, product_name, price;




SELECT
    product_name,
    price,
    group_name,
    round(avg0),
    round(avg1)
FROM
(
    SELECT
        product_name,
        price,
        group_name,
        avg(price) OVER (PARTITION BY group_name ORDER BY price ASC) AS avg0,
        avg(price) OVER (PARTITION BY group_name ORDER BY price ASC RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED PRECEDING) AS avg1
    FROM products
    INNER JOIN product_groups USING (group_id)
) AS t
ORDER BY
    group_name ASC,
    product_name ASC,
    price ASC

```
#include <Parsers/ASTWindowDefinition.h>
#include <Common/quoteString.h>
#include <IO/Operators.h>
namespace DB
{
ASTPtr ASTWindowDefinition::clone() const
{
    auto result = std::make_shared<ASTWindowDefinition>();
    if (partition_by)
    {
        result->partition_by = partition_by->clone();
        result->children.push_back(result->partition_by);
    }
    if (order_by)
    {
        result->order_by = order_by->clone();
        result->children.push_back(result->order_by);
    }
    result->frame = frame;
    return result;
}
String ASTWindowDefinition::getID(char) const