github.com/matrixorigin/matrixone@v1.2.0/pkg/sql/plan/tpch/q10.sql (about) 1 select 2 c_custkey, 3 c_name, 4 sum(l_extendedprice * (1 - l_discount)) as revenue, 5 c_acctbal, 6 n_name, 7 c_address, 8 c_phone, 9 c_comment 10 from 11 customer, 12 orders, 13 lineitem, 14 nation 15 where 16 c_custkey = o_custkey 17 and l_orderkey = o_orderkey 18 and o_orderdate >= date '1993-03-01' 19 and o_orderdate < date '1993-03-01' + interval '3' month 20 and l_returnflag = 'R' 21 and c_nationkey = n_nationkey 22 group by 23 c_custkey, 24 c_name, 25 c_acctbal, 26 c_phone, 27 n_name, 28 c_address, 29 c_comment 30 order by 31 revenue desc 32 limit 20 33 ;