java - How to use the Avg aggrigate function with spring data -


i'm using spring data , java. want calculate average of line in database group statut:

@query( "select new com.app.gsc.entities.nbranomalieparstatut(fm.statut,avg(count(fm.id)) totalnumber) fichedemission fm group fm.statut" ) list<nbranomalieparstatut> getavgmissionparstatut(); 

it's giving me error:

"could not extract resultset; nested exception org.hibernate.exception.genericjdbcexception: not extract resultset" 


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -