# Top Content by Views

> Top five content items by views.

Canonical URL: <https://datadriven.io/problems/top_content_by_views>

Domain: SQL · Difficulty: medium · Seniority: L4

## Problem

The content team wants the five most-viewed pieces. A view counts when a page view's user matches the content's creator (treat any page view by a creator as a view of their work). Rank content by that view count, allowing ties (ranks may skip). Return the title and view count for everything in the top five, biggest first, breaking ties alphabetically by title.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/top_content_by_views)
- [SQL Interview Questions](https://datadriven.io/sql-interview-questions)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.