16 Replies Latest reply: Dec 6, 2017 8:20 AM by Gloria Bertini RSS

    Get New Customer and uneventful customers

    Gloria Bertini

      Good morning everybody,

      First of all sorry for my English.

      I have a problem to find  new customer for a season and uneventful customers for a season.

      New customer are customer that have do orders in this season but non in the previous two while uneventful customers are customers that do orders in previous season but not in the season in exam.

      The idea is to create a table in script with all the customer and the season in where a customer do an order and than see if a customer have done order in one season but not in previous.

      I do this table:

       

      STAGIONI_DI_ACQUISTO:

      LOAD Distinct

      CodeCustomer,

      CodeSeason;

      SQL SELECT *

      FROM …;  //This table is taken from the file of orders

      left Join

      LOAD

      Code Season,

      IndexSeason,  //a field that give sequence of season

      // ApplyMap('MAPPING_STAGIONI',IndexSeason -1,'MANCA DESCRIZONE') as CodiceStagionePrec1,

      // ApplyMap('MAPPING_STAGIONI', IndexSeason -2,'MANCA DESCRIZONE') as CodiceStagioneLike1;

      SQL SELECT *

      FROM ……; // This table is taken from the file of season

       

      Now I don’t know how to procced to count new customer.

      I tried lot of different way but nothings works.

      Maybe it’s also possible with set analysis, but I don’t know how do this.

      Please help me

      Thanks in advice