Given a table of data with bitemporal modeling, where there are 2 dates: (i) the date that the data applies to, and (ii) the date at which the fact was known. What SQL query will give the latest snapshot of the data date based on the As_of_Datetime? e.g. Answer
Tag: bi-temporal
Bi-temporal SQL table querying
I’m trying to model a SQL table to store salary changes for employees. One approach is using a bi-temporal table as follows: Here an employee was hired on 10/1/2015 with salary of 100,000. Then on 2/15/2016 he had a performance review and his boss said, “we’re bumping your salary to 110,000 effective start of current year (1/1/2016). To store this