The duplicate row has to be removed to ensure accuracy-- Dropping the duplicate row
WITH CTE AS (
SELECT age, sex, cp, trtbps, chol, fbs, restecg, thalachh, exng, oldpeak, slp, caa, thall, output,
ROW_NUMBER() OVER (PARTITION BY age, sex, cp, trtbps, chol, fbs, restecg, thalachh, exng, oldpeak, slp, caa, thall, output ORDER BY (SELECT 0)) AS RowNumber
FROM PersonalProject..HeartAttack
)
DELETE FROM CTE WHERE RowNumber > 1;