You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by 奔跑的蜗牛 <99...@qq.com> on 2015/09/17 09:20:40 UTC
Join table from two Cubes in one project
Hi Team,
We create two cubes in one project. We want to join the two query (querying data from two cube) together.
But we got the error :
null while executing SQL: "with a as ( select part_dt,sum(price) amount from kylin_sales group by part_dt ), b as (select part_dt,count(price) cn from kylin_sales group by part_dt) select * from a join b on a.part_dt= b.part_dt LIMIT 50000"
The example for learn_kylin as following.
We can get data using query select * from a , select * from b . But when join together,we get error.
with a as (
select part_dt,sum(price) amount
from kylin_sales
group by part_dt ),
b as (select part_dt,count(price) cn
from kylin_sales
group by part_dt)
--select * from a
--select * from b
select * from a
join b on a.part_dt= b.part_dt
Thanks,
Xuewei
Re: Join table from two Cubes in one project
Posted by Li Yang <li...@apache.org>.
Let me have a try in local env
On Thu, Sep 17, 2015 at 3:20 PM, 奔跑的蜗牛 <99...@qq.com> wrote:
> Hi Team,
>
> We create two cubes in one project. We want to join the two query
> (querying data from two cube) together.
> But we got the error :
> null while executing SQL: "with a as ( select part_dt,sum(price) amount
> from kylin_sales group by part_dt ), b as (select part_dt,count(price) cn
> from kylin_sales group by part_dt) select * from a join b on a.part_dt=
> b.part_dt LIMIT 50000"
>
>
> The example for learn_kylin as following.
> We can get data using query select * from a , select * from b . But when
> join together,we get error.
>
>
> with a as (
> select part_dt,sum(price) amount
> from kylin_sales
> group by part_dt ),
> b as (select part_dt,count(price) cn
> from kylin_sales
> group by part_dt)
>
>
> --select * from a
> --select * from b
> select * from a
> join b on a.part_dt= b.part_dt
>
>
> Thanks,
> Xuewei