IBM Interview Question

How to write table functions