Find repeat invoices without losing legitimate bills An invoice import contains exact repeats and a disagreement about one amount. Prepare the accepted invoice count and payable total, with a separate count of unresolved rows. SOURCE DATA "supplier","invoice","amount_usd" "A","100","1000" "A","100","1000" "A","101","500" "B","100","750" "A","102","200" "A","102","250" "B","101","0" RULES Use supplier + invoice as the business key. The same invoice number from different suppliers is not a duplicate. Collapse identical repeated rows to one. If amounts disagree for a business key, hold every row for that key. Keep a genuine zero invoice. Amounts are whole USD for this fictional exercise. MY FIGURES Accepted invoices: __________ Accepted total (USD): __________ Exact repeat rows removed: __________ Rows held for conflict: __________ MY REVIEW NOTE ________________________ METHOD Group the seven input rows by the two-part business key before adding amounts. A/100 is an exact repeat; B/100 is a different bill. Move both A/102 rows to an exception note. Choosing either 200 or 250 would hide the disagreement. Add the four accepted amounts, then reconcile raw rows = accepted invoices + repeated rows removed + held rows. REFERENCE ANSWERS — try first Accepted invoices: 4. A/100, A/101, B/100 and B/101 remain. Accepted total (USD): 2250. 1000 + 500 + 750 + 0 = 2250. Exact repeat rows removed: 1. Only the second identical A/100 row is removed. Rows held for conflict: 2. Both A/102 rows are held; 4 + 1 + 2 = 7 source rows. Summing unique amounts loses valid bills that happen to have the same value. Deduplicate by a declared business key, then inspect conflicting values. For a real import, agree whether invoice identifiers are case-sensitive and how currency is represented. Add supplier and currency to the key when policy requires it. Occupational context: O*NET 31.0 Database, USDOL/ETA, Task 2486, occupation 43-3031.00. https://www.onetcenter.org/dl_files/database/db_31_0_csv/task_statements.csv CC BY 4.0: https://creativecommons.org/licenses/by/4.0/ Original practice material and adaptations by Skill Workbench. USDOL/ETA has not approved, endorsed or tested these additions. O*NET is a trademark of USDOL/ETA.