Discarding results from CTE based on another CTE
if im not mistaken, you can get the result you want in R3, 
simply use

select min(id) as Id,Name,ProductReference
from Products
group by Name,ProductReference


the result will return exactly what you are looking for
in your example, n1 will be grouped to its minimum id, thus the result set will be


  Id,Name,PR,OC 
  1,n1,...,... 3,n2,...,... 4,n3,...,...