All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tpch.q11.sql Maven / Gradle / Ivy

There is a newer version: 1.2.23
Show newest version
SELECT ps_partkey,
       sum(ps_supplycost * ps_availqty) AS value
FROM
    partsupp,
    supplier,
    nation
WHERE
    ps_suppkey = s_suppkey
  AND s_nationkey = n_nationkey
  AND n_name = 'GERMANY'
GROUP BY
    ps_partkey
HAVING
    sum (ps_supplycost * ps_availqty)
     > (
    SELECT sum (ps_supplycost * ps_availqty) * 0.0001
    FROM
    partsupp
     , supplier
     , nation
    WHERE
    ps_suppkey = s_suppkey
   AND s_nationkey = n_nationkey
   AND n_name = 'GERMANY'
    )
ORDER BY
    value DESC




© 2015 - 2025 Weber Informatics LLC | Privacy Policy