Posted By

minimalart on 04/11/11


Tagged


Versions (?)

Get domain from url


 / Published in: MySQL
 

  1. SELECT
  2. SUBSTR(FIELD, 1 , LOCATE('/', FIELD, 8)-1)AS Domain, COUNT(1) AS Count
  3. FROM TABLE
  4. GROUP BY Domain
  5. ORDER BY Count DESC LIMIT 250;

Report this snippet  

You need to login to post a comment.