You can choose the nearest entry for a given date?
There is a table (with fields id, datetime, sum). Stored date in the format YYYY-m-d H:i:s
In this table many records.
We have the desired sum, we must choose the desired date.
Need to get one to the nearest value on the date (in both directions) containing the desired sum.
Is it possible to rotate by means of the database?