High credit utilization

calculations

High credit utilization

Capital One SQL Interview Question

Capital One's credit risk team watches credit utilization, which is the share of a card's credit limit that a customer is using. High utilization can be an early sign that a customer is struggling.

Using each account's June 2024 statement, find every customer whose utilization is above 30%. Show the customer_name and utilization as utilization_pct: the balance as a percentage of the credit limit, rounded to 1 decimal place.

Asked of

  • Data Analyst
  • Business Analyst
  • BI Analyst
  • Data Scientist

statementsTable18 rows

Column NameType
statement_idBIGINT
account_idBIGINT
statement_monthDATE
balanceDOUBLE
minimum_dueDOUBLE
amount_paidDOUBLE

accountsTable8 rows

Column NameType
account_idBIGINT
customer_nameVARCHAR
productVARCHAR
credit_limitBIGINT
opened_dateDATE

statementsExample Input

statement_idaccount_idstatement_monthbalanceminimum_dueamount_paid
16012024-04-0112003535
26022024-04-012400602400
36042024-04-0113504020
56012024-05-0118504545
66022024-05-01310075500
76042024-05-012100550
96012024-06-0122505560
106022024-06-012900702900
116042024-06-0126406565

accountsExample Input

account_idcustomer_nameproductcredit_limitopened_date
601Jordan LeeCredit Card50002021-03-15
602Aisha KhanCredit Card120002019-08-02
603Mateo GarciaSavingsNULL2020-11-20
604Emily ChenCredit Card30002022-06-10

Example Output

customer_nameutilization_pct
Emily Chen88
Jordan Lee45

Explanation

In June, Jordan Lee had a balance of 2,250 on a 5,000 limit, which is 45.0%. Emily Chen owed 2,640 on a 3,000 limit, which is 88.0%. Aisha Khan owed 2,900 on a 12,000 limit, only 24.2%, so Aisha Khan is left out.

The example above is a small slice of the data. Your query runs against the full tables.