Queries gather context-specific groups of artifacts. Use the artifacts to populate views and query result pages.
When you create a query for shared use, first create it in My Queries so you can test and refine the query privately.
Build and run a query to gather artifacts to see if you want to use the query to populate a view. For example, you might want to create and run a query to build a parts list for your product hierarchy, as the following image shows.

After you create the query, click Run. The query retrieves data from the index and displays the results. Check the results to be sure that the query gathered the correct set of artifacts. Modify the query and test the results until you achieve your quality standard.
The following image shows a sample of the results for a custom Flat parts list query.

To view a table of date, enumeration, and system parameters, and sample output for each, see Predefined query parameters.
Run the updated view. Fully test and refine the view before you share the view with a team.
If you need to make refinements to the query in the view, you can edit the query again by using the Queries section in the Page Properties editor.
When you are satisfied that the query and view are working together to gather the right set of information for your team, share the view.