title: MySQL: SELECT DISTINCT multiple columns
body: <p>My SQL query looks like this:</p>
  <pre><code>SELECT DISTINCT ip, title, url
  FROM stats;
  </code></pre>
  <p>My goal is to select one row for each distinct <code>ip</code>, along with <code>title</code> and <code>url</code>; however I find when I add the <code>title</code> and <code>url</code> fields to my query it shows me all rows.</p>
  <h3>Sample Data</h3>
  <pre><code>ip          title      url
  ---------------------------
  127.0.0.1   title      url
  127.0.0.2   title      url
  127.0.0.1   difftitle  url
  </code></pre>
  <h3>Result I would like</h3>
  <pre><code>ip          title      url
  ---------------------------
  127.0.0.1   title      url
  127.0.0.2   title      url
  </code></pre>