Return result of query as variable

Post your code