Loading plan…
SELECT
TOP 100
i_product_name,
i_brand,
i_class,
i_category,
AVG(CAST(inv_quantity_on_hand AS BIGINT)) AS qoh
FROM inventory, date_dim, item
WHERE
inv_date_sk = d_date_sk
AND inv_item_sk = i_item_sk
AND d_month_seq BETWEEN 1202 AND 1202 + 11
GROUP BY
ROLLUP (
i_product_name,
i_brand,
i_class,
i_category
)
ORDER BY
qoh,
i_product_name,
i_brand,
i_class,
i_category;
Step details
Loading plan…
Green: scan · yellow: join · purple: row movement. Rows and costs are optimiser estimates; costs use model units.