What is a Query?

A query is a collection of Selection objects and a layout that specifies the ordering and structure of the dimensions that the selections represent. Each selection object specifies the criteria for a set of members for a particular dimension, such as Product or Geography.

For example, a query might specify the top 10 products based on Sales for January 2002 in the Eastern region.

How are queries created?

Queries are created in these ways:

Note: The Presentation wizard and the Query wizard in JDeveloper display many of the QueryBuilder panels as they assist users in creating queries.

How is a query converted into data?

A query that has been created in the QueryBuilder bean is converted into data as follows:

  1. The QueryBuilder bean passes the Selection objects that comprise the query to its associated Query object.

  2. The Query object converts each Selection object into an OLAP API query by evaluating, in order, each step in the series of steps.

  3. If any sort specifications exist, then the Query object applies the sort specifications (such as,  "sort alphabetically") to its selections.

  4. The OLAP API query is then run to obtain the results.

  5. The Query object passes the results to the view (namely, a crosstab, graph, or table) that it is associated with or to the QueryBuilder bean. You can use the Selected Members tab in the QueryBuilder to view the results of steps for a given dimension in the query.

Creating Selections Programmatically
Defining a Query Programmatically
Defining a Query Using QueryBuilder

Saving Favorites in QueryBuilder