Méthode 1 :
with cte as(selectrow_number()over (partition by ParentProductCategoryID,Name order by ParentProductCategoryID ) as classement, ParentProductCategoryID,Name from [SalesLT].[ProductCategory] where ParentProductCategoryID is not null)delete from cte where classement >1Méthode 2 :
deletefrom SalesLT.ProductCategory where ParentProductCategoryID in (select ParentProductCategoryID from SalesLT.ProductCategory group by ParentProductCategoryID having count(*) >1

![[PowerBI][DAX] – Comment créer des cartes dynamiques et intelligentes ? carte intelligente et dynamique](https://i0.wp.com/mybicoach.bwabwanet.fr/wp-content/uploads/2020/03/powerbi-carte-intelligente.gif?resize=218%2C150&ssl=1)
![[PowerQuery]-Comment générer une table temps ? Générer une table temps](https://i1.wp.com/mybicoach.bwabwanet.fr/wp-content/uploads/2020/03/PowerQuery_Generation_table_temps.png?resize=218%2C150&ssl=1)


![[PowerBI][DAX] – Comment compter le nombre de ligne d’une table ?](https://i2.wp.com/mybicoach.bwabwanet.fr/wp-content/uploads/2020/01/powerbi-dax-countrows-logo-1.png?resize=100%2C70&ssl=1)