Skip to main content

Fraudulent Transactions

MediumPremium

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.