The reason behind %%sql

Why do we require %%sql on its own line to start the query?

Those %% make it possible to run SQL queries in Jupyter Notebook.

They are called magic commands that offer additional functionalities that might not be [easily] possible with python. You can read more about them here - Built-in magic commands — IPython 7.26.0 documentation if you’d like to.