FastPrepNew-User Devices That Opened an App
Problems/New-User Devices That Opened an App

New-User Devices That Opened an App

Microsoft logoMicrosoft● EasyFULLTIMEONSITE INTERVIEW

Updated Nov 2026

QuestionConstraints

Problem statement

Source note: A Microsoft Data & Applied Science PhD internship onsite gives one table of device, app and open count, and one table of device and new user. It asks how many devices that opened an app belong to new users. We chose that opens are positive, devices are distinct, how to treat unmatched rows, a fixed shape for the result, the table layouts and the limits.

Tables app_opens and device_users describe application activity and whether each known device belongs to a new user.

Return one row containing the number of distinct known new-user devices with at least one activity row whose open_count is positive.

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.

app_opens

ColumnTypeNullableDescription
device_idTextNo—
app_nameTextNo—
open_countIntegerNo—

device_users

ColumnTypeNullableDescription
device_idTextNo—
is_newBooleanNo—

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
new_device_countIntegerNo—

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

Constraints

  • A device can appear in multiple app_opens rows and must be counted once.
  • Rows with open_count = 0 do not qualify.
  • Activity for a device absent from device_users does not qualify.
  • Always return one row, including a zero count.

More Microsoft Onsite Interview questions

  • Bad Request AlertsONSITE INTERVIEW · Seen Nov 2026
  • Longest Substring Without Repeating CharactersONSITE INTERVIEW · Seen Nov 2026
  • Valid ParenthesesONSITE INTERVIEW · Seen Nov 2026
  • Count a User's Actions in an Event LogONSITE INTERVIEW · Seen Nov 2026
  • Smallest Batch Size Within a Step LimitONSITE INTERVIEW · Seen Nov 2026
  • Count Subarrays with Equal Even and Odd CountsONSITE INTERVIEW · Seen Nov 2026
  • Minimum Time to Rot All OrangesONSITE INTERVIEW · Seen Nov 2026
  • Coin ChangeONSITE INTERVIEW · Seen Oct 2026
  • Daily USD Totals with Effective-Dated Exchange RatesONSITE INTERVIEW · Seen Oct 2026
  • Number Words to Digits in Any LanguageONSITE INTERVIEW · Seen Oct 2026

Similar questions at other companies

  • Delete Duplicate Employee RecordsInfosys · ONSITE INTERVIEWInfosys interview questions
  • Records Created or Updated in a Time WindowPelatro · ONSITE INTERVIEW
  • Top Ten Employee SalariesSolytics Partners · ONSITE INTERVIEW
  • Latest New JobSphere · ONSITE INTERVIEW
  • Employees Whose Manager Left the CompanyZS · ONSITE INTERVIEWZS interview questions
  • Employees Above Average SalaryJP Morgan Chase · ONSITE INTERVIEWJP Morgan Chase interview questions
  • Employees Without a ManagerBank of America · ONSITE INTERVIEWBank of America interview questions
  • Retrieve Every Student RecordLSEG · ONSITE INTERVIEWLSEG interview questions
  • Combine Winner and Loser NamesAmazon · ONSITE INTERVIEW
  • Conditionally Insert or Update RecordsKlaviyo · ONSITE INTERVIEWKlaviyo interview questions

Interview reports that mention this question

  • Microsoft AI/ML Intern Interviews: 114 Experiences (Part 1 of 2)

Microsoft interview experiences

  • Microsoft OA Questions, October 2026: 4 Experiences
  • Microsoft Experienced SWE Phone Screen: 1 Experience
  • Microsoft Explore and Student SWE: 12 Experiences (Part 6 of 6)
  • Microsoft SWE Intern, Early 2025: 41 Experiences (Part 5 of 6)
  • Microsoft SWE Intern, Mid 2025: 42 Experiences (Part 4 of 6)
All Microsoft interview questionsSee Microsoft hiring insights