Your question is Group Filtering with HAVING. Start with the requirements and the one table 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.
NetSuite QA analysts need to identify customers with multiple approved sales orders. Using the netsuite_sales_orders table, write a PostgreSQL query that groups orders by customer and filters groups using an aggregate condition.
status is Approved.| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique sales order identifier |
| customer_name | VARCHAR(100) | NetSuite customer name |
| status | VARCHAR(20) | Sales order approval status |
| order_amount | DECIMAL(10,2) | Sales order amount |
| order_date | DATE | Date the order was created |