Abdullah bin Umar reported,

May Allah be pleased with them both. A young boy was killed by stealth, and Umar said, "If the whole population of Sanaa had taken part in it, I would have had them all put to death."Mughirah bin Hakeem reported from his father that four men killed a child, and Umar said the same thing.Abu Bakr, Ibn Zubayr, Ali, and Suwayd bin Muqarin all granted retaliation for a slap. Umar granted retaliation for a blow with a whip. Ali granted retaliation for three lashes. And Shurayh imposed retribution for a lash and for scratches.

Bukhari 6896

Sahih

وقال لي ابن بشار حدثنا يحيى، عن عبيد الله، عن نافع،

عن ابن عمر

رضى الله عنهما أن غلاما، قتل غيلة فقال عمر لو اشترك فيها أهل صنعاء لقتلتهم. وقال مغيرة بن حكيم عن أبيه إن أربعة قتلوا صبيا فقال عمر مثله. وأقاد أبو بكر وابن الزبير وعلي وسويد بن مقرن من لطمة. وأقاد عمر من ضربة بالدرة. وأقاد علي من ثلاثة أسواط. واقتص شريح من سوط وخموش.

البخاري 6896صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Blood money
Chapter
If a group wrongs a man, are they all punished or is retaliation taken from all of them
Numbering
Darussalam 6896
Bukhari 6896