Duplicate Percentage
You don't need to find the ids with no matches when you finally filter for a percentage > 0. 

Standard SQL based, but fully untested:

with cte as
 (
   select Id, Type, Value,
      count(*) over (partition by Id) as RowCount -- maximum number of possible matches
   from tab
 )
select t.ID, cte.Id as RelatedID,
   count(*) as countMatches,
   max(cte.RowCount) as Compared,
   100.0 * count(*) / max(cte.RowCount) as PercetageMatched
from tab as t -- or cte if you need the RowCount, too
join cte
  on t.Type  = cte.Type
 and t.Value = cte.Value
where t.id &lt; cte.id
group by t.ID, cte.Id


I don't know about the actuallogic, but you might do the percentage calculation based on the min (or max) of both RowCounts.

Edit:

Of course this will create a huge intermediate result set, mainly based on the count of duplicate values. Following SQL calculates the number of rows before aggregation:

select sum(cnt * (cnt-1) / 2), max(cnt), count(*)
from 
 ( select count(*) as cnt
   from tab 
   group by type, value
 ) as dt


You might materialize the result of the cte in a table with a clustered index on (type, value, id), maybe this increases performance...