Using SELECT in the WHERE clause of another SELECT
Is this what you're aiming for? Make sure the fields that are being compared are comparable (i.e. both fields are numeric, text, boolean, etc).
SELECT * FROM Individual
INNER JOIN Publisher
ON Individual.IndividualId = Publisher.IndividualId
WHERE Individual.IndividualId = (SELECT someID FROM table WHERE blahblahblah)
If you wish to select based on multiple values:
SELECT * FROM Individual
INNER JOIN Publisher
ON Individual.IndividualId = Publisher.IndividualId
WHERE Individual.IndividualId IN (SELECT someID FROM table WHERE blahblahblah)
You can just rewrite that as another JOIN
. This is normally simplest and fastest:
SELECT i.*, p.*
FROM individual i
JOIN publisher p USING (individualid)
JOIN another_table a ON a.identifier = i.individualid
WHERE a.something = 'something'
I also simplified somewhat and did away with the gratuitous CamelCase spelling of identifiers.