Entity engine, sql functions: MAX() MIN() AVG() and etc.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Entity engine, sql functions: MAX() MIN() AVG() and etc.

biletnikov
Hello,
is it possible to use the sql functions : MAX()  MIN() AVG() and etc. via the entity engine?
And how to do that?

Thanks.
Kind regards,
Sergei
Reply | Threaded
Open this post in threaded view
|

Re: Entity engine, sql functions: MAX() MIN() AVG() and etc.

Rishi Solanki
Look into the entitymodel.xml view entities.
You will see the alias entity-alias="" name="" and function="avg or count or
max or min or sum".
For this you need to set the flag group-by="true" on field for which you
want to see the max or min or avg. so that it will work on that set only.

HTH!

Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxmedia.com


On Tue, Aug 2, 2011 at 3:24 PM, biletnikov <[hidden email]> wrote:

> Hello,
> is it possible to use the sql functions : MAX()  MIN() AVG() and etc. via
> the entity engine?
> And how to do that?
>
> Thanks.
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Entity-engine-sql-functions-MAX-MIN-AVG-and-etc-tp3711848p3711848.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Entity engine, sql functions: MAX() MIN() AVG() and etc.

biletnikov
Thank you very much.

On Fri, Aug 5, 2011 at 11:41 AM, Rishi Solanki [via OFBiz] <[hidden email]> wrote:
Look into the entitymodel.xml view entities.
You will see the alias entity-alias="" name="" and function="avg or count or
max or min or sum".
For this you need to set the flag group-by="true" on field for which you
want to see the max or min or avg. so that it will work on that set only.

HTH!

Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: <a href="tel:%2B91-9893287847" value="+919893287847" target="_blank">+91-9893287847
http://www.hotwaxmedia.com


On Tue, Aug 2, 2011 at 3:24 PM, biletnikov <[hidden email]> wrote:

> Hello,
> is it possible to use the sql functions : MAX()  MIN() AVG() and etc. via
> the entity engine?
> And how to do that?
>
> Thanks.
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Entity-engine-sql-functions-MAX-MIN-AVG-and-etc-tp3711848p3711848.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>



If you reply to this email, your message will be added to the discussion below:
http://ofbiz.135035.n4.nabble.com/Entity-engine-sql-functions-MAX-MIN-AVG-and-etc-tp3711848p3720708.html
To unsubscribe from Entity engine, sql functions: MAX() MIN() AVG() and etc., click here.



--
Best regards,
Sergei Biletnikov
Kind regards,
Sergei