Suppose I have a utc_time column which stores float
value
I want to select utc_time values is approximate to 1402630856
And I can accept the value x,where abs (x-1402630856) < 3
So I should get the first 5 records,
What should I do by Arel or Active Record ? Thanks
+----+------------------+
| id | utc_time |
+----+------------------+
| | 1402630854.99146 |
| | 1402630856.11391 |
| | 1402630856.13342 |
| | 1402630856.13576 |
| | 1402630857.02345 |
| | 1402630876.03702 |
| | 1402630954.7856 |
| | 1402630954.78688 |
| | 1402630954.78814 |
| | 1402630966.06754 |
+----+------------------+