Skip to content

Invalid column error returned from GROUP BY joined tables #6273

@puzpuzpuz

Description

@puzpuzpuz

To reproduce

The below query returns Invalid column: t2.price error:

CREATE TABLE trades (sym symbol, price double, amount double, ts timestamp) timestamp(ts) partition by day;
CREATE TABLE trades2 (sym symbol, price double, amount double, ts timestamp) timestamp(ts) partition by day;

SELECT t1.ts, t1.price, t2.price / sum(t1.amount) FROM trades t1 JOIN trades2 t2 ON (sym);

A similar error is returned when t2.price / sum(t1.amount) is changed to t1.price / sum(t1.amount)

QuestDB version:

latest master

OS, in case of Docker specify Docker and the Host OS:

Ubuntu 24.04

File System, in case of Docker specify Host File System:

ext4

Full Name:

Andrei Pechkurov

Affiliation:

QuestDB

Have you followed Linux, MacOs kernel configuration steps to increase Maximum open files and Maximum virtual memory areas limit?

  • Yes, I have

Additional context

No response

Metadata

Metadata

Assignees

Labels

BugIncorrect or unexpected behaviorSQLIssues or changes relating to SQL execution

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions