Getting error when executing below code.
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
StringBuilder sb = new StringBuilder();
sb.append("select");
sb.append(" region_name,");
sb.append(" sum(case when SUBCASE_MEASURED = '1'");
sb.append(" AND FE_TYPE = 'ASP'");
sb.append(" AND MONTH = '2018-Jun'");
sb.append(" then 1");
sb.append(" else 0 end) count1,");
sb.append(" sum(case when");
sb.append(" SUBCASE_MEASURED = '1' AND FE_TYPE = 'ASP' AND QUARTER = 'Q2-2018' then 1 else 0 end) count2");
sb.append(" from late_start_conf_dsptch_accu");
sb.append(" GROUP BY region_name;");