<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/adapting-json-structures-for-real-time-aggregates-in-postgres-d24dxmxrz" -->

---
title: Adapting JSON Structures for Real-Time Aggregates in...
description: Learn how to efficiently manage and aggregate data from multiple sensors or IoT devices without creating dedicated columns using Timescale&#x27;s JSON structures....
canonical: https://daily.dev/posts/adapting-json-structures-for-real-time-aggregates-in-postgres-d24dxmxrz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Adapting JSON Structures for Real-Time Aggregates in Postgres | daily.dev
og:description: Learn how to efficiently manage and aggregate data from multiple sensors or IoT devices without creating dedicated columns using Timescale&#x27;s JSON structures....
og:url: https://daily.dev/posts/adapting-json-structures-for-real-time-aggregates-in-postgres-d24dxmxrz
og:image: https://api.daily.dev/og/posts/d24dXMxrZ.png
og:image:alt: Adapting JSON Structures for Real-Time Aggregates in Postgres
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Adapting JSON Structures for Real-Time Aggregates in Postgres

**[TigerData \(Creators of TimescaleDB\)](https://daily.dev/sources/tigerdata)** · 3 min read · 4 upvotes · 0 comments

## Summary

Learn how to efficiently manage and aggregate data from multiple sensors or IoT devices without creating dedicated columns using Timescale's JSON structures. Explore the innovative solution of custom aggregate functions for JSONB values.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.timescale.com/blog/adapting-json-structures-for-real-time-aggregates-a-community-solution/>

---

Tags: [#postgresql](https://daily.dev/tags/postgresql), [#data-management](https://daily.dev/tags/data-management), [#timescaledb](https://daily.dev/tags/timescaledb)

[View this post on daily.dev](https://daily.dev/posts/adapting-json-structures-for-real-time-aggregates-in-postgres-d24dxmxrz)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Adapting JSON Structures for Real-Time Aggregates in Postgres","url":"https://daily.dev/posts/adapting-json-structures-for-real-time-aggregates-in-postgres-d24dxmxrz","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/adapting-json-structures-for-real-time-aggregates-in-postgres-d24dxmxrz"},"datePublished":"2024-03-29T11:00:45.535Z","dateModified":"2024-05-09T08:39:06.345Z","description":"Learn how to efficiently manage and aggregate data from multiple sensors or IoT devices without creating dedicated columns using Timescale's JSON structures....","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/692bfe3d124edc077a913d28423e6608?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/692bfe3d124edc077a913d28423e6608?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"TigerData (Creators of TimescaleDB)","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"TigerData (Creators of TimescaleDB)","logo":"https://media.daily.dev/image/upload/s--bsnY3goS--/f_auto/v1756960371/squads/timescale?_a=BAMClqZW0","url":"https://daily.dev/squads/tigerdata"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/adapting-json-structures-for-real-time-aggregates-in-postgres-d24dxmxrz","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"postgresql,data-management,timescaledb","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"TigerData (Creators of TimescaleDB)","item":"https://daily.dev/squads/tigerdata"},{"@type":"ListItem","position":3,"name":"Adapting JSON Structures for Real-Time Aggregates in Postgres"}]}
```

