Implementation of duplicate query and de duplicate of MySql data

Suppose there is a table user, and the fields are id – nick'u name – password – email – phone, as follows (please create a temporary table when deleting redundant records, otherwise an error will be reported):