local exchange (GATHER, SINGLE, [])
    remote exchange (GATHER, SINGLE, [])
        final aggregation over (groupid, i_brand$gid, i_category$gid, i_class$gid, i_product_name$gid)
            local exchange (REPARTITION, HASH, ["groupid", "i_brand$gid", "i_category$gid", "i_class$gid", "i_product_name$gid"])
                remote exchange (REPARTITION, HASH, ["groupid", "i_brand$gid", "i_category$gid", "i_class$gid", "i_product_name$gid"])
                    partial aggregation over (groupid, i_brand$gid, i_category$gid, i_class$gid, i_product_name$gid)
                        local exchange (REPARTITION, HASH, ["i_brand", "i_product_name"])
                            remote exchange (REPARTITION, HASH, ["i_brand", "i_product_name"])
                                join (INNER, REPLICATED):
                                    join (INNER, REPLICATED):
                                        scan inventory
                                        local exchange (GATHER, SINGLE, [])
                                            remote exchange (REPLICATE, BROADCAST, [])
                                                scan date_dim
                                    local exchange (GATHER, SINGLE, [])
                                        remote exchange (REPLICATE, BROADCAST, [])
                                            scan item
