Teradata interview question

How to implement mallacok effectively