Etl, Data Integration, Data Analysis, Data Engineering, Sql.
PRODUCT_ID) AS RANKING FROM [dbo].[M_ARTICLE_SALES_BY_STORE_TABLE] ) SELECT * FROM NUM_RANKING WHERE RANKING > 1 We get an empty table as seen below meaning there are no duplicates STEP 2: MERGE THE SOURCE TABLE AND DESTINATION TABLE ON COLUMNS USED ABOVE AND DELETE RECORDS THAT ARE NOT MATCHING.