3 Replies Latest reply: Jan 14, 2016 8:52 AM by Sunny Talwar RSS

    Problem with group by clause

    Juan Carlos Vera Hernandez

      Hi,

       

      I have the following code in a script:

       

      LOAD

        ID_COMMERCIAL_SITE,

        ID_PROVIDER,

        RECEPCION_DATE,

        SUM(NUM_LECTURAS)  AS IND_EFICIENCIA

      RESIDENT LECTURAS

      GROUP BY

        ID_COMMERCIAL_SITE,

        ID_PROVIDER,

        RECEPCION_DATE

       

      I'm not getting aggregated data as you can see below:

       

      ID_COMMERCIAL_SITE,  ID_PROVIDER,  RECEPCION_DATE,  IND_EFICIENCIA

      49255,46747,2015-04-07,7
      49255,46747,2015-04-07,7
      49255,46747,2015-04-08,7
      49255,46747,2015-04-01,7
      49255,46747,2015-04-01,7
      49255,46747,2015-04-01,7
      49255,46747,2015-04-30,7

       

      What I'm doing wrong?

      Thank you very much.