Jabir bin Abdullah reported,

The Prophet ﷺ used to combine two men from those killed at Uhud in a single grave, then he would ask, "Which of them had memorized more of the Quran?" When one of them was indicated, he would place him first in the grave.

Azami 1226

Sahih

عن جابر

أن النبي ﷺ كان يجمع بين الرجلين من قتلى أحد- يعني في القبر- ثم يقول: أيهما أكثر أخذا للقرآن؟ فإذا أشير إلى أحدهما قدمه في اللحد.

الأعظمي 1226صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Knowledge
Chapter
Encouragement to seek knowledge
Section
Encouragement to honor, respect, and revere the scholars
Numbering
Jami al-Kamil 1226 (2nd edition)
Azami 1226