"GROUP BY" bug

migrate GROUP BY from view definition to SELECT from view
(vw_stat, vw_cachedir)