mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
This commit is contained in:
parent
0cda6cf523
commit
0b53980221
@ -0,0 +1 @@
|
||||
2023-01-01
|
@ -0,0 +1,23 @@
|
||||
-- https://github.com/ClickHouse/ClickHouse/issues/47432
|
||||
create or replace table t1
|
||||
engine = MergeTree()
|
||||
order by tuple()
|
||||
as
|
||||
select 1 as user_id, 2 as level;
|
||||
|
||||
|
||||
create or replace table t2
|
||||
engine = MergeTree()
|
||||
order by tuple()
|
||||
as
|
||||
select 1 as user_id, 'website' as event_source, '2023-01-01 00:00:00'::DateTime as timestamp;
|
||||
|
||||
|
||||
alter table t2
|
||||
add column date Date alias toDate(timestamp);
|
||||
|
||||
SELECT
|
||||
any(t2.date) as any_val
|
||||
FROM t1 AS t1
|
||||
LEFT JOIN t2 as t2
|
||||
ON (t1.user_id = t2.user_id);
|
Loading…
Reference in New Issue
Block a user