Skip to content
SQLSimplified
BackendQuestion 27 of 52

Serializable Isolation

Problem

You are calculating the total balance across all bank accounts. If someone transfers money between two accounts while your query runs, you might count the money twice or not at all. You need the absolute highest level of database isolation to run your report safely. Write a query that outputs behavior with the value: "Serializable is the strictest isolation level, preventing dirty reads, non-repeatable reads, and phantom reads."

Database Schema

This problem acts as a scratchpad. You will write your own DDL/DML or conceptual queries, so there is no predefined schema.

Try It

Loading playground environment...

Hint

Solution