Netezza Interview Question

question about sql, linux cmd, data structure and puzzle