Finding unique values in a given field


I use telgraf to parse nginx logs and then write to iinflux db.

My use case here is that the values i sent ,i need only one entry for each different value
for example if there are 5 records with ip 10.3.x.x and 3 records with ip 10.2.x.x ,after i query i need it to fetch just 1 10.3.x.x and just 1 10.2.x.x ,can anyone help me with a query for this?

Note:- i know group by field names dont work in influx and can be done only with tags,im not sure how to define values as tags in telegraf config file.Help would be appreciated regarding this