Got error messages when using CTE and Window Functions

I am using MySQL in Redash, which is upgraded to 9.0 beta version. Whenever I try to use Common Table Expressions or Window functions, I always get error messages.
I would like to know what causes the issues and what possibles ways to solve them.

Thank you in advance for your time and help!

Can you share what errors you see?

Do the same queries work if you run them from a different SQL tool?