add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
CREATE TABLE
INSERT 0 4
hostname ref_name ref_value
example.com example2.com 4
example.com google 6
example.com google 6
example.com facebook 1
example.com example2.com 1
SELECT 5
row_to_json
{"hostname":"example.com",
 "visits":25,
 "referrers":[{"google": 12}, {"facebook": 1}, {"example2.com": 5}],
 "paths":[{"/about": 6}, {"/article/title2": 5}, {"/article/title1": 3}, {"/": 11}],
 "widths":[{"1680": 3}, {"1398": 1}, {"2560": 1}, {"360": 7}, {"1280": 7}, {"1440": 2}, {"1920": 2}, {"1283": 1}]}
SELECT 1
jsonb_build_object
{"paths": [{"/about": 6}, {"/article/title2": 5}, {"/article/title1": 3}, {"/": 11}], "visits": 25, "widths": [{"1680": 3}, {"1398": 1}, {"2560": 1}, {"360": 7}, {"1280": 7}, {"1440": 2}, {"1920": 2}, {"1283": 1}], "hostname": "example.com", "referrers": [{"google": 12}, {"facebook": 1}, {"example2.com": 5}]}
SELECT 1