Skip to main content
Ralph1973
New Member
February 23, 2017
Question

remove duplicate output from custom sql query, how?

  • February 23, 2017
  • 1 reply
  • 4713 views

Hello, I am trying to find out how to remove duplicate results (users in this case) from the output.

I have a customer who has an RDS portal with a Fortigate captive portal where users have to enter their credentials and fortitoken code. The customer wants to know whether a user has logged in via the rds portal in the last month.  I found the log that shows when a user succesfully logs in and then created a dataset that will show date, user and client source ip.

I created the chart with the dataset and a report template that will create a report with last months logins.

However if a user had logged in several times (what happens of course) I only want to have 1 result.

What needs to be added in the query? Second, is there a way to remove the default 'succeeded in authentication' text from the 2nd column?

Thanks for any help,

Ralph Willemsen

Arnhem, Netherlands

1 reply

hzhao_FTNT
Staff
Staff
February 24, 2017

Hi there, you can aggregate "datum" by string_agg function and "group by srcip, msg". Because of the size limit of single table cell, if you have too many entries for "datum", some of them will be truncated.

 

Regards,

hz

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!