On 28-9-2018 20:14, Adriano dos Santos Fernandes wrote:
On 28/09/2018 15:04, Leyne, Sean wrote:
-----Original Message-----
From: Adriano dos Santos Fernandes <adrian...@gmail.com>
Sent: Friday, September 28, 2018 1:55 PM
To: firebird-devel@lists.sourceforge.net
Subject: Re: [Firebird-devel] User-defined aggregate functions
On 28/09/2018 14:35, Leyne, Sean wrote:
How would this work within a GROUP BY context?
I see how it works within a flat list, but when there are intermediate levels, I
don't see this working.
Engine does all the work for groups.
Each group makes the function start - suspend (n times) - finish.
So if there are 3 GROUP levels, each function would be called 3 times, one for
each level?
If by "group level" you mean the "group key", yes.
Each time the group key changes, the function will be executed again.
Within the group rows (or window partition), SUSPEND is used to feed
input and produce result.
Maybe Sean is talking about SQL standard grouping sets which Firebird
doesn't support yet.
Mark
--
Mark Rotteveel
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel