So for ...
@SqlSelect( name="default", query="select order_id, sum(order_qty*unit_price) as total_amount from o_order_detail group by order_id" ),
... totalAmount if used in having clause should translate to:
sum(order_qty*unit_price)
List<OrderReport> list = Ebean.find(OrderReport.class) .having().gt("totalAmount", 20.50) .findList();
select order_id, sum(order_qty*unit_price) as total_amount from o_order_detail group by order_id having sum(order_qty*unit_price) > ?
Note: Should generate "having sum(order_qty*unit_price)" and instead generates "having total_amount" ... and we can't use the column alias.