← Questions

Rewrite a SQL query plan tree

0
DatabricksCodingLast asked Sep 2026

A coding interview question asked in Databricks's algorithms (two rounds) round, last asked Sep 2026. It tests trees, query optimization and databases.

A query engine represents a SQL query as a tree of plan nodes. You are handed such a tree and asked to make it cheaper without changing the rows it returns.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

trees · query optimization · databases

Your code and the AI tutor open when you unlock this question.