Invalid build of partition query throws SQL syntax error

SQL syntax errors are thrown, because of invalid builded queries. Error comes from the use of the "AS" keyword in SELECT columns, what's not correct to put in the PARTITION statement.

There is also no need in specifying all the columns you want to get back from the PARTITION, because you want use them all anyway. That part was initially causing also some SQL errors.

I ran all tests and they were completed successfully.