ERROR: syntax error at or near "ORDER" at character 64