# Data analyst internships

## Keep refunds in the same order cohort as the revenue

Synthetic extension: there is another completed $80 order, A has an additional $10 refund, and cancelled order C was fully refunded. The question still concerns completed orders only.

### Order-level records

| Order | Status | Value | Recorded refunds |
| --- | --- | --- | --- |
| A | Complete | $100 | $5 + $15 + $10 |
| B | Complete | $80 | $0 |
| C | Cancelled | $120 | $120 |
| D | Complete | $80 | $0 |
| E | Complete | $80 | $0 |

## Your turn

Calculate completed-order gross and net value. What goes wrong if you subtract every refund in the table from completed-order gross?

## Your answer

[Write your approach here.]

## For your own application

Add a test where an excluded order has a refund, and check that your chosen cohort stays consistent.

Return to the guide for the worked answer and source notes:
https://internshipdeadlines.com/guides/data-analyst-internship-portfolio
