I am trying to run a query on AWS Athena
SELECT t1.col1,
t1.col2,
t2.col2,
t2.col3
FROM "db"."table1" AS t1
INNER JOIN "db2"."table2" AS t2
ON t1.col2 = t2.col2
GROUP BY t1.col1, t2.col3
HAVING COUNT(1) = 1 LIMIT 10;
but getting below error
SYNTAX_ERROR: line 2:10: '"t1"."col2"' must be an aggregate expression or appear in GROUP BY clause
Is there any way I can disable ONLY_FULL_GROUP_BY in AWS Athena or perform a GROUP BY on partial select columns.
Thanks in advance.