Percentage of Blocks Never Edited
Updated
Problem statement
Given all blocks and their edit history, return the percentage of distinct blocks that have no edit record.
Round the percentage to two decimal places and return one row with the column never_edited_percentage.
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.
blocks
| Column | Type | Nullable | Description |
|---|---|---|---|
| block_idPK | Integer | No | — |
| created_at | Timestamp | No | — |
block_edits
| Column | Type | Nullable | Description |
|---|---|---|---|
| edit_idPK | Integer | No | — |
| block_id | Integer | No | — |
| edited_at | Timestamp | No | — |
Foreign key: block_id → blocks(block_id)
Expected result
Your query or function must return these columns.
| Column | Type | Nullable | Description |
|---|---|---|---|
| never_edited_percentage | Decimal | No | — |
Row order: must match exactly. Numeric tolerance: 0.
Constraints
- At least one block is present.
- A block with any number of edit rows counts as edited once.
- The percentage is
100 × unedited blocks / all blocks.
More Notion interview questions
- Nested Todo ListPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
- Mutable Table AggregationsPHONE SCREEN · ONSITE INTERVIEW · Seen Apr 2026
- Block Type with the Most ChildrenPHONE SCREEN · Seen Mar 2026
- Country with the Most EventsPHONE SCREEN · Seen Mar 2026
- Event Type with the Most EventsPHONE SCREEN · Seen Mar 2026
- Most Popular Active Plan for the Top Event TypePHONE SCREEN · Seen Mar 2026
- Page Permission InheritancePHONE SCREEN · ONSITE INTERVIEW · Seen Mar 2026
- Text Document HistoryPHONE SCREEN · ONSITE INTERVIEW · Seen Mar 2026
- Versioned Document StorePHONE SCREEN · Seen Apr 2025
- Top Error Types in a Time WindowONSITE INTERVIEW · Seen Jun 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
- 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