I'd suggest running the query in a database tool to get a better explanation of the problem with the SQL statement.
Have tried that, look like the column are correctly displayed
It may be the side column - i see a case in the second part that looks like it's missing an AS.
Yes, this is missing, but after I add AS side, it still show the error...
