Sunan an-Nasa'i #1986 · The Book of Funerals

Sunan an-Nasa'iIt was narrated from Abu Ibrahim Al-Ansari
Sunan an-Nasa'i · Book 21 · The Book of Funerals
Sunan an-Nasa'i · كتاب 21 · كتاب الجنائز
he heard the Prophet say, when offering the funeral prayer for one who had died: Allahummighfir lihayyina wa mayyitina wa shahidina wa gha'ibina wadhakarina wa unthana wa saghirina wa kabirina (O Allah, forgive our living and our dead, those who are present among us and those who are absent, our males and our females, our young and our old)
أَخْبَرَنَا إِسْمَاعِيلُ بْنُ مَسْعُودٍ، قَالَ حَدَّثَنَا يَزِيدُ، - وَهُوَ ابْنُ زُرَيْعٍ - قَالَ حَدَّثَنَا هِشَامُ بْنُ أَبِي عَبْدِ اللَّهِ، عَنْ يَحْيَى بْنِ أَبِي كَثِيرٍ، عَنْ أَبِي إِبْرَاهِيمَ الأَنْصَارِيِّ، عَنْ أَبِيهِ، أَنَّهُ سَمِعَ النَّبِيَّ صلى الله عليه وسلم يَقُولُ فِي الصَّلاَةِ عَلَى الْمَيِّتِ ‏
"‏ اللَّهُمَّ اغْفِرْ لِحَيِّنَا وَمَيِّتِنَا وَشَاهِدِنَا وَغَائِبِنَا وَذَكَرِنَا وَأُنْثَانَا وَصَغِيرِنَا وَكَبِيرِنَا ‏"‏ ‏.‏
Reference : Sunan an-Nasa'i 1986In-book reference : Book 21, Hadith 169