Subject | Re: [firebird-support] PSQL: Getting both aggregation and individual rows |
---|---|
Author | Josef Kokeš |
Post date | 2014-10-27T11:35:46Z |
On 27.10.2014 10:35, Svein Erling Tysvær
svein.erling.tysvaer@... [firebird-support] wrote:
two recordsets. The temp-table approach satisfies my needs nicely, but I
was hoping there is a more elegant solution.
different data (think a random number generator).
Josef
svein.erling.tysvaer@... [firebird-support] wrote:
>I don't mind going through the recordset twice, but I do mind creating
>
>>Hi!
>>
>> I tried this approach before, but it violates my "only run GET_DATA
>>once" requirement :-(
>
> Well, with EXECUTE BLOCK and ORDER BY it may be possible to satisfy your
> MIN requirement, but I can't logically understand how it even
> theoretically wold be possible to know the SUM before having gone
> through all records. Window functions in Fb 3 is probably the best
two recordsets. The temp-table approach satisfies my needs nicely, but I
was hoping there is a more elegant solution.
> Not that I think it matters too much, I assume the first pass to be moreIt's not a matter of time. The second pass would generate completely
> costly than the second. Have you measured how much more time is required
different data (think a random number generator).
Josef