Tutorial: Advanced work with queries