SQL Query to find duplicate mkds wrt mks
Refactor preview mechanism