Is there any possibility of using the avg() function excluding zeroes?
I know there is a funciton excludeZeroes() but using Criteria example.
I have this hql:
Code:
"select competitorAnalyse.competitor.id,competitorAnalyse.competitor.name,avg(qualiScore.value),avg(quantiScore.value) from " + Opportunity.class.getName() + " as opp inner join opp.competitorAnalyses competitorAnalyse inner join competitorAnalyse.qualitativeScores qualiScore inner join competitorAnalyse.quantitativeScores quantiScore where opp.id = :id group by competitorAnalyse.competitor.id,competitorAnalyse.competitor.name "
and I would like to ignore the qualiScore.value and quantiScore.value values of 0
Any ideas? Pleaase help me