Name Tags

SQL practice problem 6 of 67 · Text & Dates · Easy · 10 coins for your first accepted solve

The badge printer wants shouting names.

Return each player's name in upper case as tag, and the number of letters in their name as letters.

Sort by letters descending, then by tag.

Schema

CREATE TABLE players (
  id         INT PRIMARY KEY,
  name       TEXT NOT NULL,
  country    TEXT,            -- NULL = unknown
  level      INT NOT NULL,
  joined_on  DATE NOT NULL,
  mentor_id  INT              -- another player's id, or NULL
);

Write your query in the browser, run it on the sample data, then submit it against hidden test data.

Previous: Price Tags · Next: Sign-up Months · All problems