title: SQL group by part of string
body: <p>I have following data in my table:</p>
  
  <pre><code>URL         TIME    DATE
  --------------------------------------
  /x          11      2013-08-01
  /x          11      2013-08-01
  /pl/        11      2013-08-01
  /pl/        11      2013-08-03
  /pl/XXX/    11      2013-08-01
  /pl/XXX/    11      2013-08-04
  /pl/XXX/1   11      2013-08-01
  /pl/XXX/2   11      2013-08-01
  /pl/YYY/    11      2013-08-01
  /pl/YYY/1   11      2013-08-01
  /pl/YYY/2   11      2013-08-04
  /pl/YYY/3   11      2013-08-04
  </code></pre>
  
  <p>Is there a way to group by URL up to third  slash (<code>/</code>) in SQL Server? Unfortunately there exists record which contains less than three.</p>