Created
August 20, 2014 20:20
-
-
Save leafo/990f574527a05e1dfcc0 to your computer and use it in GitHub Desktop.
top referrer domains
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select domain, count(*) from (select (regexp_matches(purchase_referrers.referrer, '//(.*?)/'))[1] as domain from purchase_referrers inner join purchases on purchases.id = purchase_referrers.purchase_id where purchases.status = 1 and purchase_referrers.type = 2) as domains group by domain order by count desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment