An upstream loader retried without idempotency, so some invoices were inserted more than once. Two rows are duplicates when vendor_id, invoice_number and amount all match. Return one row per duplicate group with the number of copies and the earliest loaded_at.
copies descending, then vendor_id, then invoice_numberCommunity-reported interview topic. Not an official company question and no affiliation is implied.
Run against the public tests, or submit to score against all of them.