title: Return statistics from two joined tables
body: <p>I have two tables:</p>
  <p>user:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>userID</th>
  <th>name</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>mm</td>
  </tr>
  <tr>
  <td>2</td>
  <td>ww</td>
  </tr>
  <tr>
  <td>3</td>
  <td>tt</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>adress:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>userId</th>
  <th>street</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>2</td>
  <td>str1</td>
  </tr>
  <tr>
  <td>2</td>
  <td>str3</td>
  </tr>
  <tr>
  <td>3</td>
  <td>str2</td>
  </tr>
  <tr>
  <td>3</td>
  <td>str3</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I would like to write a query that prints statistics that particular street exist for user</p>
  <p>so for str3 I would like to have:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>userID</th>
  <th>street present</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>no</td>
  </tr>
  <tr>
  <td>2</td>
  <td>yes</td>
  </tr>
  <tr>
  <td>3</td>
  <td>yes</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>so for str2 I would like to have:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>userID</th>
  <th>street present</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>no</td>
  </tr>
  <tr>
  <td>2</td>
  <td>no</td>
  </tr>
  <tr>
  <td>3</td>
  <td>yes</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>so for str1 I would like to have:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>userID</th>
  <th>street present</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>no</td>
  </tr>
  <tr>
  <td>2</td>
  <td>yes</td>
  </tr>
  <tr>
  <td>3</td>
  <td>no</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>So far I wrote following query:</p>
  <pre><code>SELECT distinct(wl.userID), case when wle.street = 'str3' then 'TRUE' end
  FROM user wl left JOIN
       adress wle
       on wle.userID = wl.userID;
  </code></pre>
  <p>but it generates double results for example for str3 it will print information that both user 2 and 3 have two records: one that str3 is present and one is not.
  I would like to print only result that for user str3 is present</p>