SELECT DISTINCT() FROM ...

14 views
Skip to first unread message

Xavier Mertens

unread,
Nov 28, 2022, 10:19:02 AM11/28/22
to velociraptor-discuss
Hi *,

Should this syntax work in a Notebook? I'm trying to get a list of unique values for a column...
Here is my query:

SELECT DISTINCT(TaskName) FROM source(artifact="Windows.EventLogs.ScheduledTasks")

/x

Carlos Cajigas

unread,
Nov 28, 2022, 10:31:02 AM11/28/22
to Xavier Mertens, velociraptor-discuss

Hi Xavier,
Count gives you distincs, are you actually needing to remove the count column?

SELECT count() AS Count,TaskName FROM source(artifact="Windows.EventLogs.ScheduledTasks")
GROUPBY TaskName
ORDERBY Count DESC

Xavier Mertens

unread,
Nov 29, 2022, 12:31:20 PM11/29/22
to velociraptor-discuss
Tx Carlos, worked great!

/x

Reply all
Reply to author
Forward
0 new messages