Running and working with queries in the workspace