title: Querydsl - How use group by and sum
body: <p>I'd like to do a query than in sql it's:</p>
  
  <pre><code>SELECT users.id, SUM(total), SUM(total*price) FROM sales INNER JOIN users ON sales.id_user=users.id GROUP BY users.id
  </code></pre>
  
  <p>I tried searching for the solution, but the closest I get was:</p>
  
  <pre><code>QSales sales = QSales.sales;
  JPAQuery query = from(sales);
  QUsers users = QUsers.users;
  query.innerJoin(sales.users, users);
  List&lt;Object[]&gt; response = query.groupBy(sales.user).list(sales.user, sales.total.sum());
  </code></pre>
  
  <p>but i don't know how to get this:</p>
  
  <pre><code>SUM(total*price)
  </code></pre>