Subject Re: [firebird-support] Problem with 'UNION ALL'
Author Dimitry Sibiryakov
> SELECT 'OBJE' AS type, COUNT(*) AS num FROM pgv_media WHERE m_gedfile=1
> GROUP BY type
> I'm only getting 4 results rather than the 5 expected, and strapping a
> SELECT type, num FROM () around it does not help.

It is simple: your "group by" affects not UNION as whole, but only to
the last query, causing it to return no rows. Perhaps, there is no
records with m_gedfile=1 in pgv_media.