How can I limit rows returned in an explore to satisfy the below business need?
For any order series ID,
- If that order series ID has only a record with order_series_status of “Active” , include that row.
- If that order series ID has only a record with order_series_status of “Archived” , include that row.
- If that order series ID has both a record with order_series_status of “Active” and a record with order_series_status of “Archived”, ONLY include the row with the “Active” order series status.