1. A method comprising: receiving a query statement specifying a count distinct; generating a data flow graph comprising a plurality of nodes for executing the query, the nodes providing for a plurality of aggregation operations generating join attributes for the plurality of aggregation operations, sorting each result of the plurality of aggregation operations on the join attributes, and calculating a count distinct of a plurality of intermediate result from the plurality of aggregation operations based on key figures of the aggregation operations, by vertically appending columns of count distinct results with intermediate results from at least one of the aggregation operations; wherein the vertically appending operation takes a first input table comprising a plurality of columns including a count distinct result and a second input table comprising a plurality of columns from the intermediate results from the at least one of the aggregation operations, wherein the first and second input table have no common columns, and generates a result table comprising all of the columns from the first table and second table; calculating two or more count distinct key figures-in parallel; and wherein each of the one or more aggregation operations provides a view across two or more attributes with each attribute being sorted in a separate column; and initiating executing of the query using the data flow graph.