Hi I have the following code:
Controller:
@GetMapping("/salesTrend")
private List<Object[]> salesTrend(){
int[] profit = {1,2,3,4,5,6,7,8,9,10,11,12};
return customerRepository.findByProfit(profit);
}
Repository:
@Query(
value = "SELECT MONTH(f_date), SUM(profit) as p from finance where MONTH(f_date) = ?1",
nativeQuery = true)
List<Object[]> findByProfit(int[] profit);
the result of this is null and I am struggling to know why that is because I tested this already on xampp and it works fine I don't know what I'm doing wrong thank you