← Questions

Rewrite a SQL query plan tree

0
DatabricksCodingLast asked Sep 2026

A query plan is a tree of scan, filter, project and join nodes. Write rewrite rules that make it cheaper, such as moving a filter beneath a join, while the new plan still returns exactly the same rows.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding