我有这个 Postgres 9.6 表定义:
CREATE TABLE research (
id int,
data jsonb
);
Run Code Online (Sandbox Code Playgroud)
并在其中包含以下示例数据
id |data
---|--------------------------------------------------------
1 |{"name": "Sim Ltd", "sector": "business", "personnel": {"headcount": {"total": 100, "male": 50, "female": 50}}}
2 |{"name": "EcoSmart", "sector": "business", "personnel": {"headcount": {"total": 500, "male": 460, "female": 40}}}
3 |{"name": "HIDN", "sector": "government", "personnel": {"headcount": {"total": 431, "male": 121, "female": 310}}}
4 |{"name": "RevDev", "sector": "government", "personnel": {"headcount": {"total": 15, "male": 10, "female": 5}}}
5 |{"name": "NEFPAN", "sector": "non-profit", "personnel": {"headcount": {"total": 5, "male": …Run Code Online (Sandbox Code Playgroud)