I’ve trawled through a number of conditional MySQL type questions online but haven’t come across anything that helps with this query, it’s likely I’m describing the question incorrectly in my internet search, however, if anyone can help it would be greatly appreciated.
Assume I have a table titled results with the three columns outlined below how do I query the table for all teammates of James? I know I can query WHERE Team = 'B', however, if I don’t know the team name, how do I get all teammates of James?
Team Name Place
A John 1
B James 2
B Harry 3
C Brad 4
What I want to return is the following:
Team Name Place
B James 2
B Harry 3
Is a two query type approach required, where I first query the team name for James and then use the output of that query to undertake a second query?