local exchange (GATHER, SINGLE, [])
    remote exchange (GATHER, SINGLE, [])
        final aggregation over (r_reason_desc)
            local exchange (GATHER, SINGLE, [])
                remote exchange (REPARTITION, HASH, ["r_reason_desc"])
                    partial aggregation over (r_reason_desc)
                        join (INNER, REPLICATED):
                            join (INNER, REPLICATED):
                                join (INNER, PARTITIONED):
                                    remote exchange (REPARTITION, HASH, ["cd_demo_sk_0", "cd_education_status_3", "cd_marital_status_2"])
                                        scan customer_demographics
                                    local exchange (GATHER, SINGLE, [])
                                        remote exchange (REPARTITION, HASH, ["cd_education_status", "cd_marital_status", "wr_returning_cdemo_sk"])
                                            join (INNER, PARTITIONED):
                                                remote exchange (REPARTITION, HASH, ["wr_refunded_addr_sk"])
                                                    join (INNER, PARTITIONED):
                                                        remote exchange (REPARTITION, HASH, ["ws_item_sk", "ws_order_number"])
                                                            join (INNER, REPLICATED):
                                                                scan web_sales
                                                                local exchange (GATHER, SINGLE, [])
                                                                    remote exchange (REPLICATE, BROADCAST, [])
                                                                        scan date_dim
                                                        local exchange (GATHER, SINGLE, [])
                                                            remote exchange (REPARTITION, HASH, ["wr_item_sk", "wr_order_number"])
                                                                join (INNER, REPLICATED):
                                                                    scan web_returns
                                                                    local exchange (GATHER, SINGLE, [])
                                                                        remote exchange (REPLICATE, BROADCAST, [])
                                                                            scan customer_demographics
                                                local exchange (GATHER, SINGLE, [])
                                                    remote exchange (REPARTITION, HASH, ["ca_address_sk"])
                                                        scan customer_address
                                local exchange (GATHER, SINGLE, [])
                                    remote exchange (REPLICATE, BROADCAST, [])
                                        scan web_page
                            local exchange (GATHER, SINGLE, [])
                                remote exchange (REPLICATE, BROADCAST, [])
                                    scan reason
