query Sql run Error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

query Sql run Error

apache_dev@163.com
Hi,

 Kylin2.0 on HDP2.5.3.

 sql is not work.
   select T7.F16 as F3,SUM(T7.F0) as F4  
from (
select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  
from KYLIN_CAL_DT T17
inner join
(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0
from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03')
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8
on T8.PART_DT = T17.CAL_DT
) T7  
group by T7.F16

but this sql can work

  select T7.F16 as F3,SUM(T7.F0) as F4  from
(
select F16,F0 from
 (
select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  
from KYLIN_CAL_DT T17
inner join
(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0
from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03')
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8
on T8.PART_DT = T17.CAL_DT
) T7  
group by F16,F0
) T7
group by T7.F16

What's the reason?



[hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: query Sql run Error

Billy Liu
please check log first.

2017-08-01 16:08 GMT+08:00 [hidden email] <[hidden email]>:

> Hi,
>
>  Kylin2.0 on HDP2.5.3.
>
>  sql is not work.
>    select T7.F16 as F3,SUM(T7.F0) as F4
> from (
> select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0
> from KYLIN_CAL_DT T17
> inner join
> (
> select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE)
> I_eceb82a4498247aeb911ba59f82148f0
> from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03')
> group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
> ) T8
> on T8.PART_DT = T17.CAL_DT
> ) T7
> group by T7.F16
>
> but this sql can work
>
>   select T7.F16 as F3,SUM(T7.F0) as F4  from
> (
> select F16,F0 from
>  (
> select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0
> from KYLIN_CAL_DT T17
> inner join
> (
> select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE)
> I_eceb82a4498247aeb911ba59f82148f0
> from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03')
> group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
> ) T8
> on T8.PART_DT = T17.CAL_DT
> ) T7
> group by F16,F0
> ) T7
> group by T7.F16
>
> What's the reason?
>
>
>
> [hidden email]
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: query Sql run Error

apache_dev@163.com
thinks,

  Kylin2.0 on HDP2.5.3.



 sql is not work.
   select T7.F16 as F3,SUM(T7.F0) as F4  
from (
select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  
from KYLIN_CAL_DT T17 
inner join 
(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0 
from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03') 
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8 
on T8.PART_DT = T17.CAL_DT
) T7  
group by T7.F16



but this sql can work normal.

  select T7.F16 as F3,SUM(T7.F0) as F4  from
(
select F16,F0 from 
 (
select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  
from KYLIN_CAL_DT T17 
inner join 
(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0 
from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03') 
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8 
on T8.PART_DT = T17.CAL_DT
) T7  
group by F16,F0

) T7
group by T7.F16






 
Date: 2017-08-01 17:28
Subject: Re: query Sql run Error
please check log first.
 
2017-08-01 16:08 GMT+08:00 [hidden email] <[hidden email]>:
 
> Hi,
>
>  Kylin2.0 on HDP2.5.3.
>
>  sql is not work.
>    select T7.F16 as F3,SUM(T7.F0) as F4
> from (
> select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0
> from KYLIN_CAL_DT T17
> inner join
> (
> select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE)
> I_eceb82a4498247aeb911ba59f82148f0
> from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03')
> group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
> ) T8
> on T8.PART_DT = T17.CAL_DT
> ) T7
> group by T7.F16
>
> but this sql can work
>
>   select T7.F16 as F3,SUM(T7.F0) as F4  from
> (
> select F16,F0 from
>  (
> select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0
> from KYLIN_CAL_DT T17
> inner join
> (
> select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE)
> I_eceb82a4498247aeb911ba59f82148f0
> from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03')
> group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
> ) T8
> on T8.PART_DT = T17.CAL_DT
> ) T7
> group by F16,F0
> ) T7
> group by T7.F16
>
> What's the reason?
>
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: query Sql run Error

apache_dev@163.com

 I would like to explain  one  point ,first sql is Bi(smartbi) tools auto created,This example has normal typical.



 
Date: 2017-08-01 18:36
Subject: Re: Re: query Sql run Error
thinks,

  Kylin2.0 on HDP2.5.3.



 sql is not work.
   select T7.F16 as F3,SUM(T7.F0) as F4  
from (
select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  
from KYLIN_CAL_DT T17 
inner join 
(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0 
from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03') 
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8 
on T8.PART_DT = T17.CAL_DT
) T7  
group by T7.F16



but this sql can work normal.

  select T7.F16 as F3,SUM(T7.F0) as F4  from
(
select F16,F0 from 
 (
select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  
from KYLIN_CAL_DT T17 
inner join 
(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0 
from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03') 
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8 
on T8.PART_DT = T17.CAL_DT
) T7  
group by F16,F0

) T7
group by T7.F16






 
Date: 2017-08-01 17:28
Subject: Re: query Sql run Error
please check log first.
 
2017-08-01 16:08 GMT+08:00 [hidden email] <[hidden email]>:
 
> Hi,
>
>  Kylin2.0 on HDP2.5.3.
>
>  sql is not work.
>    select T7.F16 as F3,SUM(T7.F0) as F4
> from (
> select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0
> from KYLIN_CAL_DT T17
> inner join
> (
> select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE)
> I_eceb82a4498247aeb911ba59f82148f0
> from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03')
> group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
> ) T8
> on T8.PART_DT = T17.CAL_DT
> ) T7
> group by T7.F16
>
> but this sql can work
>
>   select T7.F16 as F3,SUM(T7.F0) as F4  from
> (
> select F16,F0 from
>  (
> select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0
> from KYLIN_CAL_DT T17
> inner join
> (
> select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE)
> I_eceb82a4498247aeb911ba59f82148f0
> from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03')
> group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
> ) T8
> on T8.PART_DT = T17.CAL_DT
> ) T7
> group by F16,F0
> ) T7
> group by T7.F16
>
> What's the reason?
>
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: query Sql run Error

apache_dev@163.com

Is it a bug to be sure?Is there any way around this issue?

this sql cann't work

select F16,sum(F0) from 
 (
select T8.PART_DT as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  from 

(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0 
from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03') 
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8 
 
inner join KYLIN_CAL_DT T17 
on T8.PART_DT = T17.CAL_DT
) T7  
group by F16


but when i remove   join sql

inner join KYLIN_CAL_DT T17 
on T8.PART_DT = T17.CAL_DT

is can work.



select F16,sum(F0) from 
 (
select T8.PART_DT as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  from 

(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0 
from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03') 
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8 
) T7  
group by F16


 
Date: 2017-08-02 12:41
Subject: Re: Re: query Sql run Error

 I would like to explain  one  point ,first sql is Bi(smartbi) tools auto created,This example has normal typical.



 
Date: 2017-08-01 18:36
Subject: Re: Re: query Sql run Error
thinks,

  Kylin2.0 on HDP2.5.3.



 sql is not work.
   select T7.F16 as F3,SUM(T7.F0) as F4  
from (
select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  
from KYLIN_CAL_DT T17 
inner join 
(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0 
from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03') 
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8 
on T8.PART_DT = T17.CAL_DT
) T7  
group by T7.F16



but this sql can work normal.

  select T7.F16 as F3,SUM(T7.F0) as F4  from
(
select F16,F0 from 
 (
select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0  
from KYLIN_CAL_DT T17 
inner join 
(
select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE) I_eceb82a4498247aeb911ba59f82148f0 
from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03') 
group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
) T8 
on T8.PART_DT = T17.CAL_DT
) T7  
group by F16,F0

) T7
group by T7.F16






 
Date: 2017-08-01 17:28
Subject: Re: query Sql run Error
please check log first.
 
2017-08-01 16:08 GMT+08:00 [hidden email] <[hidden email]>:
 
> Hi,
>
>  Kylin2.0 on HDP2.5.3.
>
>  sql is not work.
>    select T7.F16 as F3,SUM(T7.F0) as F4
> from (
> select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0
> from KYLIN_CAL_DT T17
> inner join
> (
> select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE)
> I_eceb82a4498247aeb911ba59f82148f0
> from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03')
> group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
> ) T8
> on T8.PART_DT = T17.CAL_DT
> ) T7
> group by T7.F16
>
> but this sql can work
>
>   select T7.F16 as F3,SUM(T7.F0) as F4  from
> (
> select F16,F0 from
>  (
> select T17.QTR_ID as F16,T8.I_eceb82a4498247aeb911ba59f82148f0 as F0
> from KYLIN_CAL_DT T17
> inner join
> (
> select KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID, sum(KYLIN_SALES.PRICE)
> I_eceb82a4498247aeb911ba59f82148f0
> from KYLIN_SALES where PART_DT in('2012-01-01', '2012-01-02', '2012-01-03')
> group by KYLIN_SALES.PART_DT, KYLIN_SALES.SELLER_ID
> ) T8
> on T8.PART_DT = T17.CAL_DT
> ) T7
> group by F16,F0
> ) T7
> group by T7.F16
>
> What's the reason?
>
>
>
>
Loading...