Boss: dearest per category
For each category, get the single most expensive product (ties: lowest id) with a LATERAL subquery that sorts and takes one row.
task
Name of the most expensive product per category, ties by lowest id, with LATERAL.
Run a query to see rows here.
Run EXPLAIN on the statement under the cursor: Plan tab, button Explain.
No tables yet.
For each category, get the single most expensive product (ties: lowest id) with a LATERAL subquery that sorts and takes one row.
Name of the most expensive product per category, ties by lowest id, with LATERAL.