Postgresql Find Duplicate Rows Mysql Interview Problems