Mysql query for list of followers <p>I am trying to figure out how I can obtain the list of user followers and his/her status of following to them. For example, I have 10 followers, and I need to know if I am following them or not. It's a feature like on Instagram, when you can observe people and be observed.</p> <p>I have one table:</p> <pre><code>follower user_id reg_dt followed 1 2 date true </code></pre> <p>In above mentioned example user 1 is followed by user 2. If the user will unfollow, the flag will be false, but it will be in DB.</p> <p>I want to achieve:</p> <pre><code>follower user_id reg_dt followed logged_user_follower 1 2 date true false </code></pre> <p>It means that user 1 is followed by user 2, but user 1 is not following user 2.</p> <p>I tried 2 queries:</p> <pre><code>select follower.follower_id as follower, follower.user_id as user_id, follower.followed as followed, follower.reg_dt as reg_dt from tb_follower follower where follower.follower_id=1 and follower.followed=1; </code></pre> <p>to get list of followers (of user 1) and:</p> <pre><code>select 1 as logged_user_follower from tb_follower follower where follower.follower_id=follower.follower_id and follower.followed=1 and follower.user_id = follower.user_id limit 1 </code></pre> <p>to get the status logged_user_follower.</p> <p>I don't know how to merge this to queries, to do one efficient, to get list all the followers of particular user and his/her status of following to them.</p> <p>Any help will be appreciated. Thanks.</p>