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

     1  select
     2  	l_returnflag,
     3  	l_linestatus,
     4  	sum(l_quantity) as sum_qty,
     5  	sum(l_extendedprice) as sum_base_price,
     6  	sum(l_extendedprice * (1 - l_discount)) as sum_disc_price,
     7  	sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge,
     8  	avg(l_quantity) as avg_qty,
     9  	avg(l_extendedprice) as avg_price,
    10  	avg(l_discount) as avg_disc,
    11  	count(*) as count_order
    12  from
    13  	lineitem
    14  where
    15  	l_shipdate <= date '1998-12-01' - interval 112 day
    16  group by
    17  	l_returnflag,
    18  	l_linestatus
    19  order by
    20  	l_returnflag,
    21  	l_linestatus
    22  ;