From the MGM movie The Wizard of Oz, which premiered in June 1939 but wasn't fully edited. The first "real" showing was in Oconomowoc, Wisconsin (August 12th, 1939).
This song shares its melody with 2 other songs from the film: "If I Only Had a Heart" and "If I Only Had the Nerve".