IBM Db2 : An unexpected token "as" was found following "SELECT test_score " (SQL0104N)I am now having trouble with IBM Db2 using queries. I have a code below:
test_score_distribution = %sql SELECT test_score as "Test Score", count(*) as "Frequency" from INTERNATIONAL_STUDENT_TEST_SCORES GROUP BY test_score;
But when executing, I encountered this error:
> (ibm_db_dbi.ProgrammingError) ibm_db_dbi::ProgrammingError:
> SQLNumResultCols failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0104N
> An unexpected token "as" was found following "SELECT test_score ".
> Expected tokens may include: "AND". SQLSTATE=42601\r SQLCODE=-104
> [SQL: SELECT test_score as Test Score, count(*) as Frequency from
> INTERNATIONAL_STUDENT_TEST_SCORES GROUP BY test_score;] (Background on
> this error at: http://sqlalche.me/e/f405)
How can i fix it?