iquery accepts two languages: afl and aql.
Here's an example of afl syntax:
AQL% set lang afl;
AFL% sum(filter(dense, a>40), a, x);
And here's an example of aql syntax:
AFL% set lang aql;
AQL% select sum(a) from dense where a>40 group by x as foo;
Note that AFL has a lot more functionality at this stage. Please see Artyom's post for where to find the reference.
Does this help answer your question?