DSQL - sum(*) is not allowed in SQL