Filter by the number of occurrences

Hi everyone!

I have a bucket called bluetooth with the measurement rpi to which I am writing bluetooth MAC addresses (_field) and RSSIs (_value). I’d like filter out MACs that only occur 20+ times within the selected time range and show their RSSIs in a graph. In other words, I do not want to return the count; I want to use it as a filter and then just show what’s in the database.

I am a beginner and so far spend roughly three hours reading the documentation, going through forums and trying different approaches using count(), group(), join() and other functions, all of which either gave me errors I could not figure out how to solve or simply returned the count and not the actual data points with the RSSIs for each MAC.

I feel like I am stuck and it’s not getting better the more that I read. Any help would be very much appreciated! :slight_smile:

Thanks,
Andi