Ecclesiastes 6:3 NIV

3 A man may have a hundred children and live many years; yet no matter how long he lives, if he cannot enjoy his prosperity and does not receive proper burial, I say that a stillborn1 child is better off than he.2

References for Ecclesiastes 6:3