resultSet = SELECT vSet FROM (edgeSet | vertexSet) [whereClause] [accumClause] [postAccumClause] [havingClause] [orderClause] [limitCluase];
Hierarchy from top to bottom
FROM
WHERE
ACCUM
POST-ACCUM
HAVING
ORDER BY
LIMIT
SELECT
FROM: select active vertices & edges
WHERE: conditionally filter the active sets
ACCUM: iterate on edge set; compute with accumulators
POST-ACCUM: iterate on vertex sets; computer with accumulators
HAVING: conditionally filter the result set
ORDER BY: sort
LIMIT: max number of items
SELECT: result from source or target set