Query based on user ID and other Table

As i cant refer text to text on relations, I need to do a query to fetch like following:

Sum all Total Revenue where store_royalties.Label = music_label_name => ref Owner.uuid = Auth.uuid

Or maybe I Should premodel the data to add a INT at Store Royalties and refer where Label Name = Label_ID to link them for faster sums later?

I'm so stuck on this and Would LOVE to have a hand on how to solve it...
image.png
Was this page helpful?