[ 
https://issues.apache.org/jira/browse/PHOENIX-547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gabriel Reid resolved PHOENIX-547.
----------------------------------

    Resolution: Fixed

Bulk resolve of closed issues imported from GitHub. This status was reached by 
first re-opening all closed imported issues and then resolving them in bulk.

> Reference to aliases don't work when index table is used
> --------------------------------------------------------
>
>                 Key: PHOENIX-547
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-547
>             Project: Phoenix
>          Issue Type: Task
>    Affects Versions: 2.1.0-Release
>            Reporter: mujtaba
>            Assignee: James Taylor
>              Labels: bug
>
> (Enhancement request by Neel)
> To prevent having to repeat the expression from the project in the group by 
> clause, the following query should work:
> select
>         (CASE
>                WHEN i_1 like '/w%' then 'a'  
>                WHEN i_1 like '/x%' then 'b'  
>                WHEN i_1 like '/y%' then 'c'  
>                WHEN i_1 like '%z=%' then 'd'  
>                WHEN i_1 like '/x%' then 'e'  
>                ELSE 'Others'
>        END )  as category,
>       avg(A_1),
>       avg(A_2)
> from T
> where
>       A_1 > 0 and
>      A_2 > 0 and
>      R_1 = R_2  
> group by  category



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to