ECR opt in date and SQL