HF RL Explorer

Task: Get All Keys from a JSON Column in PostgreSQL

Task: Get All Keys from a JSON Column in PostgreSQL: a task in Terminal-Lego-15k (Harbor dataset). Write a SQL script that extracts all distinct top-level keys from a JSON/JSONB column across all rows in a PostgreSQL table.

The task

Write a SQL script that extracts all distinct top-level keys from a JSON/JSONB column across all rows in a PostgreSQL table.

Part of PrimeIntellect/Terminal-Lego-15k.