Check out example codes for "sqlite closes value". It will help you in understanding the concepts better.

Code Example 1

SELECT * FROM table
ORDER BY ABS(value_to_compare - column.field)

Learn ReactJs, React Native from akashmittal.com