SQL Practice Logo

SQLPractice Online

Level 9 - DistinguishedQuery-Based Questionsm2 storage index mvcc internals

Version Chain Head Query

Write SQL to return row_id and max(version_id) for each row in doc_versions where deleted_flag = 0.

Schema Context

doc_versions(row_id, version_id, deleted_flag, written_at)