Compare two SQL queries with different timing structure

Hello all,

I have two SQL querries from 2 different database sources, in the following format:

QueryA:

  • TimeStamp
  • Value

QueryB:

  • SessionStartTime
  • SessionEndTime
  • Value

I want to check, for each point in time of A, if “Value” was conform to the one in the sessioin of B running at the time of TimeStampA (by substracting these values for instance and setting up an alarm when =/= 0)

Do you have any idea how to do this?

Regards,