title: Efficient Query - When querying a specific group of IDs in Table A, how can I check a condition in Table B for selected id in Table A?
body: <p>I have a table of users: <code>| username |</code></p>
  
  <p>I have a table of relationships: <code>| follower | following |</code></p>
  
  <p>Currently, I have a query: <code>SELECT username FROM user WHERE username IN ('A', 'B', ...)</code></p>
  
  <p>Now when I perform the above query, I want to check if each user is being followed by the current user and somehow indicate it in another column of the result. Like this: <code>SELECT username, is_followed FROM user WHERE username IN ('A', 'B', ...) AND "is_followed is true when username is being followed by 'CURRENT_USERNAME'"</code></p>
  
  <p>Is there any efficient way of doing this without a foreach loop or subqueries?</p>
  
  <p>Any answer would be highly appreciated.</p>
  
  <p>Thanks.</p>