id_discount count_orders percent_discount
1 5 1,5
2 10 2,5
id_client Name Surname
1 Ivan Petrov
2 Vasya Vasev
id order_sum
select
Discount.percent_discount
from
Discount
where
(select count(Orders.id_client) where id_client = ...) BETWEEN Discount.count_orders_min AND Discount.count_orders_max