TPC-H Q5

SF100 · F64 · Estimated plan · Read from bottom to top. Select a step for details.

Plan

Source XML

Loading plan…

Query SQL

Download SQL
/* using 19620718 as a seed to the RNG */
SELECT
  n_name,
  SUM(l_extendedprice * (
    1 - l_discount
  )) AS revenue
FROM customer, orders, lineitem, supplier, nation, region
WHERE
  c_custkey = o_custkey
  AND l_orderkey = o_orderkey
  AND l_suppkey = s_suppkey
  AND c_nationkey = s_nationkey
  AND s_nationkey = n_nationkey
  AND n_regionkey = r_regionkey
  AND r_name = 'ASIA'
  AND o_orderdate >= CAST('1993-01-01' AS DATE)
  AND o_orderdate < DATEADD(YEAR, 1, CAST('1993-01-01' AS DATE))
GROUP BY
  n_name
ORDER BY
  revenue DESC;
Step details

Loading plan…

Green: scan · yellow: join · purple: row movement. Rows and costs are optimiser estimates; costs use model units.