View
A view is a stored query. It holds no data; each read runs the query. Total per order is the sum of unit_cents times qty.
task
Create v_order_totals(order_id, total_cents).
Run a query to see rows here.
Run EXPLAIN on the statement under the cursor: Plan tab, button Explain.
No tables yet.
A view is a stored query. It holds no data; each read runs the query. Total per order is the sum of unit_cents times qty.
Create v_order_totals(order_id, total_cents).