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

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -