How would you write a query using GROUP BY to summarize client metrics?
Assume the client_metrics table contains metric observations. Include only rows with a valid status and summarize non-null metric values for each client.
client_name, metric_count, total_metric_value, average_metric_value, and maximum_metric_value| Column | Type | Description |
|---|---|---|
| metric_idPK | INT | Unique identifier for the metric observation |
| client_name | VARCHAR(100) | Client associated with the observation |
| metric_value | DECIMAL(12,2) | Numeric value of the observation |
| metric_status | VARCHAR(20) | Whether the observation is valid |