Not only did Jesus set the example by personally being baptized, He also baptized more disciples than John the Baptist did.
So, Jesus set the example in this way as well, in that He had His disciples do the actual baptizing under His authority. He did not actually do the physical work of baptizing these people Himself—He had His disciples do it for Him! And what they did, by His authority and command is attributed to Him! So it was considered as if Jesus Himself had baptized them. It is the same today that when a minister of God baptizes someone, it is by the authority of Jesus Christ.
His disciples did the baptizing in His name—that is, in His place—they did it for Him, by His authority, and that was considered the same thing as if Jesus had actually done it Himself.