© 2012 triAGENS GmbH | 2012-04-04 26 Base building block: scopes The query language is scoped Variables can only be used after they have been declared Example: FOR u IN users FOR l IN locations FILTER u.a == l.b Scopes can be made explicit using brackets (will be shown later) Introduces u Introduces l Can use both u and l