SELECT *
FROM dataset
WHERE TRUE
[[AND LOWER(store) LIKE CONCAT('%',LOWER({{store}}),'%')]]
[[AND CAST({{pending_lower_limit}} AS TIME) <= pending_time]]
[[AND CAST({{picking_lower_limit}} AS TIME) <= picking_time]]
[[AND CAST({{ready_lower_limit}} AS TIME) <= ready_time]]
[[AND CAST({{on_trip_lower_limit}} AS TIME) <= on_trip_time]]
[[AND CAST({{delivery_lower_limit}} AS TIME) <= delivery_time]]
[[AND CAST({{overall_lower_limit}} AS TIME) <= overall_time]]
When I run the above query the first two filters and the last filter works perfectly fine, However, all other filter have the same proplem; They DO filter with the records satisfying the condition but they show a wrong value that is then fixed for the whole column I am filtering on.
Any body faced similar problem or have any idea if there is anything wrong in my query?