 <p>From what I understood from your problem, you seem to have OneToMany relationships in this manner:</p> <pre><code>public class Project { ... @OneToMany List&lt;Expense&gt; expenses; @OneToMany List&lt;Income&gt; incomes; ... } </code></pre> <p>Lets suppose your database structure is like this;</p> <p><strong>Project</strong></p> <pre><code>id name 1 helloWorld </code></pre> <p><strong>project_income</strong></p> <pre><code>proj_id income_id 1 1 </code></pre> <p><strong>project_expense</strong></p> <pre><code>proj_id expense_id 1 1 1 2 </code></pre> <p><strong>income</strong></p> <pre><code>id amount 1 200 </code></pre> <p><strong>expense</strong></p> <pre><code>id amount 1 500 2 600 </code></pre> <p>Your query produces result in this manner</p> <pre><code>proj_id proj_name income_id income_amount expense_id expense_amount 1 helloWorld 1 200 1 500 1 helloWorld 1 200 2 600 </code></pre> <p>and so when you sum <code>incomeAmount</code> and <code>expenseAmount</code>, you get a result like this:</p> <pre><code>proj_id proj_name sum(income_amount) sum(expense_amount) 1 helloWorld 400 1100 </code></pre> <p>Because of this, when you sum <code>incomeAmount</code> and <code>expenseAmount</code>, you (sometimes) get double or triple values. Its the nature of join statements. You may wanna take a look as to what is inner and outer joins and how do they produce results.</p> <p>To get the desired results, one (one of the many available) solution is that you can use multiple select statements as shown below:</p> <pre><code>Query query = session.createQuery( "select p.projectId, " + "p.projectName, " + "(select sum(i.incomeAmount) from Income i where i.incomeProject = p), " + "(select sum(e.expenseAmount) from Expense e where e.expenseProject = p), " + "from Project as p" + "group by p.projectId, pi.investorId ") .setFirstResult(firstResult) .setMaxResults(maxResult); </code></pre> <p><strong>Output:</strong></p> <pre><code>proj_id proj_name sum(income_amount) sum(expense_amount) 1 helloWorld 200 1100 </code></pre> <p>I hope it helps.</p>