local exchange (GATHER, SINGLE, [])
    remote exchange (GATHER, SINGLE, [])
        final aggregation over (d_qoy_168, d_year_167, expr_165, expr_166, i_category_169)
            local exchange (REPARTITION, HASH, ["d_qoy_168", "d_year_167", "expr_165", "expr_166", "i_category_169"])
                local exchange (REPARTITION, ROUND_ROBIN, [])
                    remote exchange (REPARTITION, HASH, ["d_qoy", "d_year", "expr_217", "expr_218", "i_category"])
                        partial aggregation over (d_qoy, d_year, expr_217, expr_218, i_category)
                            join (INNER, REPLICATED):
                                join (INNER, REPLICATED):
                                    scan store_sales
                                    local exchange (GATHER, SINGLE, [])
                                        remote exchange (REPLICATE, BROADCAST, [])
                                            scan item
                                local exchange (GATHER, SINGLE, [])
                                    remote exchange (REPLICATE, BROADCAST, [])
                                        scan date_dim
                    remote exchange (REPARTITION, HASH, ["d_qoy_49", "d_year_45", "expr_223", "expr_224", "i_category_29"])
                        partial aggregation over (d_qoy_49, d_year_45, expr_223, expr_224, i_category_29)
                            join (INNER, PARTITIONED):
                                remote exchange (REPARTITION, HASH, ["ws_sold_date_sk"])
                                    join (INNER, PARTITIONED):
                                        remote exchange (REPARTITION, HASH, ["ws_item_sk"])
                                            scan web_sales
                                        local exchange (GATHER, SINGLE, [])
                                            remote exchange (REPARTITION, HASH, ["i_item_sk_17"])
                                                scan item
                                local exchange (GATHER, SINGLE, [])
                                    remote exchange (REPARTITION, HASH, ["d_date_sk_39"])
                                        scan date_dim
                remote exchange (REPARTITION, HASH, ["d_qoy_129", "d_year_125", "expr_147", "expr_160", "i_category_109"])
                    partial aggregation over (d_qoy_129, d_year_125, expr_147, expr_160, i_category_109)
                        join (INNER, REPLICATED):
                            join (INNER, REPLICATED):
                                scan catalog_sales
                                local exchange (GATHER, SINGLE, [])
                                    remote exchange (REPLICATE, BROADCAST, [])
                                        scan item
                            local exchange (GATHER, SINGLE, [])
                                remote exchange (REPLICATE, BROADCAST, [])
                                    scan date_dim
