Analyze MySQL data records in database to find inconsistencies