Data Dungeon
← Null Cathedral

Chamber 57 · Fractured Transept

Rank the Hollow

Window + COALESCE

WindowCOALESCEORDER BY+350 XP
Locked

Clear the previous chamber to unlock this one. You can still preview the briefing.

Briefing

Some devotees left no devotion score. Treat NULL as 0 with COALESCE, then ROW_NUMBER the faithful.

Objective

Return name and ROW_NUMBER() OVER (ORDER BY COALESCE(devotion, 0) DESC) as standing, ordered by standing.

Hint

COALESCE(devotion, 0) inside the window ORDER BY, then ORDER BY standing.

Chamber schema

devotees3 cols

Devotees with optional devotion scores

idnamedevotion
chamber_57.sql

Results appear here after you run a query. Correct rows alone are not enough — the Warden must seal your loot.

Ask the Warden

AI SQL coach — hints and fail reviews, not spoilers

Warden

I am the Warden. Ask for a hint, paste a failing query, or request a review — I won't hand you the full answer.