Jabir bin Abdullah reported,

The Messenger of Allah ﷺ would wrap two of the slain at Uhud together in a single garment, then ask, "Which of them had memorized more of the Quran?" When one of them was indicated to him, he would place that one first in the grave.He said, "I am a witness over these men."He ordered that they be buried in their blood, and he did not perform the funeral prayer over them, nor did he wash their bodies.

Azami 3807

Sahih

عن جابر بن عبد الله

أن رسول الله ﷺ كان يجمع بين الرجلين من قتلى أحد في ثوب واحد، ثم يقول: أيهم أكثر أخذا للقرآن؟ فإذا أشير له إلى أحدهما قدمه في اللحد، وقال: أنا شهيد على هؤلاء وأمر بدفنهم بدمائهم، ولم يصل عليهم ولم يغسلهم.

الأعظمي 3807صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Graves
Section
Burying a group in one grave, giving precedence to the one who knows more Quran, and the story of Hamza the uncle of the Prophet ﷺ
Numbering
Jami al-Kamil 3807 (2nd edition)
Azami 3807