I’m trying to get a sql count as followed
"select c1.id, count(c2.*) "
+ "from Category c1 "
+ "left join Category c2 on c2.parentCategoryId = c1.id "
+ "where c1.id in (" + questions + ") "
+ "group by c1.id");
However I’m getting the following sql exception
Caused by: org.apache.derby.client.am.SqlException: Syntax error: Encountered “*” at line 1, column 24.
at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
Could someone help me to get this query working.
What happens if you replace this:
By this?: