A method and computer system for optimizing queries to a database are disclosed. The query specifies one or more data-to-be-aggregated columns (DAC), one or more explicit aggregation keys (EAK) and one or more join conditions. The query involves table T1. T1includes the one or more data-to-be-aggregated...http://www.google.de/patents/US6732096?utm_source=gb-gplus-sharePatent US6732096 - Optimizing an aggregate join query