some query part

got stuck with get the result, can only out print it. I would look it
tomorrow.