IBM interview question

How to write table functions