2 Replies Latest reply: Jul 6, 2015 4:48 AM by Manish Kachhia RSS

    how to select the last 3 recent orders (Order Date desc) by customer

    Salim Hamad

      Hi,

      how to select the last 3 recent orders (Order Date desc) by Customer. (create QVD)

      The result must be

       

      A                           100                       20150220

       

      A                           50                         20150110

       

      A                           20                         20150103

       

      B                           80                         20150215

       

      B                           70                         20150208

       

      B                           30                         20150105

      From Table

      Customer            N° Order              Date Order

       

      A                           50                         20150110

       

      B                           30                         20150105

       

      A                           20                         20150103

       

      B                           25                         20150104

       

      A                           10                         20141225

       

      A                           100                       20150220

       

      B                           80                         20150215

       

      B                           70                         20150208

       

                                                                       

      Thanks,