title: SQL return a Distinct column and the first date of the distinct column
body: <p>I have a database that contains multiple <code>url</code> and a date (<code>created_at</code>) associate with each of these <code>url</code>.<br>
  I would like to have something like:</p>
  
  <pre><code>Select DISTINCT url, "the first date of this url"
  from database
  where blabala
  </code></pre>
  
  <p>My problem is when a add the date to the select I get this:</p>
  
  <pre><code>/url/sdfsd  |   2014-07-19  
  /url/sdfsd  |   2014-07-20  
  /url/sdfsd  |   2014-07-25  
  </code></pre>
  
  <p>And what I want is only:  </p>
  
  <pre><code>/url/sdfsd  |   2014-07-19
  </code></pre>
  
  <hr>
  
  <p>I realise that i over simplified my problem but thanks to you guys i managed to find a solution  </p>
  
  <pre><code>select req2.date, COUNT(DATE(req2.date)) as count
  from (
      select hash_request -&gt; 'PATH_INFO', min(DATE(created_at)) as date
          from (
              select *
              from request_statistics
              where LOWER(hash_request -&gt; 'HTTP_USER_AGENT') LIKE '%google%'
           ) req1
      group by hash_request -&gt; 'PATH_INFO'
       )  req2
  group by req2.date
  order by req2.date asc
  </code></pre>
  
  <p>i had difficulty grouping the date on all the unique url. now i have, for each day what is the amount of unique url of all the unique url</p>