[Qgis-developer] Aggregates within expression engine
Paolo Cavallini
cavallini at faunalia.it
Wed Mar 16 00:11:34 PDT 2016
Hi Nyall,
Il 16/03/2016 07:17, Nyall Dawson ha scritto:
> I'm also torn regarding the best syntax to use for aggregates within
> expressions. I'm unsure if the traditional SQL "group by" clauses
> would be a good fit within the existing QGIS expression syntax (eg
> "sum("some_field") group by "some_other_field"). To me it doesn't fit
> with the existing functional approach that the expressions take. But
> on the other hand, trying to implement this as functions would result
> in some very clumsy expressions: "aggregate('sum', "some_field",
> "some_other_field")" or "sum("some_field", "some_other_field") ". Has
> anyone got any other ideas for syntax which would be a good fit?
Good news, thanks for sharing.
IMHO having a syntax that is easy to use for the average user is a
crucial point. I think using SQL is a no go. Why not using the
spreadsheet syntax? Not that I find it particularly attractive, but at
least everybody is more or less familiar with it.
All the best.
--
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
More information about the Qgis-developer
mailing list