Reuse
A CTE can be read more than once in the same query.
task
Use one CTE twice to show each product category and its share of total revenue (unit_cents * qty), as a fraction of 1.
Run a query to see rows here.
Run EXPLAIN on the statement under the cursor: Plan tab, button Explain.
No tables yet.
A CTE can be read more than once in the same query.
Use one CTE twice to show each product category and its share of total revenue (unit_cents * qty), as a fraction of 1.