Yardi Systems Interview Question

can you use group by with union?