MERGE [dbo].[PersonaKpiBaselineFreshness] AS target
    USING (SELECT @WorkspaceId AS WorkspaceId) AS source
    ON target.[WorkspaceId] = source.[WorkspaceId]
    WHEN MATCHED THEN
UPDATE
    SET [ComputedAtUtc] = @ComputedAtUtc,
    [BaselineVersion] = @BaselineVersion,
    [ComputedByJobId] = @ComputedByJobId
    WHEN NOT MATCHED THEN
INSERT
(
[WorkspaceId],
[ComputedAtUtc],
[BaselineVersion],
[ComputedByJobId])
VALUES (@WorkspaceId, @ComputedAtUtc, @BaselineVersion, @ComputedByJobId);
