<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi,</p>
<p>Yes, the use cases that triggered this project are:</p>
<ul>
<li><span style="font-size: 10pt;">print composer</span></li>
<li><span style="font-size: 10pt;">atlas printing</span></li>
<li><span style="font-size: 10pt;">tables and forms (virtual fields): aggregates on related tables (e.g. show all owners of a parcel, or the count or mean age of all trees in a parcel)</span></li>
</ul>
<p>Who knows, it could even be useful in labelling, symbology, etc. - e.g. using the above example with the trees: color the parcels based on the mean age of all trees in the parcels.</p>
<p>I guess there are many more use cases we don't even think about currently.</p>
<p>Andreas</p>
<p>On 2016-03-16 09:21, Nyall Dawson wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">On 16 March 2016 at 19:15, Hugo Mercier <<a href="mailto:hugo.mercier@oslandia.com">hugo.mercier@oslandia.com</a>> wrote:
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">Hi,<br /><br /> Just for me to understand: why not considering improving a bit the<br /> virtual layers ?<br /><br /> There is already a support for user defined aggregate functions. Caching<br /> of the computed aggregate is already done by the engine (I guess). And<br /> we could add some functions to restrict the query to the selected<br /> features of a layer or deal with relations ...<br /><br /> And using something like the "query builder" found in db manager (and<br /> inspired by mapinfo), it may ease to deal with the SQL syntax ...</blockquote>
<br /> I think the use case is quite different. Having aggregates in<br /> expressions is useful for things like embedding the values in<br /> composers and atlas prints, or in data defined overrides.<br /><br /> Nyall<br /><br /><br /></div>
</blockquote>
<div> </div>
</body></html>