title: Mysql left join: show rows based on another attribute from the joined table
body: <p>I have following tables:</p>
  
  <pre><code>   Pools                         Members                             User
  ----------------------------------------------------------------------------------
  id      name              id     pool_id     user_id              id      name
  ----------------------------------------------------------------------------------
  1       abc               1         1          101                101     test1
  2       xyz               2         1          102                102     test2
                            3         2          105                105     test5
                            4         2          106                106     test6
  </code></pre>
  
  <p>When a user is logged in, he should view the list of those pools for which he is not a member e.g If user with id 101 is logged in, following result should be shown.</p>
  
  <pre><code>Pool              Members
  xyz                2 members
  </code></pre>