title: Query with multiple LIKE and NOT IN condition
body: <p>I want to search the same value but in multiple fields. But escaping inscriptions for the last event. Is it possible?</p>
  
  <p>I've tried the following, but without success.</p>
  
  <pre><code>SELECT id, login
  FROM PERSON
  WHERE login like '%toto%'
  OR nickname like '%toto%'
  OR name like '%toto%'
  AND id NOT IN (
      SELECT p.id
      FROM PERSONNE p, INSCRIPTION i, EVENT e
      WHERE p.id = i.id_person 
      AND i.id_event = e.id
      AND i.id_event = (
          SELECT MAX(id) FROM EVENT))
  GROUP BY login, nom, pseudo
  </code></pre>