Medium sql

PostgreSQL JSONB query #8

Problem

PostgreSQL: PostgreSQL JSONB query #8

Hints
  • Use WITH for CTEs, OVER() for windows

Your practice code

Ready — edit the code above and click Run.

Solution

-- JSONB column example
SELECT data->>'city' AS city
FROM profiles
WHERE data @> '{"active": true}'::jsonb;

Try solving on your own first, then reveal the official answer.

Explanation

PostgreSQL: CTEs, window functions, ILIKE, JSONB @>, EXPLAIN ANALYZE.

Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details