Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Selecting n-th row
20. Practice 1
Summary

Instruction

Great. It's time for some practice, let's give it a try.

Exercise

Find the name, genre and size of the smallest game in our studio.

Remember the steps:

  1. Create the ranking query so that the smallest game gets rank 1.
  2. Use WITH to select rows with rank 1.

Stuck? Here's a hint!

Here is the example from the previous exercise to help you build the query:

WITH ranking AS (
  SELECT
    name,
    RANK() OVER(ORDER BY editor_rating DESC) AS rank
  FROM game
)

SELECT
  name
FROM ranking
WHERE rank = 2;