Ibn Jurayj (may Allah have mercy on him) said: I said to Ata (may Allah have mercy on him): If the smell of drink comes from someone, would you flog him? He said: The smell of drink is nothing; but if they all drank something together and even one of them became intoxicated from it, I would give them all the full prescribed punishment.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأشربة والحد فيها / 17514