Oracle® Business Intelligence Server Administration Guide > Oracle BI Server SQL Reference > SQL Syntax and Semantics >

SELECT List Syntax

The SELECT list syntax lists the columns in the query.


SELECT [DISTINCT] select_list



The list of columns specified in the query. All columns need to be from a single business model.

Table names can be included (as Table.Column), but are optional unless column names are not unique within a business model.

If column names contain spaces, enclose column names in double quotes. The DISTINCT keyword does not need to be included as the Oracle BI Server will always do a distinct query.

Columns that are being aggregated do not need to include the aggregation function (such as SUM), as aggregation rules are known to the server and aggregation will be performed automatically.

FROM Clause Syntax

The Oracle BI Server accepts any valid SQL FROM clause syntax. You can specify the name of a catalog folder instead of a list of tables to simplify FROM clause creation. The Oracle BI Server determines the proper tables and the proper join specifications based on the columns the query asks for and the configuration of the Oracle BI repository.

WHERE Clause Syntax

The Oracle BI Server accepts any valid SQL WHERE clause syntax. There is no need to specify any join conditions in the WHERE clause because the joins are all configured within the Oracle BI repository. Any join conditions specified in the WHERE clause are ignored.

The Oracle BI Server also supports the following subquery predicates in any conditional expression (WHERE, HAVING or CASE statements):

  • IN, NOT IN
  • >Any, >=Any, =Any, <Any, <=Any. <>Any
  • >All, >=All, =All, <All, <=All, <>All

GROUP BY Clause Syntax

With auto aggregation on the Oracle BI Server, there is no need to submit a GROUP BY clause. When no GROUP BY clause is specified, the GROUP BY specification defaults to all of the nonaggregation columns in the SELECT list. If you explicitly use aggregation functions in the select list, you can specify a GROUP BY clause with different columns and the Oracle BI Server will compute the results based on the level specified in the GROUP BY clause. For additional details, and some examples of using the GROUP BY clause in queries against the Oracle BI Server, refer to Rules for Queries with Aggregate Functions.

ORDER BY Clause Syntax

The Oracle BI Server accepts any valid SQL ORDER BY clause syntax, including referencing columns by their order in the select list (such as ORDER BY 3, 1, 5).

Oracle® Business Intelligence Server Administration Guide Copyright © 2007, Oracle. All rights reserved.