Loki query question about duplicate data

Hello, How to remove duplicate data?For example,count login user in 5 min ,keep the same username for 1