Loading...

Price Rank

A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
medium

Problem

The catalog team wants competitive price positioning inside each category. Within each category, rank products by price with the most expensive at position 1, and let ties share a position. Skip rows where price is NULL. Return the product_name, category, price, and its position.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.