It was narrated that Abu Kabshah Al-Anmari said:
“The Messenger of Allah (ﷺ) said: ‘The likeness of this nation is that of four people: A man to whom Allah gives wealth and knowledge, so he acts according to his knowledge with regard to his wealth, spending it as it should be spent; a man to whom Allah gives knowledge, but he does not give him wealth, so he says: “If I had been given (wealth) like this one, I would have done what (the first man) did.” The Messenger of Allah (ﷺ) said: ‘They will be equal in reward. And a man to whom Allah gives wealth but does not give knowledge, so he squanders his wealth and spends it in inappropriate ways; and a man to whom Allah gives neither knowledge nor wealth, and he says: “If I had (wealth) like this one, I would do what (the third man) did.” The Messenger of Allah (ﷺ) said: ‘They are equal in their burden (of sin).’”