I found this one which will give DNs which are shared. But doesn't list the device. I assume maybe would have to join it with d.name from device table but not exactly sure how.
run sql select numplan.dnorpattern, routepartition.name, count(*) from numplan, devicenumplanmap, routepartition where numplan.fkroutepartition = routepartition.pkid and numplan.pkid = devicenumplanmap.fknumplan group by 1, 2 having count(*) > 1 order by 1,2