Handling empty grouping-type results