I have a content type called “Event” and other “City”, I created a relation that Event has one City. And now I’m trying to know, cities that have events.
To do that I’m creating a new endpoint called /cities/with-events and I would like to return only cities, that have events, and desiredly the number of events for each city.
But, how can I do that? In other system than strapi. I think a solution is to query events doing group by city, and also counting each city.