Hello, Marc-Aurele, thank you for the snippet, but it looks like the sum
usage everywhere in the codebase. It's aggregation over single field. What
I need is to pass multuplication of two fields (cores x speed) inside the
sum, but I don't understand how to do it with dao... Thank you.

10 янв. 2018 г. 19:12 пользователь "Marc-Aurèle Brothier" <ma...@exoscale.ch>
написал:

> Have a look here:
> https://github.com/apache/cloudstack/blob/master/engine/
> schema/src/com/cloud/storage/dao/VolumeDaoImpl.java#L347
>
> Or you can search other example in the code base with this string
> "Func.SUM": thttps://
> github.com/apache/cloudstack/blob/master/engine/schema/src/
> com/cloud/storage/dao/VolumeDaoImpl.java#L347
>
> On Wed, Jan 10, 2018 at 9:42 AM, Ivan Kudryavtsev <
> kudryavtsev...@bw-sw.com>
> wrote:
>
> > Hello, colleagues, please could anyone guide me how to implement
> > aggregation SUM over two fields multiplication? Many thanks in advance.
> >
> > I'm trying to achieve:
> > SELECT SUM(A * B) FROM T with DAO
> >
> >
> >
> > --
> > With best regards, Ivan Kudryavtsev
> > Bitworks Software, Ltd.
> > Cell: +7-923-414-1515
> > WWW: http://bitworks.software/ <http://bw-sw.com/>
> >
>

Reply via email to