I am trying to add the following query to the JPA repository @Query
"select st from Strategy st where st.unId= ?1 order by ( st.totalMargin / st.totalRevenue ) desc"
However, this query does not parse due to the "(" brackets in the query.
The error thrown while bean initialization is
Caused by: <openjpa-2.2.2-r422266:1468616 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: "Encountered "(" at
Is there any way this can be achieved in @Query ?