Skip to content

Does not find columns inside 'SUM-CASE-WHEN' pattern #579

@staskikotx

Description

@staskikotx

Take this query:

SELECT CAST(SUM(CASE WHEN segment = 'Premium' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) AS premiumpercentage FROM gasstations WHERE country = 'SVK'

The output is:

tables: ['gasstations']
columns: ['country']

Column 'segment' is missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions