• If you have two different conditions like am.time <= and am.time>= then better to write if else statement and copy paste your query with required modifications.

    I am not able to help you as I still could not understand your requirement.

    Sorry 🙁