Subject Re: [firebird-support] Conditional grouping?
Author Ann W. Harrison
Rick Debay wrote:

> I need to sum quantities based on these columns (GPI, TEE, UNIT_DOSE),
> but also on an additional column (DOSE_SIZE) if one of first set
> (UNIT_DOSE) meets certain criteria.
>
> The only thing I could come up with is to do two queries, union them,
> and then sum that.

I think you've hit on the best solution. Conditional grouping doesn't
sound familiar - even from the most ambitious recent SQL standard.


Regards,


Ann