Re: TPC-DS queries

2019-03-14 Thread Mark Johnson
I found this error in queries generated from templates query36.tpl, query70.tpl, and query86.tpl. The problem is, lochierarchy is an alias defined in the SELECT statement, and the alias isn't being recognized in the CASE statement. PostgreSQL does not allow a column alias to be referenced in a CA

Re: TPC-DS queries

2019-03-11 Thread Tatsuo Ishii
> Hi, > > I think that the sql is not valid. Based on the order by > documentation, a column label cannot be used in an expression. > > from    https://www.postgresql.org/docs/11/queries-order.html > > Note that an output column name has to stand alone, that is, it > cannot be used in an exp

Re: TPC-DS queries

2019-03-11 Thread reg_pg_stefanz
Hi, I think that the sql is not valid. Based on the order by documentation, a column label cannot be used in an expression. from    https://www.postgresql.org/docs/11/queries-order.html > Note that an output column name has to stand alone, that is, it cannot be used in an expression. R

TPC-DS queries

2019-03-10 Thread Tatsuo Ishii
I played with TPC-DS and found some of them can't be executed because of SQL errors and I am not sure why. For example with query 36: select sum(ss_net_profit)/sum(ss_ext_sales_price) as gross_margin ,i_category ,i_class ,grouping(i_category)+grouping(i_class) as lochierarchy ,r