Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Support for GROUP BY on aliased fields #375

@campoy

Description

@campoy

This seems like a bug on the scope management for identifiers.

While this query works:

select repository_id, count(ref_name) as count
from refs
group by repository_id;

This one fails with the error message column "repo" could not be found in any table in scope:

select repository_id as repo, count(ref_name) as count
from refs
group by repo;

My current workaround is to use a nested query, but this is clearly a hack.

select repo, count(ref_name) as count
from (
    select repository_id as repo, ref_name
    from refs
) as t
group by repo;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy