Not a query expert by any means, but here is what I'm trying to do.
I'm trying to build a report for management that shows Platform logins for "today" that includes the first login of the day and the most recent login of the day.
I was able to create a query in SWQL Studio to get all logins for today, but I can't seem to figure out how to filter it to get only the two entries I need.
Here is what I have so far:
SELECT AccountID,
ToLocal(TimeLoggedUtc) AS Login,
AuditEventMessage
FROM Orion.AuditingEventsWHERE ActionTypeID = 1 AND AccountID NOT LIKE 'websitemaintenance%' AND TimeLoggedUtc >= GETDATE()
GROUP BY AccountID, TimeLoggedUtc, AuditEventID, AuditEventMessage, ActionTypeID
The question being answered: "Who has logged in today, what time did they originally log in, and have they logged in since then?"
This will eventually be put into either a report or a dashboard.
Any ideas? Any help is greatly appreciated.
And…if I posted this in the wrong section, please let me know. :)