execute failed: SELECT t.TabID, t.Title, t.Ordinal, COUNT(*) AS cnt FROM mm_tabs t JOIN vwmenu d ON d._tabid = t.TabID GROUP BY t.TabID, t.Title, t.Ordinal UNION ALL SELECT 0, 'All', 0, COUNT(*) FROM vwmenu ORDER BY Ordinal ;