It was supposed to cater for the case where `group_by` is empty but `keys` is not but this seems like a silly use case. Perhaps I'll add some sanity checks into the query builder instead.