add solution of recursive query