Introduction
Selecting n-th row
20. Practice 1
Summary

Instruction

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

Exercise

Find the Name, Genre, and Size of the smallest game in our database.

Remember the steps:

  1. Create the ranking query so that the smallest game gets rank 1.
  2. Use WITH to select the row(s) 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 EditorRating DESC) AS Rank
  FROM Game
)

SELECT
  Name
FROM Ranking
WHERE Rank = 2;