Netezza interview question

question about sql, linux cmd, data structure and puzzle