7 Replies Latest reply: Jun 18, 2014 9:50 AM by Bhattacharjee Paromita RSS

    Group By function with sum

      Hi guys,

       

      I would like to use the group by function with aggregate function as sum.

       

      lets say the input is

       

      Name       age           class                Score

      a               6                1                       4

      a               6                1                       3

      a               6                1                       5

       

      The desired output is

       

      Name        age         class                  Score

      a                6               1                       12

       

      The script I tried:

      Load Name,

                age,

                class,

                 Sum(Score) as Score

      from samplefile.csv

      group by Name;

       

      But the execution fails with error "Invalid expression"

      Kindly Help Me out...