From Wikipedia:
It was said in late lore that Hera or Ares sent the Sphinx from her Ethiopian homeland (the Greeks always remembered the foreign origin of the Sphinx) to Thebes in Greece where she asks all passersby the most famous riddle in history: “Which creature in the morning goes on four legs, at mid-day on two, and in the evening upon three, and the more legs it has, the weaker it be?” She strangled and devoured anyone unable to answer. Oedipus solved the riddle by answering: Man—who crawls on all fours as a baby, then walks on two feet as an adult, and then walks with a cane in old age.
From Wikipedia: It was said in late lore that Hera or Ares sent the Sphinx from her Ethiopian homeland (the Greeks always remembered the foreign origin of the Sphinx) to Thebes in Greece where she asks all passersby the most famous riddle in history: “Which creature in the morning goes on four legs, at mid-day on two, and in the evening upon three, and the more legs it has, the weaker it be?” She strangled and devoured anyone unable to answer. Oedipus solved the riddle by answering: Man—who crawls on all fours as a baby, then walks on two feet as an adult, and then walks with a cane in old age.