Similarweb Digital Research needs a country-level view of the most visited pages. Write a PostgreSQL query that returns the top three pages by unique visitors for every country represented in the page-view data.
page_id.| Column | Type | Description |
|---|---|---|
| view_idPK | INTEGER | Unique page-view event identifier |
| page_id | INTEGER | Identifier of the viewed page |
| country_code | VARCHAR(2) | Two-letter visitor country code |
| visitor_id | VARCHAR(20) | Anonymized visitor identifier |
| Column | Type | Description |
|---|---|---|
| page_idPK | INTEGER | Unique page identifier |
| page_name | VARCHAR(100) | Page title from Similarweb metadata |