q06.sql 296 B

12345678910111213
  1. --!syntax_pg
  2. --TPC-H Q6
  3. select
  4. sum(l_extendedprice*l_discount) as revenue
  5. from
  6. plato."lineitem"
  7. where
  8. l_shipdate >= date '1994-01-01'
  9. and l_shipdate < date '1994-01-01' + interval '1' year
  10. and l_discount between (0.06 - 0.01)::numeric and (0.06 + 0.01)::numeric
  11. and l_quantity < 24::numeric;