Skip to main content
All Questions

Fraudulent Transactions

Medium
Unlock detailed company stats for this questionUpgrade

Visa's Anti-Money Laundering (AML) department is responsible for identifying potentially suspicious financial transactions to ensure compliance with global financial regulations. A key part of their investigation process involves tracking receipts of large transactions. These receipts typically have an associated receipt number.

You're provided with two tables:

  1. customers:
    • customer_id (integer): A unique identifier for the customer.
    • first_name (string): The first name of the customer.
    • last_name (string): The last name of the customer.
  2. transactions:
    • transaction_id (integer): A unique identifier for the transaction.
    • customer_id (integer): The ID of the customer associated with the transaction.
    • receipt_number (string): The receipt number for the transaction.
    • amount (float): The amount of money involved in the transaction.

The AML team has identified a list of potentially suspicious receipt numbers based on certain patterns. The patterns they're concerned about are '999', '1234', and 'XYZ'. Customers are flagged as potential money launderers if they have 2 or more such receipts matching these patterns.

Write an SQL query that returns a table with all suspicious receipt numbers made by potential money launderers. Ensure you display the customer's first name, last name, the associated suspicious receipt number and the number of offences the customer has committed.

Your output should contain the following columns: first_name, last_name, receipt_number, no_of_offences.

Related courses

Course

Data Analyst Interview Prep

Ace your data analyst interviews—whether you're targeting product, marketing, or business analyst roles. Tackle real take-home case studies, sharpen your technical and dashboarding skills, and get strategies from interviewers at top tech companies and startups.

Course

Data Science Interview Prep

Land your dream data science role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates. Practice statistics, experimentation, coding, SQL, machine learning, behavioral interviews, and more.