5 Replies Latest reply: Jul 2, 2014 7:33 AM by Tobias Meyer RSS

    list serveral sum() of several tables in 1 columm

      Hi guys

      I have several sum()s like

       

      T1:

      load x,y,z,

           sum(x) as AMOUNT100 where (z<=100and y<=100) group by x,y,z;

      SQL SELECT x,y,z

      FROM DB9;

       

      T2:

      load x,y,z,

           sum(x) as AMOUNT200where( (z<=200 and z>100) and (y<=123)) group by x,y,z;

      SQL SELECT x,y,z

      FROM DB9;

       

       

      T3:

      load x,y,z,

           sum(x)  as AMOUNT300 where( (z<=300 and z>200) and (y<=123)) group by x,y,z;

      SQL SELECT x,y,z

      FROM DB9;

       

      My questions are:

      1. Is it possible to take all sum() in one table?

      2. How can I list all sum() in 1 collumm to have a list like : -> for showing on dasboard ..

           AMOUNTLIST, sum

      AMOUNT100, 10

      AMOUNT200, 20

      AMOUNT300, 30