Having a table with columns 'price' and 'quantity'.
e.g:
rec price qty
1. 10,00 1
2. 7,50 5
3. 5,00 25
4. 3,00 100
I need to select the price for a quantity of 65. This is the price of record 3. Qty 65 is between qty 25 and 100. How to solve this in a sql query?