Amazon interview question

Write SQL to Find groups having exactly three different tags.