1
I am developing a system and I need to perform a select to fetch the % rate a customer will have.
First I check what % of this customer’s cheque refund and look in another table what the predefined rate he will be entitled from this % refund.
An example of a record in the table I need to search for:
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 if the % of the customer’s return is between 0% and 2% need to take the proposed tax and taxe_discount ID 1 and if it is between 2,01% to 4,00% need to take the values of ID 2.