SQL accounts-receivable ageing and a collections dashboard
Build the receivables ageing, DSO and collections priority list in SQL from invoice and payment tables, reconcile it to the ledger, and give the credit team a dashboard they use every morning.
Industry project · for Cascade Lab Supply, a Seattle and Vancouver distributor of laboratory consumables with US$22 million revenue and 1,400 business customers
Cascade Lab Supply sells pipettes, reagents and safety equipment to universities, hospitals and biotech start-ups in Washington, Oregon and British Columbia. Revenue is about US$22 million a year across 1,400 customers, billed in US and Canadian dollars. Receivables have grown to US$4.9 million and days sales outstanding (DSO) has crept from 46 to 61 days in a year. The bank that provides the revolving credit line has asked for a monthly ageing report it can trust.
Today, the credit team exports invoices from the ERP to Excel every Monday and builds the ageing by hand. It takes most of a day, it never agrees with the ledger control account, and partly paid invoices and unapplied credit notes are often counted twice. The two collectors spend their time on whoever shouts loudest rather than the largest risk.
The controller, Marcus Lee, wants you to: - design a small SQL database of customers, invoices, payments, payment allocations and credit notes, and fill it with a realistic synthetic dataset; - write SQL that produces an open-item ageing in standard buckets, in both currencies and translated to USD; - calculate DSO and other collection metrics by month; - reconcile the ageing to a ledger control total and explain every difference; - produce a ranked daily collections list and a simple dashboard.
Done looks like a repository of SQL scripts that run end to end on PostgreSQL or SQLite, a dashboard, and a one-page memo to Marcus. The ageing total must agree with the control account to the cent, and the collections list must put the riskiest US$1 million at the top.
Repository of SQL scripts (schema, data, ageing, metrics, reconciliation, collections list) + dashboard + one-page memo
Stack: PostgreSQL or SQLite, DBeaver or psql, Python or SQL for data generation, Power BI, Looker Studio or Metabase
- Correct ageing30
Open items reflect partial payments, allocations and credit notes, are bucketed by due date and total the control account exactly.
- Sound metrics20
DSO and collection metrics are defined, calculated correctly by month and shown in both currencies and USD.
- Reconciliation20
Every difference between SQL output and the ledger total is listed and explained, leaving zero unexplained.
- Useful collections output30
The ranked list and dashboard focus collectors on the largest risk, and the memo explains how to use them.
Pass 60% · Merit 75% · Distinction 90%
Engineering Students
Diploma, B.Tech, B.E., BCA, MCA, or M.Tech students seeking practical experience.
Aspiring Developers
Developers who want to build proof-of-work capstone projects for tech resumes.
Job Seekers
Graduates looking for AI-evaluated code review & verified industry credentials.