Which SQL in kylin returns a different result by comparing to hive? sql2,
or both?

2016-03-24 11:53 GMT+08:00 Bin.Li <bingleess...@qq.com>:

> hello,
>
> *The sql is(sql1):*
>
> select channel_id,count(*) as shopper
> from
> (
> select shopper_id, channel_id, count(*)
> from ods.ods_mobile_api
> where "DAY" = '20160315'
> group by shopper_id,channel_id
> ) as t
> group by channel_id
> order by shopper desc
> ;
>
> *This should be equal to(sql2):*
> select channel_id, count(distinct shopper_id) as shopper
> from ods_mobile_api
> where day = '20160315'
> group by channel_id
> order by shopper desc
> ;
>
> And sql1, sql2 do can get the same results in hive, but different results
> between hive & kylin.
> What the problem is ??
>
> Many tks!!
>
> bin.li
>



-- 
Best regards,

Shaofeng Shi

Reply via email to