ArangoDB Query Language (or AQL) is a declarative querying language used inside the multi-model database ArangoDB.
Questions tagged [aql]
448 questions
0
votes
1 answer
What's the best way to make EXISTS query in ArangoDB
I would like to check if a query (filter) is not empty, something like this in PostgreSQL:
select EXISTS(select 1 from tab where tab.name = 'abc')
https://www.postgresql.org/docs/11/functions-subquery.html
My current approach in AQL is:
RETURN…

Robert Zaremba
- 8,081
- 7
- 47
- 78
0
votes
0 answers
ArangoDB. Long time query
I have ArangoDB query. This query executes generally normal, but suddenly too long
WITH
DependantPerson, PersonServiceProfile, MonitoringRule, DeviceSensor, PersonDevice, Subscription, Person, Link, DeviceApplication, Contact
FOR res IN…

Антон Козлов
- 1
- 1
0
votes
1 answer
ArangoDB REGEX_TEST index acceleration?
Is there a way to index while performing REGEX_TEST() on a string to field to retrieve documents in ArangoDB?
Also if there is any way to optimize this please let me know

siva
- 63
- 1
- 16
0
votes
2 answers
Dynamic AQL query with ES6 literal template
I would like to generate a query dynamically in Foxx. The filter statement would be there or not depend on the request parameter. For example
//Conditionally determine if we should include a filter statement here or not
var…

Loredra L
- 1,485
- 2
- 16
- 32
0
votes
1 answer
Limit edges used on named graph traversal
Q: Can I limit the edge collections the system will try to use when traversing named graphs AQL?
Scenario:
If I have a named graph productGraph with two vertices collections and two edge collections:
Vertices: product, price
prodParentOf (product A…

camba1
- 1,795
- 2
- 12
- 18
0
votes
1 answer
get common elements from a result which consists of more than 1 array in arangodb
I want to fetch common elements from multiple arrays. The no. of arrays resulted would keep changing depending upon the no. of tags in array a[].
As a first step, my query and result I get is as shown below:
let a=["Men","Women","Accessories"]
let…
0
votes
2 answers
When graph consistency will be implemented in ArangoDB java driver?
Some time ago I asked about deleting vertices with associated edges. The answer was that the edges don't deleted automatically by AQL when vertices are deleted.
I use Arango java driver for working with ArangoDB.
My questions are:
When graph…

Daria
- 43
- 6
0
votes
1 answer
using collect in arangodb insert to create new documents
I have a collection called prodSampleNew with documents that have hierarchy levels as fields in arangodb:
{
prodId: 1,
LevelOne: "clothes",
LevelTwo: "pants",
LevelThree: "jeans",
... etc....
}
I want take the hierarchy…

camba1
- 1,795
- 2
- 12
- 18
0
votes
1 answer
Concise way to filter on two child attributes in ArangoDB (AQL / Spring Data ArangoDB)
In ArangoDB I have documents in a trip collection which is related to documents in a driver collection via edges in a tripToDriver collection, and the trip documents are also related to documents in a departure collection via edges in a…

Bjorn Thor Jonsson
- 827
- 1
- 10
- 21
0
votes
1 answer
Query AQL syntax required for following JSON structure
I have a JSON structure like this
{
"Items": {
"Apple": {
"Type": 2,
"keyVal": "6044e3a3-c064-4171-927c-2440e2f65660"
},
"Lemons": {
"Type": 1,
"keyVal": "79c45f4d-4f62-4c8e-8de1-79e04fc9b95d"
}
…

param trivedi
- 161
- 1
- 2
- 10
0
votes
1 answer
Modelling GRAPH query with scenario
I have 2 vertexes one is USER and one is PLACE, Any user can review a place and any user can like or comment on that review. In this scenario, there will be two edges one storing review done by any user on any place and one storing any kind of…

Mustanish Altamash
- 139
- 1
- 9
0
votes
1 answer
QRAdar - AQL no viable alternative at input SELECT
I'm getting an error when I try to use this query. It works in advanced search tab in log activity. But when I write it into the rule wizard AQL filter query area, it prompts AQL no viable alternative at input SELECT warning. I got this query from…

ibtavsan
- 3
- 3
0
votes
0 answers
Arangodb - slow cursors
Hi I've got a simple collection with 40k records in. It's just an import of a csv (c.4Mb) so it has a consistent object per document and is for an Open Data portal.
I need to be able to offer a full download of the data as well as the capabilities…

s james
- 11
- 1
0
votes
0 answers
Using groupsVariable in COLLECT to track unique values
I'm using the following AQL to track unique visitors by month and year. Each hit contains a datetime stamp, _date, and a user name, user.
FOR hit IN PageHits
COLLECT month = DATE_MONTH(hit._date),year=DATE_YEAR(hit._date) INTO user=hit.user
SORT…

Brendan Wheble
- 52
- 3
0
votes
1 answer
Converting a MongoDB aggregate into an ArangoDB COLLECT
I'm migrating data from Mongo to Arango and I need to reproduce a $group aggregation. I have successfully reproduced the results but I'm concerned that my approach maybe sub-optimal. Can the AQL be improved?
I have a collection of data that looks…

Brendan Wheble
- 52
- 3