The Advanced SQL Editor should provide some kind of query validation. This will help with a more user-friendly experience.
Basic query validation is provided. The query needs to actually run in order to fully determine whether it is valid for not. Hence, the SQL editor allows typing a free-form query. Then, until it executes successfully, the data grid is not shown on the next step.
If the query succeeds, the data grid is shown with the populated data.
If the query fails, the sql editor is shown again with an error message. The option to move to next step is disabled. To enable the option, either the OK button can be pressed (an override). Or, changing the query will enable the option also.
Screenshot of the error message upon query execution failure: