When a SQL query is compiled, it passes through the parser, the semantic analyzer, the optimizer, and the code generator to become executable code.
End of description.