how can I get custom data group by enum property with JPQL or Criteria Api in spring data?

I have an enumeration to store Currencies :

public enum Currency {

    USD,EUR,GBP

}

And I have Sales entity that contain currency as a property:

public class Sales {

    private Long id;
    private Merchant merchant;
    private Customer customer;
    private double amount;
    private Currency currency;

}

sample table data for sales is like below :

+----+-------------+-------------+--------+----------+
| id | merchant_id | customer_id | amount | currency |
+----+-------------+-------------+--------+----------+
|  1 |           2 |           3 |  125.0 | EUR      |
|  2 |           1 |           2 |  135.0 | USD      |
|  3 |           3 |           5 |  140.0 | GBP      |
|  4 |           2 |           8 |   25.0 | USD      |
|  5 |           4 |           8 |   95.0 | EUR      |
|  6 |           6 |           9 |   85.0 | EUR      |
|  7 |           5 |           6 |   90.0 | USD      |
|  8 |           1 |           1 |  225.0 | EUR      |
|  9 |           7 |           2 |  350.0 | GBP      |
|  . |           . |           . |      . | .        |
|  . |           . |           . |      . | .        |
|  . |           . |           . |      . | .        |
|  . |           . |           . |      . | .        |
+----+-------------+-------------+--------+----------+

this is my custom data model

    public class CustomDataModel{

      private Integer count; //record count
      private double total; // its total amount for specified currency 
      private Currency currency; //  it also could be String, it is doesn't matter  

}

My query params: merchant_id and customer_id.

I want to get result as List<CustomDataModel> for example :

[  
   {  
      "count":5,
      "total":674.00,
      "currency":"USD"
   },
   {  
      "count":3,
      "total":561.00,
      "currency":"EUR"
   },
   {  
      "count":4,
      "total":715.00,
      "currency":"GBP"
   }
]

is it possible to get result like this. If it is how can i do it?

how can I get custom data group by enum property with JPQL or Criteria Api in spring data?