| location_id | lat | long | speed |
------------- ------- -------- ---------
101241 0.12 1.1 0.0
------------- ------- -------- ---------
101242 0.12 1.1 0.0
------------- ------- -------- ---------
101243 0.12 1.1 0.0
------------- ------- -------- ---------
101244 1.25 0.74 7.4
------------- ------- -------- ---------
I want to select all locations where speed = 0 and lat && long are same
So from above example answer should be::
| location_id |
--------------
101241
--------------
101242
--------------
101243
--------------
Note:: Speed is constant 0 but lat and long depend on previous rows value