select blp.ownerId, blp.ownerType, blp.bidLineProductId, max( ops.createTimeStamp ) from tbl_OPR_ProductStatus ops with (nolock) inner join tbl_BID_Skus bs with (nolock) on ops.ownerId = bs.ownerId and ops.ownerType = bs.ownerType and ops.skuId = bs.skuId inner join tbl_BID_BidLineProducts blp with (nolock) on blp.ownerId = bs.ownerId and blp.ownerType = bs.ownerType and blp.bidSkuId = bs.bidSkuId inner join tbl_BID_BidLines bl with (nolock) on bl.ownerId = blp.ownerId and bl.ownerType = blp.ownerType and bl.bidLineId = blp.bidLineId inner join tbl_BID_Bids b with (nolock) on b.ownerId = bl.ownerId and b.ownerType = bl.ownerType and b.bidId = bl.bidId and b.bidId = ops.contractId where b.rollover = 'N' and nullif( blp.pushDate, '' ) is null group by blp.ownerId, blp.ownerType, blp.bidLineProductId update tbl_BID_BidLineProducts set pushDate = where ownerId = and ownerType = and bidLineProductId =