Thank you for your response Giang.
I read the documentation before.
The issue is that there should be group with discounts, and the higher one for each product should be taken into account. Also, the user should be assigned to the group if he will purchase the specific product, right now a user can be assigned only to one group, and not after purchase, but after registration or by admin, so it seems that it's not possible to achieve such functionality?
For example if my customer will purchase a product for $500 I want to give him smaller products which are normally for $50 with a discount let's say 20%, so it would be $40 for him. If the user will purchase a product for $50 I don't want to give him 5% for other small products, but not for the big one. But for example if I would have $1000 product, and the client would purchase $500 and $1000, then I would give him higher discount let's say 40% for any other small products, so instead of $50 he could pay $30. In the present system, it's not possible due to one customer group per user, and the group is not assigned after product purchase.
I would appreciate such implementation, as the store is for selling, which is better with proper marketing and loyalty features.