Part of my database consists of these three tables. And I'm trying to get to a SQL query that tells me the clients by sellers, ie for example: John sellers sells for 4 stores (street y, street x, street j, street z) in which each one of these shops belongs to only one customer, in this example the store of the street x belongs to the client Nike, the one of the street and the client Adidas, the one of the street j also belongs to the Nike and the store z belongs to the client Billabong < p>
A store can have more than one seller, eg: John sells tennis and Thomas sells coats at the same store.
Relationships:
sellers- > stores: many to many (pivot table: stores_sellers)
clients-> stores: one for many
Based on the example above I wanted a query that told me John's customers through the stores he owns. Result would be: (Nike, Adidas, Billabong)