kylin-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ShaoFeng Shi <shaofeng...@apache.org>
Subject Re: SQL problems: Expression 'C.ENABLE_DATE' is not being grouped
Date Tue, 31 Oct 2017 07:56:44 GMT
Right, the grammar is invalid; The 'ENABLE_DATE' is appeared but not
grouped. You can copy the same SQL to Hive, it should also report a similar
error.

A workaround is using Hive view to normalize this "case when" to a new
column, and then use that as a dimension for the Cube.

2017-10-31 11:58 GMT+08:00 liubo@fcyun.com <liubo@fcyun.com>:

> Hi all,
>     My requirement is:
>     enable_date in t_store table means the first day the store registered
> in our system, it's a new store , otherwise it's a old store.
>     so, I write this SQL, "case when c.enable_date
> =d.dd then 1 else 0 end is_new_store "
>
>     but, it's wrong, the error is: Expression 'C.ENABLE_DATE'
>  is not being grouped
>
>     How to solve this, and ideals? thanks ~
>
>
>
> ------------------------------
> liubo@fcyun.com
>



-- 
Best regards,

Shaofeng Shi 史少锋

Mime
View raw message