I have a supply chain I’m looking to keep track of:
Growers
Processors
Wholesalers
Markets
These are all listed in my “Entities” table with a “Type” field distinguishing them.
Now, I’ve figured out how to link single-steps using a relationship table:
Growers <-> Processors
Name | Grower | Processor
And then use a Lookup field in the Entities table to display which growers work with which processors, and vice-versa. I also have a Processors <-> Wholesalers table that does the same thing.
Now, what I need is to use those two tables to create a list of every Grower a Wholesaler might have in their supply chain.
In MySQL it would look like:
SELECT growers
FROM growers_processors AS gp
WHERE gp.processor IN (
SELECT processor
FROM processor_wholesaler AS pw
WHERE pw.wholesaler = 'Wholesaler Name'
)
Is this possible? Or should I stick with a database?
Once I get that, I’ll need to know which Market might carry product handled by which wholesaler, processor and grower.
