Discount

Is there a way where i can automatically add a discount if people order 3 products form the same category?

Many thanks,

Andy