Skip to content
SQL interview questions

FinTrust

Digital banking / fintech

FinTrust is a digital bank offering savings and current accounts, credit cards and loans. Its analysts answer questions from finance, risk and fraud teams: where money flows, which loans are slipping behind, which accounts have gone dormant and whether the fraud model flags the right transactions. The schema covers customers, accounts, transactions, loans with an EMI schedule, and fraud signals with review outcomes, which is the mix banks and fintechs use in their SQL rounds.

See the FinTrust tables

FinTrust schema

All tables live in the fintrust schema, so write fintrust.customers in your queries.

fintrust.customers

One row per bank customer.

  • customer_id (INT) — PK
  • full_name (VARCHAR(80))
  • city (VARCHAR(40))
  • segment (VARCHAR(20)) — 'retail', 'premium', 'business'
  • kyc_status (VARCHAR(20)) — 'VERIFIED', 'PENDING', 'REJECTED'
  • joined_date (DATE)

fintrust.accounts

Accounts held by customers; a customer can hold several.

  • account_id (INT) — PK
  • customer_id (INT) — FK → customers.customer_id
  • account_type (VARCHAR(20)) — 'SAVINGS', 'CURRENT', 'CREDIT_CARD'
  • opened_date (DATE)
  • status (VARCHAR(10)) — 'ACTIVE', 'CLOSED', 'FROZEN'
  • balance (DECIMAL(14,2)) — current balance in INR; negative for card dues

fintrust.transactions

Money movements on accounts (INR).

  • txn_id (INT) — PK
  • account_id (INT) — FK → accounts.account_id
  • txn_at (TIMESTAMP)
  • amount (DECIMAL(14,2)) — always positive
  • txn_type (VARCHAR(6)) — 'DEBIT' or 'CREDIT'
  • merchant (VARCHAR(60)) — nullable; NULL for ATM withdrawals and transfers
  • merchant_category (VARCHAR(20)) — nullable; 'shopping', 'food', 'grocery', 'travel', 'entertainment', 'health', 'fuel', 'salary', 'transfer'
  • channel (VARCHAR(10)) — 'POS', 'ONLINE', 'UPI', 'ATM', 'NEFT'

fintrust.loans

Loans issued to customers.

  • loan_id (INT) — PK
  • customer_id (INT) — FK → customers.customer_id
  • account_id (INT) — FK → accounts.account_id; account the EMIs are debited from
  • loan_type (VARCHAR(12)) — 'HOME', 'PERSONAL', 'AUTO', 'EDUCATION'
  • principal (DECIMAL(14,2))
  • interest_rate (DECIMAL(5,2)) — % per annum
  • tenure_months (INT)
  • start_date (DATE)
  • end_date (DATE) — nullable; set when the loan is closed or written off
  • status (VARCHAR(10)) — 'ACTIVE', 'CLOSED', 'DEFAULTED'

fintrust.repayments

The EMI schedule: one row per instalment due, with what was paid.

  • repayment_id (INT) — PK
  • loan_id (INT) — FK → loans.loan_id
  • due_date (DATE)
  • amount_due (DECIMAL(12,2))
  • payment_date (DATE) — nullable; NULL while unpaid
  • amount_paid (DECIMAL(12,2)) — 0 while unpaid

fintrust.fraud_signals

Alerts raised on transactions by rules, the ML model or staff.

  • signal_id (INT) — PK
  • txn_id (INT) — FK → transactions.txn_id
  • signal_type (VARCHAR(12)) — 'RULE_ENGINE', 'ML_MODEL', 'MANUAL'
  • score (DECIMAL(4,3)) — 0.000 to 1.000; higher is riskier
  • created_at (TIMESTAMP)
  • review_outcome (VARCHAR(10)) — nullable; 'fraud' or 'legit' after an analyst review; NULL if not reviewed

Beginner (10)

  • BeginnerActive accounts by typeOpen now
  • BeginnerCustomers who joined in the last 90 daysOpen now
  • BeginnerLargest debits in the last 30 days
  • BeginnerSpending categories
  • BeginnerFrozen accounts and their balances
  • BeginnerLoan book by status
  • BeginnerLarge ATM withdrawals
  • BeginnerAverage balance of active savings accounts
  • BeginnerTransactions by channel (last 7 days)
  • BeginnerCustomers without verified KYC

Intermediate (12)

  • IntermediateMonthly credits, debits and net flow
  • IntermediateCustomers holding more than one product
  • IntermediateTop merchants by spend (90 days)
  • IntermediateDormant accounts (no activity in 90 days)
  • IntermediateActive loans by interest-rate band
  • IntermediateLoans with late EMI payments
  • IntermediateHigh-risk alert rate by channel
  • IntermediateEMI collection rate last month
  • IntermediateCustomers with large active borrowing
  • IntermediateAverage ticket by category and channel
  • IntermediatePrincipal-weighted portfolio interest rate
  • IntermediateUnknown merchants versus a literal Unknown label

Advanced (21)

  • AdvancedRunning net balance for an account
  • AdvancedDays-past-due buckets for active loans
  • AdvancedRapid-fire debits (card testing)
  • AdvancedFraud model precision at a 0.8 threshold
  • AdvancedDefault rate by origination quarter
  • AdvancedSpending spikes this month
  • AdvancedTop merchant in each category
  • AdvancedCustomer 360 summary
  • AdvancedCredit card spend month over month
  • AdvancedPossible duplicate transactions
  • AdvancedTrailing 24-hour debit exposure per transaction
  • AdvancedFraud classifier recall from reviewed transactions
  • AdvancedRobust principal outliers with median absolute deviation
  • AdvancedAtomic transfer with ordered row locks
  • AdvancedNonblocking fraud-review work selection
  • AdvancedObserve transaction isolation and explain write skew
  • AdvancedIdempotent insertion using a genuine unique key
  • AdvancedNOT NULL versus CHECK in transaction schema
  • AdvancedDaily credit and debit matrix without mixing signs
  • AdvancedPlan a NOT EXISTS overdue-loan query
  • AdvancedA stored procedure called within the caller's transaction

Mock interview round (5)

  • AdvancedMock round 1: Net deposits by segment
  • AdvancedMock round 2: Loans with consecutive missed EMIs
  • AdvancedMock round 3: Fraud review queue
  • AdvancedMock round 4: Customers with regular salary credits
  • AdvancedMock round 5: 30+ DPD rate by city

Choose optional cookies

We use necessary cookies for account security. With your permission, we also use analytics and advertising cookies on marketing pages. See our Privacy Policy.