上午, 这类似于一个问题,我问昨天[提问]:SQL query to get latest prices, depending on the date一览表中没有更新在过去的24小时
我需要返回其尚未更新ASIN的列表在从最低价格表上次更新日起24小时内。我可以得到ASIN的列表,但是它会返回所有这些列表。请有人请求帮助我使用SQL来获取此列表吗?
SELECT asin
FROM dbo.aboProducts
WHERE (asin NOT IN
(SELECT aboProducts_1.asin
FROM dbo.aboProducts AS aboProducts_1 INNER JOIN
dbo.LowestPrices ON aboProducts_1.asin = dbo.LowestPrices.productAsin
WHERE (dbo.aboProducts.amzLive = 'true') AND
(dbo.LowestPrices.priceDate < DATEADD(day, - 1, GETDATE()))))