You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
This query used to work but now returns Unknown column: total_devtags.
Here is a minimal reproduction.
Note that I've included very similar queries which do work.
With the simplest possible query, there is no problem.
How to reproduce
create table tags (dev_tag String) ENGINE = Memory;
insert into tags (*) values ('a');
SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
)
SELECT *
FROM
(
SELECT count(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
)
SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
) AS t
)
Which ClickHouse server versions are incompatible
23.x vs. 22.8
Queries to run that lead to unexpected result
SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
) Error message and/or stacktrace
If applicable, add screenshots to help explain your problem.
FAZVM64 :) SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
)
SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
)
Query id: 0a82feec-afea-4c0c-9d31-9b2ba65608f5
Elapsed: 0.004 sec.
Received exception from server (version 23.12.1):
Code: 47. DB::Exception: Received from localhost:9000. DB::Exception: Unknown column: total_devtags, there are only columns . (UNKNOWN_IDENTIFIER)
FAZVM64 :) SELECT *
FROM
(
SELECT count(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
)
SELECT *
FROM
(
SELECT count(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
)
Query id: 542aee51-4244-43c9-ad67-ef190d6708cf
┌─total_devtags─┐
│ 1 │
└───────────────┘
1 row in set. Elapsed: 0.004 sec.
FAZVM64 :)
FAZVM64 :)
FAZVM64 :)
FAZVM64 :)
FAZVM64 :) SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
) AS t
)
SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
) AS t
)
Query id: f4e85d28-4c40-4caa-866f-4418276c345d
┌─total_devtags─┐
│ 1 │
└───────────────┘
1 row in set. Elapsed: 0.004 sec.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
(you don't have to strictly follow this form)
Describe the issue
This query used to work but now returns Unknown column: total_devtags.
Here is a minimal reproduction.
Note that I've included very similar queries which do work.
With the simplest possible query, there is no problem.
How to reproduce
create table tags (dev_tag String) ENGINE = Memory;
insert into tags (*) values ('a');
SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
)
SELECT *
FROM
(
SELECT count(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
)
SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
) AS t
)
Which ClickHouse server versions are incompatible
23.x vs. 22.8
Which interface to use, if matters
Non-default settings, if any
CREATE TABLE
statements for all tables involvedSample data for all these tables, use clickhouse-obfuscator if necessary
Queries to run that lead to unexpected result
SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
)
Error message and/or stacktrace
If applicable, add screenshots to help explain your problem.
FAZVM64 :) SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
)
SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
)
Query id: 0a82feec-afea-4c0c-9d31-9b2ba65608f5
Elapsed: 0.004 sec.
Received exception from server (version 23.12.1):
Code: 47. DB::Exception: Received from localhost:9000. DB::Exception: Unknown column: total_devtags, there are only columns . (UNKNOWN_IDENTIFIER)
FAZVM64 :) SELECT *
FROM
(
SELECT count(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
)
SELECT *
FROM
(
SELECT count(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
GROUP BY dev_tag
) AS t
)
Query id: 542aee51-4244-43c9-ad67-ef190d6708cf
┌─total_devtags─┐
│ 1 │
└───────────────┘
1 row in set. Elapsed: 0.004 sec.
FAZVM64 :)
FAZVM64 :)
FAZVM64 :)
FAZVM64 :)
FAZVM64 :) SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
) AS t
)
SELECT *
FROM
(
SELECT countDistinct(dev_tag) AS total_devtags
FROM
(
SELECT dev_tag
FROM
(
SELECT *
FROM tags
) AS t
) AS t
)
Query id: f4e85d28-4c40-4caa-866f-4418276c345d
┌─total_devtags─┐
│ 1 │
└───────────────┘
1 row in set. Elapsed: 0.004 sec.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: