FastPrepPercentage of Blocks Never Edited

Percentage of Blocks Never Edited

Notion logoNotion● MediumFULLTIMEPHONE SCREEN

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

ColumnTypeNullableDescription
block_idPKIntegerNo—
created_atTimestampNo—

block_edits

ColumnTypeNullableDescription
edit_idPKIntegerNo—
block_idIntegerNo—
edited_atTimestampNo—

Foreign key: block_id → blocks(block_id)

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
never_edited_percentageDecimalNo—

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 problems

See Notion hiring insights