Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Ralph1973
Contributor

remove duplicate output from custom sql query, how?

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 1
hzhao_FTNT
Staff
Staff

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

Top Kudoed Authors