github.com/matrixorigin/matrixone@v1.2.0/pkg/sql/plan/tpch/q5.sql (about)

     1  select
     2  	n_name,
     3  	sum(l_extendedprice * (1 - l_discount)) as revenue
     4  from
     5  	customer,
     6  	orders,
     7  	lineitem,
     8  	supplier,
     9  	nation,
    10  	region
    11  where
    12  	c_custkey = o_custkey
    13  	and l_orderkey = o_orderkey
    14  	and l_suppkey = s_suppkey
    15  	and c_nationkey = s_nationkey
    16  	and s_nationkey = n_nationkey
    17  	and n_regionkey = r_regionkey
    18  	and r_name = 'AMERICA'
    19  	and o_orderdate >= date '1994-01-01'
    20  	and o_orderdate < date '1994-01-01' + interval '1' year
    21  group by
    22  	n_name
    23  order by
    24  	revenue desc
    25  ;