I was wondering why towns.name and addresses.name are successfully selected with only one group by criteria in the first example , while in the second example it gives me a