# Top-Ranked Wines by Variety

> The best bottles. Ranked by variety.

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

Domain: SQL · Difficulty: easy · Seniority: L3

## Problem

The product team is looking at content that runs shorter than user 197's typical session. Take user 197's average session length, then return every content item whose duration is at or below that average. For each row, show the literal user ID 197, the content ID, and the content's duration in seconds.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/top_ranked_wines_by_variety)
- [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.