5 Replies Latest reply on Sep 7, 2015 1:26 AM by GuenterBorg

    SQL for summarizing fields ?

    GuenterBorg

      Hello,

      In my POS Solution i want sum. the Positions by Name and sum. by name and table.

      A Portal with this fields:

       

      Table     Name     Qty     Price     Nr

      ------------------------------------------------

      1          Banana     1          1,70     202

      1          Beer          2          5,00     301

      2          Banana     2          3,40     202

      2          Wine          2          6,00     501

      1          Wine          1          3,00     501

      1          Beer          1          2,50     301

       

      and so on

      The first Result should be :

       

      Banana     3     5,10     202

      Beer          3     7,50     301

      Wine          3    9,00     501

       

      The sec. Result :

       

      1     Banana     1     1,70     202

      1     Beer          3     7,50     301

      1     Wine          1     3,00     501

      ------------------------------------------

      2     Banana        2     3,40     202

      2     Wine             2     6,00     501

       

      Thank you very much

       

      Guenter