i have some problem with left join JPQL
<p>there is something wrong with ths way i use left join,
and i dont understand what am i doing wrong.</p>

<p>can you see it?</p>

<pre><code>select distinct r.globalRuleId,
       r.ruleId,                                                     
       sv.validFrom,
       pm.moduleId,
       nvl(min(rai.failedOnRegistration),0)

from TRules r,
     TSlaVersions sv, 
     TModuleFormulas mv, 
     TPendingModule pm,
     left join TRulesAdditionalInfo rai on r.ruleId = rai.ruleId

where r.slaVersionId = sv.slaVersionId
      and r.formulaId = mv.pk.formulaId
      and mv.pk.moduleId = pm.moduleId

group by r.globalRuleId,
         r.ruleId,                                                     
         sv.validFrom,
         pm.moduleId

order by pm.moduleId
</code></pre>
