Loading...

Model Accuracy Drift

A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
hard
Seniority
senior

Problem

We track model versions and their accuracy over time. For each model, calculate the difference between the accuracy of its most recent version and the average accuracy across all previous versions, rounded to 2 decimal places. If a model has only one version, return 0 for the difference. Show model name, average lifetime accuracy, latest accuracy, and the difference.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.