Weld logo
hubspot logo
Hubspot

New companies by month

Retrieves a list of new companies created each month from the HubSpot integration and groups them by month. The results are ordered by month.
1select
2    date_trunc(createdAt, month) as month
3  , count(*) as companies
4from
5    {{raw.hubspot.companies}}
6group by
7    month
8order by
9    month
Example of output from model:
+---------------------+-----------+
|        month        | companies |
+---------------------+-----------+
| 2021-01-01 00:00:00 |    150    |
| 2021-02-01 00:00:00 |    200    |
| 2021-03-01 00:00:00 |    175    |
| 2021-04-01 00:00:00 |    225    |
| 2021-05-01 00:00:00 |    250    |
| 2021-06-01 00:00:00 |    300    |
| 2021-07-01 00:00:00 |    275    |
| 2021-08-01 00:00:00 |    350    |
| 2021-09-01 00:00:00 |    400    |
| 2021-10-01 00:00:00 |    375    |
| 2021-11-01 00:00:00 |    450    |
| 2021-12-01 00:00:00 |    500    |
+---------------------+-----------+

This SQL model allows you to easily track the number of new companies that have been added to your CRM each month. By using the date_trunc function, the SQL template groups the companies by month, providing you with a clear and concise overview of your company's growth over time. This information can be incredibly useful for businesses looking to track their progress and identify trends in their customer acquisition. With the New Companies by Month SQL template, you can gain valuable insights into your company's growth and make data-driven decisions to help your business succeed.

Ready to start modeling your own hubspot data?

Get started building your data warehouse with hubspot and connect all your apps and databases.

hubspot logo
Weld logo
Sign up for free
© 2024 Weld. All rights reserved.