title: How can I return all unique entries that satisfy criteria from other tables?
body: <p>I'll fabricate data to illustrate my question:
  I have 2 tables, one called <code>clients</code>, and one called <code>shippingProfiles</code>.</p>
  
  <pre><code>                   clients                           shippingProfiles
      *************************************   *********************************
      * clientId username   emailAddress  *   * clientId  street     town     *
      * * * * * * * * * * * * * * * * * * *   * * * * * * * * * * * * * * * * *
      * 1        james      jdoer@aol.org *   * 1         mole       north    *
      * 2        zac        zmit@aol.org  *   * 1         maple      pleasant *
      * 3        cris       cm@yahoo.org  *   * 3         oak        brook    *
      * 4        john       jg@yahoo.org  *   * 3         taylor     glen     *
      *************************************   *********************************
  </code></pre>
  
  <p><code>clients.clientId</code> is a unique primary key. Some of the clients have multiple shipping profiles, others have none.</p>
  
  <p>I would like to search the database for any client that has the letter "m" in their username, emailAddress, street, or town. I would like each unique client to be returned as one entry (and only one entry), showing their id, username, email address, street, and town. If they don't have a street and town it can display <code>null</code> (or something similar), and if they have multiple streets and towns it can display any one of them.</p>
  
  <p>This should be the result:</p>
  
  <pre><code>    *********************************************************
      * clientId  username  emailAddress    street  town      *
      * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
      * 1         james     jdoer@aol.org   mole    north     *
      * 2         zac       zmit@aol.org    null    null      *
      * 3         cris      cm@yahoo.org    oak     brook     *
      *********************************************************
  </code></pre>
  
  <p>The tables may eventually hold 50,000 entries each so I need the database to do this in the least possible sweeps. </p>
  
  <p>I've heard mysql is actually very powerful so I'm assuming this can be done with one command.</p>