Last active
July 6, 2020 12:48
-
-
Save vbilopav/337855fd058387ecacb77659d5b484cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
keys.key, data->>keys.key as value | |
from ( | |
select distinct jsonb_object_keys(data) as key from table | |
) keys cross join table | |
where data->>keys.key is not null | |
group by keys.key, data->>keys.key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment