FILTER
FILTER (WHERE ...) restricts one aggregate to some rows, so several conditional counts fit in one pass.
task
Per category: products total and products with an attrs key "waterproof".
Run a query to see rows here.
Run EXPLAIN on the statement under the cursor: Plan tab, button Explain.
No tables yet.
FILTER (WHERE ...) restricts one aggregate to some rows, so several conditional counts fit in one pass.
Per category: products total and products with an attrs key "waterproof".