Applying Count and Group By in an aggregate formula

Applying Count and Group By in an aggregate formula

We wrote a query that lists what we need and we are looking to create a graph to visualize the data monthly. Some IDs appear more than once in a month and we want to exclude those. Is it possible to do this in an aggregate formula? As much as possible, I'm hoping that we don't have to create another query to achieve this since the query is already long as it is.