Abu Hurairah (May Allah be pleased with him) reported:
The Messenger of Allah (ﷺ) said, "Whosoever attends the funeral of a Muslim believing and hoping for the reward from Allah and remains with it until the prayer is offered over it and the burial is completed, he will return with a reward of two Qirat; each Qirat is equivalent to Mount Uhud; and whosoever offers his prayer over it and returns before its burial, he will come back with one Qirat."[Al- Bukhari].
App reference: Book 7, Hadith 37
Arabic/English book reference: Book 7, Hadith 930