2 Replies Latest reply: Jul 1, 2014 4:48 AM by Manish Kachhia RSS

    Display the Customer Name who has paid the maximum Revenue

    Karunpreet Soni

      Hello Everyone,


      I have multiple columns in table, but I have work with only 3 columns date, customer name and revenue.


      For a single a Customer there can be multiple revenue.


      I want to display the name of the customer who has the max value of Revenue, also the customer name who has given the maximum Revenue till now


      How can that be achieved ?


      For more clarity I will give an example


      Customer Name     Revenue     Date

      A                              100          01-01-1991

      A                              200          01-01-1992

      B                              300          01-01-1991

      C                              250          01-01-1991

      C                              400          01-01-1992

      D                              500          01-01-1991


      Customer who has the max value of Revenue is D i.e is 500

      Customer who has given the maximum Revenue till now is C (250 + 400 = 650).


      How can these values be displayed in a text box.


      Thanking everyone in anticiaption