I’m really struggling with a MySQL query that I’m really hoping someone can help me with. I have three tables in a MySQL database – Table A, B, and C. I would like to find all values from Table A, column 1 (a.1) that match a value in Table B column 2 (b.2). Then for each b.2 match, find all other b.2 values in Table B that are within a range of +/- 100 of the integer value found in b.3 within rows where a.1 matched b.2. Then finally I need to take these b.2 values and find matching b.2 values in Table C column 4.
Here is how I was trying to perform the query:
SELECT *
FROM TableB AS b
INNER JOIN TableA AS a ON b.2 = a.1
AND b.3 >= (b.3 - 100)
AND b.3 <= (b.3 + 100)
INNER JOIN TableC as c
ON b.2 = c.4;
I’ve tried to illustrate what I am trying to do with a picture, I hope this helps.

From your description I distilled this query:
Issues I see in your query:
WHERE a.1 = b.2where it should beON a.1 = b.2ON bb.3 = c.4, while according to your description it must be ONbb.2 = c.4.