Fetch node by aggregation function on attribute

Author Message

Jan Komárek

Friday 05 December 2008 2:17:53 am

Hello,

I need to fetch node with highest value of attribute. In SQL qouery its easy

SELECT MAX(attribute) as whatever FROM ... 

But I have no idea how to do this in template functions or operators.

Thank you very much for your answer.

Ivo Lukac

Friday 05 December 2008 2:40:46 am

Hello Jan,

Did you try to fetch list function with sorting by this attribute and limit 1?

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.