The Messenger of Allah ﷺ said, "A man's prayer in congregation is twenty-five degrees superior to his prayer at home or in his marketplace. This is because when one of you performs ablution thoroughly, then heads to the mosque seeking nothing but the prayer and driven by nothing but the prayer, he does not take a single step without being raised one degree by it and having a sin erased from him by it, until he enters the mosque. Once he enters the mosque, he is in a state of prayer for as long as the prayer is what keeps him there, and the angels send blessings upon any one of you as long as he remains in the place where he prayed, saying, 'Allah, forgive him. Allah, have mercy on him. Allah, accept his repentance,' so long as he does not cause harm there or break his ablution there."
حدثنا مسدد حدثنا أبو معاوية عن الأعمش عن أبي صالح
قال رسول الله ﷺ صلاة الرجل في جماعة تزيد على صلاته في بيته وصلاته في سوقه خمسا وعشرين درجة وذلك بأن أحدكم إذا توضأ فأحسن الوضوء وأتى المسجد لا يريد إلا الصلاة ولا ينهزه إلا الصلاة لم يخط خطوة إلا رفع له بها درجة وحط عنه بها خطيئة حتى يدخل المسجد فإذا دخل المسجد كان في صلاة ما كانت الصلاة هي تحبسه والملائكة يصلون على أحدكم ما دام في مجلسه الذي صلى فيه ويقولون اللهم اغفر له اللهم ارحمه اللهم تب عليه ما لم يؤذ فيه أو يحدث فيه
Bukhari narrated it in the Book of Prayer, Chapter on Praying in the Masjid of the Market, hadith no. 477, from Musaddad through this chain. Muslim also narrated it in the Book of Masjids, Chapter on the Virtue of Praying the Obligatory Prayer in Congregation and Waiting for the Prayer... etc., hadith no. 649, from the hadith of Abu Muawiya al-Darir through this chain.