Register and visualize dataset Query Error

I got this error while working in the queries in the AWS.
QueryFailed: SYNTAX_ERROR: line 7:3: ‘product_category’ must be an aggregate expression or appear in GROUP BY clause. You may need to manually clean the data at location ‘s3://aws-athena-query-results-186247737818-us-east-1/tables/4556d59c-a7d7-45cd-bb32-efcf455df39f’ before retrying. Athena will not delete data in your account.
I had a similar issue in the query before that at [2.2] and I fixed it by creating a new bucket.
but for this error to solve the product_category query I got this error and I’m stuck, please help, thanks.

Since you did not provide the exact spot of the problem, here is one possible guess.

“QueryFailed: SYNTAX_ERROR” is usually a result of an incorrect SQL statement. You might want to double-check the SQL statement and make sure it yields the expected results before moving on to the visualization part.

1 Like