I'm not sure where to even start. But I will explain as best as I can
in Apex I will have a Query that will give a set of results
lets say the results are
I want these results to be a link to a subquery that will be based on values of the link
so if i click Yankees
it take me to another query that has the team members and age for example.
any direction greatly appreciated