1

I have data of this form and I referred to this link pivoting in mongodb:

    Name, SumPrice, type,year 
     A,    50.0,     Retail,2015
     B,    467.0,    Online,2015
     A,    1456.0,   Direct,2015
     B,    1149.53,  Direct,2015
     C,     273.20,  Online,2014
     C,     110.0,   Direct,2014

I want data to be transformed using spring-data-mongodb of this form

     Name ,Retail, Online , Direct, year
      A,     50.0 ,  0.0,    1456.0     2015
      B,     0.0,    467.0,  1149.53,  2015
      C,     0.0,    273.20, 110.0,     2014

Please lemme know how to do.

Regards

kris

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.