The Messenger of Allah ﷺ made a brotherhood between two men, one of whom was killed (in Allah's path), and a week or thereabouts later the other died, and we prayed at his funeral). The Messenger of Allah ﷺ asked: What did you say? We replied: We prayed for him and said: O Allah, forgive him, and join him to his companion. The Messenger of Allah ﷺ said: What about his prayers since the time the other died, and his fasting since the time the other died--the narrator Shu'bah doubted the words, "his fasting--and his deeds since the time the other died. The distance between them is just like the distance between heaven and earth. (Using translation from Abū Dāʾūd 2524)
آخَى رَسُولُ اللهِ ﷺ بَيْنَ رَجُلَيْنِ فَقُتِلَ أَحَدُهُمَا وَمَاتَ الْآخَرُ بَعْدَهُ فَصَلَّيْنَا عَلَيْهِ فَقَالَ رَسُولُ اللهِ ﷺ مَا قُلْتُمْ؟ قَالُوا دَعَوْنَا لَهُ أَنْ يَغْفِرَ لَهُ وَأَنْ يَرْحَمَهُ وَأَنْ يُلْحِقَهُ بِصَاحِبِهِ فَقَالَ رَسُولُ اللهِ ﷺ فَأَيْنَ صَلَاتُهُ بَعْدَ صَلَاتِهِ وَعَمَلُهُ بَعْدَ عَمَلِهِ أَوْ صِيَامُهُ بَعْدَ صِيَامِهِ؟ قَالَ إِنَّ مَا بَيْنَهُمَا كَمَا بَيْنَ السَّمَاءِ وَالْأَرْضِ