How can I write the sql query select sum(amount * direction) from transactions into hibernate criteria ?
select sum(amount * direction) from transactions