A report needs one row per region with the total sales amount rather than every underlying transaction. Which approach best fits?

Published
  1. Use a window ranking function and retain the first row per customer.
  2. Use GROUP BY region with SUM of the sales amount.
  3. Use a LEFT JOIN from customers to orders.
  4. Use HAVING for the aggregate condition.

Comments — 0