Skip to content

Invalid column error not completely fixed #3733

@YuanchengJiang

Description

@YuanchengJiang

Describe the bug

Related issues: #3670 #3619 #3595

Invalid column: T2.event
LINE 1: ... JOIN (SELECT * FROM telemetry) as T2 ON T1.event<T2.event J...

To reproduce

Run:

SELECT count(*) FROM telemetry as T1 JOIN (SELECT * FROM telemetry) as T2 ON T1.event<T2.event JOIN telemetry as T3 ON T2.created=T3.created

If you remove the subquery or one less JOIN, it works:

SELECT count(*) FROM telemetry as T1 JOIN telemetry as T2 ON T1.event<T2.event JOIN telemetry as T3 ON T2.created=T3.created
SELECT count(*) FROM telemetry as T1 JOIN (SELECT * FROM telemetry) as T2 ON T1.event<T2.event

Expected Behavior

Valid query should return results

Environment

- **QuestDB version**: 7.3.2

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    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