كتاب فضائل الصحابة رضى الله تعالى عنهم
44  
The Book of the Merits of the Companions
(52)
Chapter: The Virtues Of the Sahabah, Then Those Who Come After Them, Then Those Who Come After Them
(52)
باب فَضْلِ الصَّحَابَةِ ثُمَّ الَّذِينَ يَلُونَهُمْ ثُمَّ الَّذِينَ يَلُونَهُمْ ‏‏
Sahih Muslim 2536

'A'isha reported that a person asked Allah's Apostle (ﷺ) as to who amongst the people were the best. He said:

Of the generation to which I belong, then of the second generation (generation adjacent to my generation), then of the third generation (generation adjacent to the second generation).
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَشُجَاعُ بْنُ مَخْلَدٍ، - وَاللَّفْظُ لأَبِي بَكْرٍ - قَالاَ حَدَّثَنَا حُسَيْنٌ، - وَهُوَ ابْنُ عَلِيٍّ الْجُعْفِيُّ - عَنْ زَائِدَةَ، عَنِ السُّدِّيِّ، عَنْ عَبْدِ اللَّهِ الْبَهِيِّ، عَنْ عَائِشَةَ، قَالَتْ سَأَلَ رَجُلٌ النَّبِيَّ صلى الله عليه وسلم أَىُّ النَّاسِ خَيْرٌ قَالَ ‏ "‏ الْقَرْنُ الَّذِي أَنَا فِيهِ ثُمَّ الثَّانِي ثُمَّ الثَّالِثُ ‏"‏ ‏.‏
Reference : Sahih Muslim 2536
In-book reference : Book 44, Hadith 307
USC-MSA web (English) reference : Book 31, Hadith 6159
  (deprecated numbering scheme)