Here is a MySQL table, which has three rows.
ram cpu
1 2
4 8
8 16
if I give input as ram=7 and cpu=9,
the query has to smartly select the closest row based on the two input values and return me a single row.
example result which I expect for 7,9 combination:
ram cpu
4 8
is this possible to achieve?
Consider me having thousands of combinations like this. I need a query that always smartly returns a single row.