It wasnarrated that Abu Kabshah Al-Anmari said:
"The Messenger ofAllah(ﷺ) said: 'The likeness of this nation is that of four people:Aman to whom Allah gives wealth and knowledge, so he acts accordingtohis knowledge with regard to his wealth, spending it as it shouldbespent; a man to whom Allah gives knowledge, but he does not givehimwealth, so he says: "If I had been given (wealth) like this one, Iwould have done what (the first man) did." The Messenger of Allah(ﷺ) said: 'They will be equal in reward. And a man to whom Allahgives wealth but does not give knowledge, so he squanders his wealthand spends it in inappropriate ways; and a man to whom Allah givesneither knowledge nor wealth, and he says: "If I had (wealth) likethis one, I would do what (the third man) did." The Messenger ofAllah(ﷺ) said: 'They are equal in their burden (of sin).'"
English reference: Vol. 5, Book 37, Hadith 4228
Arabic reference: Book 37, Hadith 4368