The Prophet ﷺ said, "Let those of you who possess wisdom and understanding stand closest to me, then those who come after them, then those who come after them. Do not differ among yourselves, lest your hearts differ. And beware of the clamor of the marketplaces."
حدثنا نصر بن علي الجهضمي حدثنا يزيد بن زريع حدثنا خالد الحذاء عن أبي معشر عن إبراهيم عن علقمة
عن النبي ﷺ قال ليليني منكم أولو الأحلام والنهى ثم الذين يلونهم ثم الذين يلونهم ولا تختلفوا فتختلف قلوبكم وإياكم وهيشات الأسواق
Muslim also narrated it, in the Book of Prayer, chapter on straightening and establishing the rows...etc, hadith no. 432, from the hadith of Yazid bin Zuray with the same wording.This subject is also narrated on the authority of Ubayy bin Kaab [Nasai, no. 809], Abu Masud [Muslim, no. 432], Abu Saeed [Muslim, no. 438], Bara [Ahmad 4/296, and Hakim 1/573] 4/296, and Anas [Ibn Majah, no. 977], that he loved to have the emigrants and the helpers stand next to him.