How to get current user analytics based on 3 tables
I have 4 tables
auth
user
music_label
royalties
Need to get the SUM(royalties.total_revenue) of:
auth.uid where
royalties.label_id = music_label.owner = auth.user
already reffered the royalties.label_id with music_label.id
how to get the current sum for the auth.user ?
i'll drop a table model so you can check and a diagram if you need it to help me out
auth
user
music_label
royalties
Need to get the SUM(royalties.total_revenue) of:
auth.uid where
royalties.label_id = music_label.owner = auth.user
already reffered the royalties.label_id with music_label.id
how to get the current sum for the auth.user ?
i'll drop a table model so you can check and a diagram if you need it to help me out