Have a look at this amazing video.
A word of caution. Dogs like very young children drown in swimming pools. And it doesn't just happen to singers or rock stars in their villas in California. Some breeds like retrievers will even jump into the most shallow pools just because their instinct gets the better of common sense. Dogs can fall into pools by accident but more often than not they jump into a pool to catch a ball and then find they cannot get out. Not all pools have shallow ends and dogs are not good at climbing ladders! So keep an eye on your dog if you have a pool or erect a fence around the pool or cover it with a properly fitting cover. And don't say to yourself as many people do: "He/she has to learn." Accidents do happen. Believe me.