Ecclesiastes 2:3

2:3 I thought deeply about the effects of indulging myself with wine

(all the while my mind was guiding me with wisdom)

and the effects of behaving foolishly,

so that I might discover what is profitable

for people to do on earth during the few days of their lives.