Daily Net USDC Issuance Per Institutional Customer In SQL
Last updated: November 29, 2026
Quick Overview
Given a mint_requests table of mint and redeem requests from institutional customers, write a query returning minted, redeemed and net issued USD per customer per day, counting only completed requests.
Circle
November 29, 20260
0
0 solved
Given a mint_requests table of mint and redeem requests from institutional customers, write a query returning minted, redeemed and net issued USD per customer per day, counting only completed requests.
Circle Mint customers convert dollars to USDC and back, and finance and treasury teams watch net issuance to plan reserve liquidity. This screen checks conditional aggregation, correct filtering on status, and the right date grain.
What the Interviewer Expects
- Filters to completed requests only
- Uses conditional aggregation for mint vs redeem in one pass
- Groups by customer and completion date, not request date
- Treats redeems as negative in the net figure
- Mentions time zones for day boundaries
Key Topics to Cover
How to Approach This
- Clarify the schema and expected output format before writing queries.
- Use CTEs (WITH clauses) to break complex queries into readable steps.
- Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
- Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
- For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
- Add a 7-day rolling net issuance per customer.
- Which customers redeemed more than they minted over the last 30 days?
- How would you handle a request that was completed and later reversed?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice SQL ProblemsSample Answer
Clarify the Data
mint_requests(request_id, customer_id, kind, amount_usd, status, completed_at),kindinmint/redeem,statusinpending/completed/failed.- Day = UTC date of
completed_at, since a p...
Approach
Filter to completed rows, group by customer and completion date, and use CASE expressions to split mint and redeem totals in a single scan. Net is the same sum with redeems negated....