Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Identifying stale data within a time series table

$
0
0

Hello. I am trying to create a query in order to identify stale price data from a table in sqlserver.

I have a table with the following columns.

1) effective date

2) product ID

3) product Name

4) Price

Every single day a new record is inserted into this table for all active products. So on a daily basis the new record contains the current date as the effective date and a new price. I want to create a query which will help me identify all products for which the price has not changed (is stale) between t-1 and t-2.

Any assistance / guidance would be greatly appreciated.


Viewing all articles
Browse latest Browse all 23857

Trending Articles