8 Replies Latest reply on Aug 10, 2017 7:37 AM by Katie Faulks

    Showing most recent purchased web name per customer

    Katie Faulks

      Help! I'm sure this should be really simple but I'm struggling. I have a list of customers who can buy as many web names as they like but each webname will be unique. I want to produce a list so I have customer ID and webname where I only have one record per customer and this is by most recent purchased webname.

       

      So data looks like this:

       

         

      CustomerWebNameOrder Date
      1x27/03/2008 00:00
      2a21/11/2016 00:00
      2b15/08/2011 00:00
      2c23/07/2015 00:00
      3d01/07/2017 00:00
      3e

      01/07/2017 00:00

      And I want it to look like this

         

      CustomerWebNameOrder Date
      1x27/03/2008 00:00
      2a21/11/2016 00:00
      3d01/07/2017 00:00

       

      Another problem is where there are two on the same day I want to just pick any one as don't want any duplicate customer IDs in there.

       

      What's making it difficult is I want the calculation based on customer ID and date really but then once that is done I need it to return the correct webname based on that calcuation. Hope this makes sense.