Created
March 29, 2018 19:11
-
-
Save hissy/86b5b430d8a85f7b5b5d8ecb3abd5b3e to your computer and use it in GitHub Desktop.
#mautic #mysql Get most common page hits by specific segment users
This file contains hidden or 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 count(page_hits.url) as count, page_hits.url | |
from page_hits | |
left join leads on page_hits.lead_id = leads.id | |
left join lead_lists_leads on leads.id = lead_lists_leads.lead_id | |
left join lead_lists on lead_lists.id = lead_lists_leads.leadlist_id | |
where lead_lists.id = 31 | |
group by page_hits.url | |
order by count desc | |
limit 10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment