Patent ID: 7467152

Claim:
A query generator for generating a query for obtaining selected data from a database, the database having a number of detail tables in which data is stored, the query generator comprising a processor which is coupled to the database in use, the processor being adapted to: a. receive an input indicating the selected data to be obtained to generate a first query; b. analyze the input and determine whether the input requires a joining of data in a plurality of different detail tables, and an aggregation step; and, c. if it is determined the input requires a joining of data in a plurality of different detail tables, causing the processor to modify the content of the first query indicating the selected data to be obtained to generate a second query, the second query being adapted to cause the database to: i. aggregate the data within each of the plurality of detail tables as required; and, ii. perform a SQL join operation to join the aggregated data from each of the plurality of detail tables, the joined aggregated data representing the selected data.