1 Reply Latest reply: Jan 25, 2018 2:24 AM by sagar jagga RSS

    i need to use sum in count , i am finding difficulty in that

    sagar jagga

      Hi,

       

      I need to count the ids whose sum is greater than 3. let me explain with an example. Assume i have below table.

            

      managerwholesellersupervisiorIddateTransaction Amt
      sagarrahulram11/20/20161
      sagarrahulram11/7/20162
      sagarrahulram11/8/20175
      sagarrahulram29/5/20168
      sagarrahulram39/5/20187
      AnindyavikasDeb104/8/20164
      AnindyavikasFiroz45/4/20169

       

      under the manager there are some wholeseller and under the wholersellers there are some supervisiors and further under the supervisior there are some ids those ids have some transaction on particular dates with some transaction amt. i need to find out the count of ids whose transaction amt is greater than equal to 3 in lets suppose in year 2016. My final table will look like after considering the condition

       

          

      managerwholesellersupervisiorCount
      SagarRahulram2(as id 1 has sum=3,id 2 has sum = 8, 3 has 0 sale in year=2016)
      AnindyavikasDeb1(id 10 has sum =4)
      AnindyavikasFiroz1(id 4 has sum = 9)

       

       

      Regards,

      Sagar Jagga