Query Output: Aggregate: HAVING clause to filter results by value of an aggregate

I have an add-on where I need to apply something like the SQL HAVING clause. Basically, the query is showing the user all the times they and their friends are available. But right now it’s including all the times that only a single person is available. I only want it to include the entries where at least 2 friends are available.

I know that in SQL, I would aggregate the data to have a friend_count property, and then I would use the HAVING clause to only include items where friend_count>1.

Is that something that would be possible in Xano?