SET
NOCOUNT ON;

IF
NOT EXISTS (SELECT 1
                FROM [dbo].[AgentOutcomeLearningProposalReminders]
                WHERE [ProposalId] = @ProposalId
                  AND [ReminderKind] = @ReminderKind)
BEGIN
INSERT INTO [dbo].[AgentOutcomeLearningProposalReminders]
([Id],
    [WorkspaceId],
    [ProposalId],
    [ReminderKind],
[SentAt])
VALUES (@Id, @WorkspaceId, @ProposalId, @ReminderKind, @SentAt);

SELECT 1;
END
ELSE
BEGIN
SELECT 0;
END
