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

     1  select
     2  	o_orderpriority,
     3  	count(*) as order_count
     4  from
     5  	orders
     6  where
     7  	o_orderdate >= date '1997-07-01'
     8  	and o_orderdate < date '1997-07-01' + interval '3' month
     9  	and exists (
    10  		select
    11  			*
    12  		from
    13  			lineitem
    14  		where
    15  			l_orderkey = o_orderkey
    16  			and l_commitdate < l_receiptdate
    17  	)
    18  group by
    19  	o_orderpriority
    20  order by
    21  	o_orderpriority
    22  ;