{"sql":"SELECT \n v.driver as driver_id,\n u.lastseen,\n v.id,\n v.model,\n c.name AS driver_name,\n l.lat,l.lng,\n t.name AS categorylabel,\n IF(u.lastseen > :onlinetime, 'true', null) as online\nFROM \n vehicles AS v\nJOIN customers AS c ON c.id =v.driver\nJOIN vehicle_categories AS t ON t.id=v.category\nJOIN (SELECT user, max(id) AS id FROM `user_locations` group by user) AS l0 ON l0.user = v.driver\nJOIN users as u on u.id = v.driver\nJOIN user_locations AS l ON l0.id = l.id\nJOIN taxi_drivers AS d ON d.id = v.driver\nWHERE \n d.id = v.driver AND \n u.lastseen IS NOT NULL AND \n u.lastseen > :offlinetime AND\n v.verified = 1 AND\n c.country = :country\nORDER BY online, l.timestamp","input":{"country":"LK","onlinetime":"2025-07-24 03:23:02","offlinetime":"2025-06-27 03:23:02"},"success":true,"data":[{"driver_id":"7843","lastseen":"2025-07-04 12:19:02","id":"3057","model":"Wegan R","driver_name":"Suneth dissanayaka","lat":"6.919417","lng":"79.8547414","categorylabel":"Mini Car","online":null},{"driver_id":"6482","lastseen":"2025-07-24 19:07:41","id":"2381","model":"MG-ZS","driver_name":"Tuan fassir Nisam miskin ","lat":"7.046786","lng":"79.9169666","categorylabel":"SUV","online":"true"}],"count":2}