FastPrepInactive Customers with Prior Activity
Problems/Inactive Customers with Prior Activity

Inactive Customers with Prior Activity

Mastercard logoMastercard● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionConstraints

Problem statement

Source note: A public post of Mastercard Data Analyst interview questions asks for customers who were inactive in the past year but had earlier activity. We chose the table layout and the calendar dates for the cutoffs. Our version is about 95% the same as the reported question.

Find customers who made at least one transaction before the one-year lookback window but made no transaction during that window.

The window begins one calendar year before as_of_date, inclusive, and ends at as_of_date, exclusive. Customers who never transacted do not qualify.

Table schema

MySQLPostgreSQLPandas

Use the same input data with any supported language. Open the Schema tab in the editor to see the generated SQL setup or Pandas DataFrames.

customers

ColumnTypeNullableDescription
customer_idPKIntegerNo—
customer_nameTextNo—

transactions

ColumnTypeNullableDescription
transaction_idPKIntegerNo—
customer_idIntegerNo—
transaction_dateDateNo—
transaction_amountDecimalNo—

Foreign key: customer_id → customers(customer_id)

analysis_params

Contains exactly one row with param_id 1.

ColumnTypeNullableDescription
param_idPKIntegerNo—
as_of_dateDateNo—

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
customer_idIntegerNo—

Row order: must match exactly. Numeric tolerance: 0.

Constraints

  • analysis_params contains exactly one row with param_id = 1.
  • Future-dated transactions do not count as prior or recent activity.
  • Return customer IDs ascending.

More Mastercard Phone Screen questions

  • Top Three Accounts by Monthly Transaction AmountPHONE SCREEN · Seen Sep 2026
  • Deduplicate a List While Preserving OrderPHONE SCREEN · Seen Jul 2026
  • Employee With the Highest SalaryPHONE SCREEN · Seen Jul 2026
  • Group Names by DepartmentPHONE SCREEN · Seen Jul 2026
  • Credit and Debit Transaction Counts per UserPHONE SCREEN · Seen Apr 2026
  • Users with Three Transactions in Sixty SecondsPHONE SCREEN · Seen Apr 2026
  • Container With Most WaterPHONE SCREEN · Seen Oct 2025
  • Employees with the Highest and Lowest SalaryPHONE SCREEN · Seen Apr 2025
  • Merchant Category Transaction SummaryPHONE SCREEN · Seen Nov 2024
  • Top Customers by Six-Month Transaction AmountPHONE SCREEN · Seen Nov 2024

Similar questions at other companies

  • Nth Highest SalaryPaytm · PHONE SCREENPaytm interview questions
  • Email Funnel: Opened Within a Day, Replied Within a WeekSuperhuman · PHONE SCREENSuperhuman interview questions
  • iPhone Model Sales Share by CountryApple · PHONE SCREENApple interview questions
  • In-Memory Database QueriesOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
  • Top Three Sales per County and YearClickhouse · PHONE SCREEN
  • Block Type with the Most ChildrenNotion · PHONE SCREENNotion interview questions
  • Third-Highest Known SalaryAdobe · PHONE SCREENAdobe interview questions
  • Days Between Each User's Latest Two PostsZip · PHONE SCREENZip interview questions
  • Observed-User Percentage by AppMicrosoft · PHONE SCREENMicrosoft interview questions
  • Nth-Highest Book Sales VolumeAmazon · PHONE SCREEN

Mastercard interview experiences

  • Mastercard Data Science Intern Interviews: 10 Experiences
All Mastercard interview questionsSee Mastercard hiring insights