
[K
[K
[K
[K
[K
[KQuery21:
iteration 2
<main>: Error: Table '/local/test_db/upload/tpch/s0.1/lineitem' not exists., code: 2028
<main>: Error: Query invalidated on scheme/internal error during Data execution, code: 2019

Query text:
$n = select n_nationkey from `upload/tpch/s0.1/nation`
where n_name = 'SAUDI ARABIA';
$s = select s_name, s_suppkey from `upload/tpch/s0.1/supplier` as supplier
join $n as nation
on supplier.s_nationkey = nation.n_nationkey;
$l = select l_suppkey, l_orderkey from `upload/tpch/s0.1/lineitem`
where l_receiptdate > l_commitdate;
$j1 = select s_name, l_suppkey, l_orderkey from $l as l1
join $s as supplier
on l1.l_suppkey = supplier.s_suppkey;
$j2 = select l1.l_orderkey as l_orderkey, l1.l_suppkey as l_suppkey, l1.s_name as s_name, l2.l_receiptdate as l_receiptdate, l2.l_commitdate as l_commitdate from $j1 as l1
join `upload/tpch/s0.1/lineitem` as l2
on l1.l_orderkey = l2.l_orderkey
where l2.l_suppkey <> l1.l_suppkey;
$j2_1 = select s_name, l1.l_suppkey as l_suppkey, l1.l_orderkey as l_orderkey from $j1 as l1
left semi join $j2 as l2
on l1.l_orderkey = l2.l_orderkey;
$j2_2 = select l_orderkey from $j2 where l_receiptdate > l_commitdate;
$j3 = select s_name, l_suppkey, l_orderkey from $j2_1 as l1
left only join $j2_2 as l3
on l1.l_orderkey = l3.l_orderkey;
$j4 = select s_name from $j3 as l1
join `upload/tpch/s0.1/orders` as orders
on orders.o_orderkey = l1.l_orderkey
where o_orderstatus = 'F';
select s_name,
    count(*) as numwait from $j4
group by
    s_name
order by
    numwait desc,
    s_name
limit 100;

