Observed-User Percentage by App
Updated
Problem statement
Table app_installs stores each app's total installed-user count. Table app_observations stores user observations by app and date.
For every app in app_installs, return the percentage of installed users who appear at least once in app_observations. Count distinct user IDs across all dates, round the percentage to two decimal places, include apps with no observations as zero, and order rows by app ascending.
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_installs
| Column | Type | Nullable | Description |
|---|---|---|---|
| app | Text | No | — |
| installed_users | Integer | No | — |
app_observations
| Column | Type | Nullable | Description |
|---|---|---|---|
| app | Text | No | — |
| user_id | Text | No | — |
| observed_date | Date | No | — |
Expected result
Your query or function must return these columns.
| Column | Type | Nullable | Description |
|---|---|---|---|
| app | Text | No | — |
| observed_percentage | Decimal | No | — |
Row order: must match exactly. Numeric tolerance: 0.005.
Constraints
installed_usersis positive for every app.- Repeated observations of the same user and app count once.
- Observation rows for apps absent from
app_installsare excluded. - The result columns are
appandobserved_percentage.
More Microsoft Phone Screen questions
- Config Store with Priority OverridesPHONE SCREEN · Seen Nov 2026
- Corporation Reporting LinesPHONE SCREEN · Seen Oct 2026
- Random Forest Classifier from ScratchPHONE SCREEN · Seen Oct 2026
- Least Recently Used CacheOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
- Greedy and Beam Sentence DecodingPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
- Top K Frequent ElementsPHONE SCREEN · Seen Sep 2026
- 3SumPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
- Arithmetic Expression EvaluatorPHONE SCREEN · Seen Sep 2026
- Employee Hierarchy Cycle and Depth AnalysisPHONE SCREEN · Seen Sep 2026
- Most Visited String SectorsPHONE SCREEN · Seen Sep 2026
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
- Top Three Accounts by Monthly Transaction AmountMastercard · PHONE SCREENMastercard 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
- Nth-Highest Book Sales VolumeAmazon · PHONE SCREEN