Subject Re: [ib-support] nested union with group by
Author Claudio Valderrama C.
""maria_ana_ph"" <maria_ana_ph@...> wrote in message
news:a9e10e+mnaq@......
> 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.

C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing