Sunan Abi Dawud, Book 21, Hadith 127 (Abu Dawud 3216)

Narrated Hisham ibn Amir:

The Ansar came to the Messenger of Allah (ﷺ) on the day of Uhud and said: We have been afflicted with wound and fatigue. What do you command us? He said: Dig graves, make them wide, bury two or three in a single grave. He was asked: Which of them should be put first? He replied: The one who knew the Qur'an most. He (Hisham) said: My father Amir died on the day and was buried with two or one.