# How would you approach a data Model below?

**URL:** <https://discourse.getdbt.com/t/how-would-you-approach-a-data-model-below/12965>\
**Category:** Help\
**Tags:** jinja, snapshots, macros, dbt-core\
**Created:** [April 19, 2024, 12:29pm UTC](https://discourse.getdbt.com/t/how-would-you-approach-a-data-model-below/12965 "2024-04-19T12:29:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimihcosta](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@jimihcosta](https://discourse.getdbt.com/u/jimihcosta)\
**Post date:** [April 19, 2024, 12:29pm UTC](https://discourse.getdbt.com/t/how-would-you-approach-a-data-model-below/12965/1 "2024-04-19T12:29:26Z")

</div>

Hi,

How would you approach a dataset in the format below:

- Aggregate by different categories.
- Revenue in multiple time-frames (montly, ytd, ytd last 3 months)

What is the best approach to have a final model as the imagem below? is there any library or functionality you would use to facilitate the summarization for multiple time period (instead of writing SQL statements) ?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/2X/6/623ff7711d54d07de27b9adb7c8a48d3aadd3507.jpeg)
