ClickHouse/tests/queries/0_stateless/03060_analyzer_regular_view_alias.sql
2024-08-05 15:29:14 +00:00

17 lines
481 B
SQL

-- https://github.com/ClickHouse/ClickHouse/issues/11068
SET enable_analyzer=1;
create table vt(datetime_value DateTime, value Float64) Engine=Memory;
create view computed_datum_hours as
SELECT
toStartOfHour(b.datetime_value) AS datetime_desc,
sum(b.value) AS value
FROM vt AS b
GROUP BY toStartOfHour(b.datetime_value);
SELECT
toStartOfHour(b.datetime_value) AS datetime_desc,
sum(b.value) AS value
FROM vt AS b
GROUP BY toStartOfHour(b.datetime_value);