CustomerInsights.AI needs one highest-performing insight record from each dashboard group. Write a PostgreSQL query that returns the top record per group_name, where performance is measured by metric_value.
group_name.metric_value; use the smallest record_id to break ties.| Column | Type | Description |
|---|---|---|
| record_idPK | INT | Unique insight record identifier |
| group_name | VARCHAR(100) | CustomerInsights.AI insight group |
| record_name | VARCHAR(150) | Name of the insight record |
| metric_value | DECIMAL(10,2) | Performance metric used for ranking |