I have posted the same question a while ago here but it didn’t lead to any results so this is a new version with everything I learned so far.
I have a database of cities and temples. Each city has multiple temples associated with it which themselves have multiple items associated with them through a relation. The items (called “Goshuin”) are in a third table.
I’m trying to display a list of cities and with each city the amount of temples and the sum of all Goshuin in those temples.
“Nara” - 8 temples - 14 Goshuin
I’ve gotten as far as this request:
It gives me all the info I need including a count of the temples as well as the Goshuiin. However, the count is incorrect. To use the example from earlier, Nara should have 8 temples but the count function returns 45.
Any pointers are appreciated and feel free to ask me to clarify.
Thank you for your time.