I have a query: SELECT ID, Name, Distance FROM Station GROUP BY ‘Distance approximation’
In my example, Distance is a double and I would like to group all the elements with the same approximate distance together. For example, element_1 with distance 212 will be in the same group as element_2 with distance 240 but not in the same group as 300 (difference is > 50).
Thanks
Depending on your database, you can group by a function.
So you could do something like (very simple)
You can add in your own functions based on your requirements.