SELECT *, count(idWallHasWallPost) as republish FROM admin_pw.wall_has_wallpost
where WallPost_idWallPost in
(select WallPost_idWallPost from wall_has_wallpost where Wall_idWall in
(select Wall_idWall from follower where User_idUser=1))
group by WallPost_idWallPost
having republish>1;
I have this nested query in mysql. Is there anyway to acces the values from the nested queries higher up in the query.
I would like to access Wall_idWall in last select. I select it the query lowest and would like to see which Wall_idWall was used by the in operator.