Hi MrCat
You are on the right track but instead of grouping the moon to the earth, first group the moon to itself. Set the pivot point of this "moon group" to be in the centre of the earth. This you can use for rotation around the earth. After this group the earth and the "moon group" together and make the new group's pivot point the centre of the sun.
Earth: The crazy asylum of the universe.