Query13:
Query text:
$orders = (
    select
        o_orderkey,
        o_custkey
    from
        `olap_yatests/tpch/s0_2/orders`
    where
        o_comment NOT LIKE "%special%requests%"
);
select
    c_count as c_count,
    count(*) as custdist
from
    (
        select
            c.c_custkey as c_custkey,
            count(o.o_orderkey) as c_count
        from
            `olap_yatests/tpch/s0_2/customer` as c left outer join $orders as o on
                c.c_custkey = o.o_custkey
        group by
            c.c_custkey
    ) as c_orders
group by
    c_count
order by
    custdist desc,
    c_count desc;

