Sql query to get top visits For Each country

hi all,
i need SQL Query to get countryFlag,countryname and Number of visits from each country DESC in specific dates ranges
Please Help!

Please use API instead of direct SQL access: Reporting API Reference: API Reference - Piwik Analytics - Developer Docs - v3

1 Like

I need it to understand how PIWIK works …
BTY i found it and thank you for replying !.

1 Like

Hi Can you share your query? Im interested.

I think you can have the start of an answer there:
https://developer.matomo.org/guides/database-schema#visits