I use JPA data Mongo DB and crudrepository, Now I need a method to calculate median. This is the main method which I need to get a median price.
findByDateBetweenAndInstrumentIdOrderByPriceDesc
Is it possible throw defined words in JPA?
I use JPA data Mongo DB and crudrepository, Now I need a method to calculate median. This is the main method which I need to get a median price.
findByDateBetweenAndInstrumentIdOrderByPriceDesc
Is it possible throw defined words in JPA?
No that's not possible.
You have to use Mongo aggregation framework: