DQL syntax error
I am trying to create a DQL report. I am receiving an error message, it states: Parse error: syntax error, unexpected ID, expecting END.
The rule I have mashed together looks like this:
FROM activity
GET user.name
user.domain
sum(count) AS access_count,
path.device.name,
path.absname
formatdate(timestamp, "YYYY-MM-DD HH:mm") AS time
WHERE
timestamp >= datetime("2015/01/01 00:00", "YYYY/MM/DD HH:mm")
timestamp <= datetime("2015/04/21 23:59", "YYYY/MM/DD HH:mm")
IF path.issensitive = 1
GROUPBY user.name,
user.domain,
device.name,
path.absname
SORTBY sum(count) DESC
LIMIT 10;
Do I need to customize it further?
the errors initially were due to missing section delimiters and separators. Essentially each sections request need the Clause Request and data separated by commas until the last item which does not have a comma an then the next request. Example:
Get Table.column1, Table.column2, Table.column3, Table.column4
Next
END;
In the example I posted my lines:GET user.name,
user.domain,
sum(count) AS access_count,
path.device.name
path.absname,formatdate(timestamp, "YYYY-MM-DD HH:mm")
actually reads:
GET user.name,
user.domain,
sum(count) AS access_count,
path.device.name,
path.absname,formatdate(timestamp, "YYYY-MM-DD HH:mm")
in my report. I am not sure why the comma is truncated it must have been a formatting correction I allowed.
Rod