1 Reply Latest reply: Feb 2, 2018 1:23 AM by P M RSS

    Join table with calculations

    Kevin yin

      I have a table created named TTT, I am trying to create more field with calculation for this table and create a new table named      Table1

       

      My loading script as below, please help me if I have done something wrong

       

       

      Talbe1:

       

      Load *,

      A&B&C as ABC

      D AS D_123

       

      RESIDENT TTT;

       

      JOIN (Talbe1)

      LOAD

      A&B&C as ABC,

      A,

      SUM(SALES) AS SALES_A

      RESIDENT TTT

      GROUP BY A;

       

      JOIN (Talbe1)

      LOAD

      A&B&C as ABC

      A,

      B,

      SUM(SALES) AS SALES_A_B

      RESIDENT TTT

      GROUP BY A, AND B;

        • Re: Join table with calculations
          P M

          Like this??

           

          Talbe1:

           

          Load *,

          A&B&C as ABC

          D AS D_123

           

          RESIDENT TTT;

           

          JOIN (Talbe1)

          LOAD

          A&B&C as ABC,

          A,

          SUM(SALES) AS SALES_A

          RESIDENT TTT

          GROUP BY A , ;

           

          JOIN (Talbe1)

          LOAD

          A&B&C as ABC

          A,

          B,

          SUM(SALES) AS SALES_A_B

          RESIDENT TTT

          GROUP BY A, AND B ,A&B&C;