text: -- Q3 (tpch2.6.1)
  
  !set rowlimit 10
  
  SELECT 
      L_ORDERKEY,
      SUM(L_EXTENDEDPRICE * (1 - L_DISCOUNT)) AS REVENUE,
      O_ORDERDATE,
      O_SHIPPRIORITY
  FROM
      TPCH.CUSTOMER,
      TPCH.ORDERS,
      TPCH.LINEITEM
  WHERE
      C_MKTSEGMENT = 'BUILDING' AND
      C_CUSTKEY = O_CUSTKEY AND
      L_ORDERKEY = O_ORDERKEY AND
      O_ORDERDATE < DATE '1995-03-15' AND
      L_SHIPDATE > DATE '1995-03-15'
  GROUP BY
      L_ORDERKEY,
      O_ORDERDATE,
      O_SHIPPRIORITY
  ORDER BY
      REVENUE DESC,
      O_ORDERDATE;
  