2 ms·
Well, postgres can do all that what that site said, too If you have a table with a column data in format json or jsonb, you can do a SELECT data->>cust_id
by kuschku 10y ago
Well, postgres can do all that what that site said, too
If you have a table with a column data in format json or jsonb, you can do a
SELECT data->>cust_id AS cust_id, SUM(data->>amount)
WHERE data->>status = 'A'
GROUP BY data->>cust_id;
just as well in postgres.
Or, for the third example,
SELECT DISTINCT data->>cust_id;
(See https://www.postgresql.org/docs/9.5/static/functions-json.html https://www.postgresql.org/docs/9.5/static/functions-json.ht... )