Sunan an-Nasa'i
It was narrated that Abu Sa'eed said: "The Messenger of Allah (ﷺ) said: 'When you see a funeral, stand up, and whoever follows it, let him not sit down until (the body) is placed (in the grave)."
أَخْبَرَنَا عَلِيُّ بْنُ حُجْرٍ، قَالَ حَدَّثَنَا إِسْمَاعِيلُ، عَنْ هِشَامٍ، ح وَأَخْبَرَنَا إِسْمَاعِيلُ بْنُ مَسْعُودٍ، قَالَ حَدَّثَنَا خَالِدٌ، قَالَ حَدَّثَنَا هِشَامٌ، عَنْ يَحْيَى، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي سَعِيدٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " إِذَا رَأَيْتُمُ الْجَنَازَةَ فَقُومُوا فَمَنْ تَبِعَهَا فَلاَ يَقْعُدْ حَتَّى تُوضَعَ " .
Grade: Sahih (Darussalam)
Reference