<div dir="ltr">I agree with all of you about not reinventing the wheel and, yes, let's not fragment QGIS' capabilities on data querying/filtering/etc.<div>My first idea was simply (but I'm not sure how much simple it is) to be able to perform aggregate queries like in WINDOW functions. In my job it's something I find very useful, and I would like not to have to export my layers to a PostGIS DB just to do it.</div>
<div><br></div><div>Some basic examples:</div><div><br></div><div> - get the average area of some polygon features</div><div> - get the relative dimension against some other feature's dimensions</div><div> - etc.</div>
<div><br></div><div>AFAIK these kind of queries cannot be run on Sqlite in one single shot. This is why I wasn't thinking to Sqlite (or SQL anyway) to implement it, but as an extension to expression engine, in a MapReduce pattern perspective...</div>
<div><br></div><div>giovanni</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-27 15:03 GMT+02:00 Régis Haubourg <span dir="ltr"><<a href="mailto:regis.haubourg@eau-adour-garonne.fr" target="_blank">regis.haubourg@eau-adour-garonne.fr</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hugo Mercier wrote<br>
<div class="">> Or<br>
>> calculated fields in view can't be explicitly cast, so QGIS should have<br>
>> to<br>
>> guess data type based on a data scan (a major unadressed issue of sqlite)<br>
><br>
> Hmmm I wasn't aware of this limitation in SQLITE views :(<br>
<br>
</div>Yes, SQLITE does dynamic typing, so user or provider has to scan values to<br>
guess the right type.<br>
Here is a sqlite topic on that [0]<br>
And here my initial post in qgis list [1]<br>
<br>
[0]<br>
<a href="http://sqlite.1065341.n5.nabble.com/Computed-columns-in-VIEWs-return-NULL-but-should-be-able-to-be-typed-Any-ideas-td56769.html#a56770" target="_blank">http://sqlite.1065341.n5.nabble.com/Computed-columns-in-VIEWs-return-NULL-but-should-be-able-to-be-typed-Any-ideas-td56769.html#a56770</a><br>

<br>
[1]<br>
<a href="http://osgeo-org.1560.x6.nabble.com/Spatialite-can-t-type-fields-of-a-view-td5058436.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/Spatialite-can-t-type-fields-of-a-view-td5058436.html</a><br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/have-aggregate-window-expressions-ever-been-discussed-tp5142215p5142714.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/have-aggregate-window-expressions-ever-been-discussed-tp5142215p5142714.html</a><br>

<div class="im HOEnZb">Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Giovanni Allegri<br><a href="http://about.me/giovanniallegri" target="_blank">http://about.me/giovanniallegri</a><div>Twitter: <a href="https://twitter.com/_giohappy_" target="_blank">https://twitter.com/_giohappy_</a></div>
<div>blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a></div></div>
</div>