Compute Repeat Transfer Rate by Currency Corridor With SQL

Last updated: November 29, 2026

Quick Overview

Using a transfers table, compute for each send-to-receive currency corridor the share of customers whose first completed transfer in a given month was followed by another completed transfer within 30 days.

Wise
Data Manipulation (SQL/Python)
Data Scientist
Wise
November 29, 2026
Data Scientist
Technical Screen
Data Manipulation (SQL/Python)
Medium

0

0

0 solved


Using a transfers table, compute for each send-to-receive currency corridor the share of customers whose first completed transfer in a given month was followed by another completed transfer within 30 days.

Much of Wise's growth comes from repeat use and word of mouth, and analysts slice behaviour by corridor such as GBP to INR or USD to MXN. The SQL screen checks window functions, correct cohort definitions and careful handling of statuses and time boundaries.

What the Interviewer Expects
  • Filters to completed transfers and defines the first transfer per customer correctly
  • Assigns the customer to the corridor of their first transfer
  • Uses a strict 30-day window after the first transfer, excluding the first itself
  • Avoids double counting customers with several later transfers
  • Mentions right censoring for cohorts too recent to observe 30 days
Key Topics to Cover
window functions
cohorts
SQL joins
censoring
retention
How to Approach This
  1. Clarify the schema and expected output format before writing queries.
  2. Use CTEs (WITH clauses) to break complex queries into readable steps.
  3. Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
  4. Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
  5. For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
  • How would you show whether repeat rate differs for customers who came via referral?
  • Should a repeat in a different corridor count, and how would results change?
  • How would you make this a daily incremental job instead of a full scan?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice SQL Problems
Sample Answer
Clarify the Data

transfers(transfer_id, customer_id, source_ccy, target_ccy, status, created_at, completed_at). Statuses include completed, cancelled, refunded. A repeat is any later completed transfer by the ...

Approach
  1. Rank completed transfers per customer by completed_at.
  2. Keep rank 1 as the first transfer, which gives the corridor and cohort.
  3. Left join to any later completed transfer within 30 days and u...

Submit Your Answer
Markdown supported

Related Questions