Subject Re: [ib-support] nested union with group by
Author Claudio Valderrama C.
""maria_ana_ph"" <maria_ana_ph@...> wrote in message
> hello!
> would it be possible for the result set of a nested "union" statement
> be used with "group by" statement?

The way you put it will cause the GROUP BY to affect only the second
sub-select. Create a view and apply the GROUP BY to the view. Also, if you
know the two rowsets are disjointed, use UNION ALL, it's more efficient.

Claudio Valderrama C. - -
Independent developer
Owner of the Interbase® WebRing