You are just asking how to get the result-set back... It really does not matter if you are getting a materialized column or a calculated one.

Have you looked at the samples and embeedes SQL topic in the help?
ESQL Example (dataaccess.com)

You need to fetch the result-set (row by row, which in your case is a single row as your are doing a group by...) and then, get the column values...
SQLFetch + SQLColumnValue