Data Dungeon
← The Fractured Loom

Chamber 62 · Warp Hall

Weft Count

Scalar subquery per row

SubqueryCOUNT+405 XP
Locked

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

Briefing

Each weaver's tally lives in a subquery in the SELECT list — count threads without joining the whole spool.

Objective

Return weaver name and thread_count as (SELECT COUNT(*) FROM threads WHERE weaver_id = weavers.id).

Hint

Scalar subquery: COUNT threads WHERE weaver_id = weavers.id, alias thread_count.

Chamber schema

weavers2 cols

Weavers on the warp hall

idname
threads3 cols

Threads assigned to weavers

idweaver_idtension
chamber_62.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.