I'm developing a system and I need to perform a select to fetch the% rate a customer will have.
First, I check the% of this customer's return checks and I look for another pre-set rate that will be entitled to this return rate in another table.
An example of a record in the table that I need to fetch:
id | descricao | per_min | per_max | taxa_proposta | taxa_desconto
1 | De 0,00% a 2,00% | 0.00 | 2.00 | 100.00 | 0.75
2 | De 2,01% a 4,00% | 2.01 | 4.00 | 73.40 | 0.55
Or even when the customer's% return is between 0% and 2%, I need to get the proposal_tax and discount_tax of ID 1 and if it is between 2.01% and 4.00%, I need to get the values of ID 2.