Your question is SQL for Customer Feedback Trends. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Nordstrom's Operations Manager needs a monthly view of customer feedback from active customers to identify changes in satisfaction over time. Write a PostgreSQL query for feedback submitted during 2025-01-01 through 2025-04-30.
A feedback row with a NULL rating is still a submission, but it must not be included in the average rating or rated-feedback percentage.
| Column | Type | Description |
|---|---|---|
| customer_idPK | INTEGER | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer name |
| is_active | BOOLEAN | Whether the customer is active |
| Column | Type | Description |
|---|---|---|
| feedback_idPK | INTEGER | Unique feedback identifier |
| customer_id | INTEGER | Customer who submitted the feedback |
| submitted_at | DATE | Feedback submission date |
| rating | INTEGER | Optional rating from 1 to 5 |
| channel | VARCHAR(30) | Feedback collection channel |
| comment | TEXT | Optional customer comment |