A system and method for efficient data retrieval and processing in an
online analytical processing system, a reporting system, a business
intelligence system, or a data mining system. The system provides for
retrieval and processing of a data result set from a plurality of data
sources. The system includes a query structure assembly module, a syntax
assembly module, and a process optimization module. The query structure
assembly module defines a query structure based upon query assembly rules
and a desired data set (such as the set of data for a particular OLAP
report). The syntax assembly module defines one or more query language
statements based upon the defined query structure. The process
optimization module evaluates processing options based upon a database
schema associated with the data sources. One or more query language
statements may be assembled by the system and run against the data
sources to return the desired data result set. A method and medium having
processor readable code therein are also described.